{"id":31067324,"url":"https://github.com/bububa/atomic-agents","last_synced_at":"2025-09-15T19:58:49.886Z","repository":{"id":270458341,"uuid":"910444088","full_name":"bububa/atomic-agents","owner":"bububa","description":"Build AI agents atomically. Atomic Agents re-implementation with Golang","archived":false,"fork":false,"pushed_at":"2025-07-03T06:36:37.000Z","size":321,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-03T07:36:07.793Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bububa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-31T09:38:12.000Z","updated_at":"2025-07-03T06:36:40.000Z","dependencies_parsed_at":"2024-12-31T10:31:03.293Z","dependency_job_id":"bc1c2cdc-4478-4102-a17e-b170835ae8bc","html_url":"https://github.com/bububa/atomic-agents","commit_stats":null,"previous_names":["bububa/atomic-agents"],"tags_count":67,"template":false,"template_full_name":null,"purl":"pkg:github/bububa/atomic-agents","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bububa%2Fatomic-agents","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bububa%2Fatomic-agents/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bububa%2Fatomic-agents/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bububa%2Fatomic-agents/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bububa","download_url":"https://codeload.github.com/bububa/atomic-agents/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bububa%2Fatomic-agents/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275312966,"owners_count":25442563,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-15T19:58:44.866Z","updated_at":"2025-09-15T19:58:49.868Z","avatar_url":"https://github.com/bububa.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Atomic Agents Golang version\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/bububa/atomic-agents.svg)](https://pkg.go.dev/github.com/bububa/atomic-agents)\n[![Go](https://github.com/bububa/atomic-agents/actions/workflows/go.yml/badge.svg)](https://github.com/bububa/atomic-agents/actions/workflows/go.yml)\n[![goreleaser](https://github.com/bububa/atomic-agents/actions/workflows/goreleaser.yml/badge.svg)](https://github.com/bububa/atomic-agents/actions/workflows/goreleaser.yml)\n[![GitHub go.mod Go version of a Go module](https://img.shields.io/github/go-mod/go-version/bububa/atomic-agents.svg)](https://github.com/bububa/atomic-agents)\n[![GoReportCard](https://goreportcard.com/badge/github.com/bububa/atomic-agents)](https://goreportcard.com/report/github.com/bububa/atomic-agents)\n[![GitHub license](https://img.shields.io/github/license/bububa/atomic-agents.svg)](https://github.com/bububa/atomic-agents/blob/master/LICENSE)\n[![GitHub release](https://img.shields.io/github/release/bububa/atomic-agents.svg)](https://GitHub.com/bububa/atomic-agents/releases/)\n\nBuilding AI agents, atomically. This is an implementation for [Atomic Agents](https://github.com/BrainBlend-AI/atomic-agents) in Golang.\n\n\u003e The Atomic Agents framework is designed around the concept of atomicity to be an extremely lightweight and modular framework for building Agentic AI pipelines and applications without sacrificing developer experience and maintainability. The framework provides a set of tools and agents that can be combined to create powerful applications. It is built on top of [instructor](https://go.useinstructor.com) and leverages the power of [jsonschema](https://github.com/invopop/jsonschema) for data and schema validation and serialization. All logic and control flows are written in Golang, enabling developers to apply familiar best practices and workflows from traditional software development without compromising flexibility or clarity.\n\n## Anatomy of an Agent\n\nIn Atomic Agents, an agent is composed of several key components:\n\n- **System Prompt:** Defines the agent's behavior and purpose.\n- **Input Schema:** Specifies the structure and validation rules for the agent's input.\n- **Output Schema:** Specifies the structure and validation rules for the agent's output.\n- **Memory:** Stores conversation history or other relevant data.\n- **Context Providers:** Inject dynamic context into the agent's system prompt at runtime.\n\nHere's a high-level architecture diagram:\n\n\u003c!-- ![alt text](./.assets/architecture_highlevel_overview.png) --\u003e\n\u003cimg src=\"https://github.com/BrainBlend-AI/atomic-agents/blob/main/.assets/architecture_highlevel_overview.png\" alt=\"High-level architecture overview of Atomic Agents\" width=\"600\"/\u003e\n\u003cimg src=\"https://github.com/BrainBlend-AI/atomic-agents/raw/main/.assets/what_is_sent_in_prompt.png\" alt=\"Diagram showing what is sent to the LLM in the prompt\" width=\"600\"/\u003e\n\nFor more details please read from the original website.\n\n## Why reinvent wheel\n\n- don't like python\n- easy integrate into exists Golang projects\n- better performance\n\n## Installation\n\n```bash\ngo get -u github.com/bububa/atomic-agents\n```\n\n## Project Structure\n\nAtomic Agents with the following main components:\n\n1. `agents/`: The core Atomic Agents library\n\n- `Agent[I schema.Schema, O schema.Schema]`: generative basic Agent, contains interfaces:\n  - `TypeableAgent`\n  - `StreamableAgent`\n  - `AnonymousAgent`\n  - `AnonymousStreamableAgent`\n- `Chain[I schema.Schema, O schema.Schema]`: an Agent which is a agents chain\n- `OrchestrationAgent[I schema.Schema, O schema.Schema]`: orchestration Agent\n- `ToolAgent[I schema.Schema, T schema.Schema, O schema.Schema]`: Agent with tool\n- `RAG[O schema.Schema]`: RAG also implements `TypeableAgent`, `StreamableAgent`, `AnonymousAgent` and `AnonymousStreamableAgent` interfaces\n\n2. `components/`: The Atomic Agents components\n\n- `message`: Defines the Message structure for input/output\n- `memory`: Defines a in memory Memory Store\n- `systemprompt`: Contains SystemPrompt `Generator` and `ContextProvider`\n- `embedder`: Defines the embedder interface, contains several `Provider` including `OpenAI`, `Gemini`, `VoyageAI`, `HuggingFace`, `Cohere` implementations\n- `vectordb`: Defines a vectordb interface, contains several `Provider`s including `Memory`, `Chromem`, `Milvus`\n- `document` Defines a `Document` interface use for RAG, implemented `File`, `Http` document types. Provide a `Parser` interface which transform document content into specific string\n  - `parsers/pdf`: a `PDF` parser\n  - `parsers/html`: a `HTML` parser\n  - `parsers/docx`: a `DOCx` parser\n  - `parsers/pptx`: a `PPTx` parser\n  - `parsers/xlsx`: a `XLSx` parser\n\n3. `schema/`: Defines the Input/Output schema structures and interfaces\n4. `examples/`: Example projects showcasing Atomic Agents usage\n5. `tools/`: A collection of tools that can be used with Atomic Agents\n\n## Quickstart \u0026 Examples\n\nA complete list of examples can be found in the [examples](./examples/) directory.\n\nHere's a quick snippet demonstrating how easy it is to create a powerful agent with Atomic Agents:\n\n```golang\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/bububa/atomic-agents/agents\"\n\t\"github.com/bububa/atomic-agents/components\"\n\t\"github.com/bububa/atomic-agents/schema\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tmem := components.NewMemory(10)\n\tinitMsg := mem.NewMessage(components.AssistantRole, schema.CreateOutput(\"Hello! How can I assist you today?\"))\n\tagent := agents.NewAgent[schema.Input, schema.Output](\n\t\tagents.WithClient(newInstructor()),\n\t\tagents.WithMemory(mem),\n\t\tagents.WithModel(\"gpt-4o-mini\"),\n\t\tagents.WithTemperature(0.5),\n\t\tagents.WithMaxTokens(1000))\n\toutput := schema.NewOutput(\"\")\n\tinput := schema.NewInput(\"Today is 2024-01-01, only response with the date without any other words\")\n\tif err := agent.Run(ctx, input, output); err != nil {\n\t\tfmt.Println(err)\n\t\treturn\n\t}\n\tfmt.Println(agent.SystemPrompt())\n\tfmt.Println(\"\")\n\tfmt.Printf(\"Agent: %s\\n\", initMsg.Content().(schema.Output).ChatMessage)\n\tfmt.Printf(\"User: %s\\n\", input.ChatMessage)\n\tfmt.Printf(\"Agent: %s\\n\", output.ChatMessage)\n\t// Output:\n\t// # IDENTITY and PURPOSE\n\t// - This is a conversation with a helpful and friendly AI assistant.\n\t//\n\t// # OUTPUT INSTRUCTIONS\n\t// - Always respond using the proper JSON schema.\n\t// - Always use the available additional information and context to enhance the response.\n\t//\n\t// Agent: Hello! How can I assist you today?\n\t// User: Today is 2024-01-01, only response with the date without any other words\n\t// Agent: 2024-01-01\n}\n```\n\n## License\n\nThis project is licensed under the MIT License—see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbububa%2Fatomic-agents","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbububa%2Fatomic-agents","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbububa%2Fatomic-agents/lists"}