{"id":13593894,"url":"https://github.com/neurocult/agency","last_synced_at":"2026-01-14T22:45:24.601Z","repository":{"id":208981047,"uuid":"718297824","full_name":"neurocult/agency","owner":"neurocult","description":"🕵️‍♂️ Library designed for developers eager to explore the potential of Large Language Models (LLMs) and other generative AI through a clean, effective, and Go-idiomatic approach.","archived":false,"fork":false,"pushed_at":"2024-04-13T12:59:11.000Z","size":915,"stargazers_count":373,"open_issues_count":2,"forks_count":19,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-04-14T02:43:49.653Z","etag":null,"topics":["agents","ai","artificial-general-intelligence","artificial-intelligence","artificial-neural-networks","autonomous-agents","chatgpt","generative-ai","go","golang","gpt","language-models","llm","llmops","machine-learning","neural-network","nlp","openai","rag","vector-database"],"latest_commit_sha":null,"homepage":"","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/neurocult.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}},"created_at":"2023-11-13T19:49:03.000Z","updated_at":"2024-05-08T07:43:02.073Z","dependencies_parsed_at":"2023-12-02T15:25:26.720Z","dependency_job_id":"15effe8b-9ac4-4aaa-8281-a8925f32909b","html_url":"https://github.com/neurocult/agency","commit_stats":null,"previous_names":["neurocult/agency"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/neurocult/agency","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurocult%2Fagency","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurocult%2Fagency/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurocult%2Fagency/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurocult%2Fagency/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neurocult","download_url":"https://codeload.github.com/neurocult/agency/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurocult%2Fagency/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28436784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T22:37:52.437Z","status":"ssl_error","status_checked_at":"2026-01-14T22:37:31.496Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["agents","ai","artificial-general-intelligence","artificial-intelligence","artificial-neural-networks","autonomous-agents","chatgpt","generative-ai","go","golang","gpt","language-models","llm","llmops","machine-learning","neural-network","nlp","openai","rag","vector-database"],"created_at":"2024-08-01T16:01:25.980Z","updated_at":"2026-01-14T22:45:24.580Z","avatar_url":"https://github.com/neurocult.png","language":"Go","funding_links":[],"categories":["Software Development","*Ops for AI","Go","Table of Open-Source AI Agents Projects","其他LLM框架","NLP","chatgpt","Other LLM Frameworks"],"sub_categories":["AI Orchestration \u0026 Deployment","文章","Videos Playlists"],"readme":"# Agency: The Go Way to AI\n\nLibrary designed for developers eager to explore the potential of Large Language Models (LLMs) and other generative AI through a clean, effective, and Go-idiomatic approach.\n\n**Welcome to the agency!** 🕵️‍♂️\n\n![Dracula-agent, mascot of the \"agency\" library.](./assets/dracula.png)\n\n## 💻 Quick Start\n\nInstall package:\n\n```bash\ngo get github.com/neurocult/agency\n```\n\nChat example:\n\n```go\npackage main\n\nimport (\n\t\"bufio\"\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\n\t_ \"github.com/joho/godotenv/autoload\"\n\n\t\"github.com/neurocult/agency\"\n\t\"github.com/neurocult/agency/providers/openai\"\n)\n\nfunc main() {\n\tassistant := openai.\n\t\tNew(openai.Params{Key: os.Getenv(\"OPENAI_API_KEY\")}).\n\t\tTextToText(openai.TextToTextParams{Model: \"gpt-4o-mini\"}).\n\t\tSetPrompt(\"You are helpful assistant.\")\n\n\tmessages := []agency.Message{}\n\treader := bufio.NewReader(os.Stdin)\n\tctx := context.Background()\n\n\tfor {\n\t\tfmt.Print(\"User: \")\n\n\t\ttext, err := reader.ReadString('\\n')\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\n\t\tinput := agency.NewTextMessage(agency.UserRole, text)\n\t\tanswer, err := assistant.SetMessages(messages).Execute(ctx, input)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\n\t\tfmt.Println(\"Assistant:\", string(answer.Content()))\n\n\t\tmessages = append(messages, input, answer)\n\t}\n}\n```\n\nThat's it!\n\nSee [examples](./examples/) to find out more complex usecases including RAGs and multimodal operations.\n\n## 🚀 Features\n\n✨ **Pure Go**: fast and lightweight, statically typed, no need to mess with Python or JavaScript\n\n✨ Write **clean code** and follow **clean architecture** by separating business logic from concrete implementations\n\n✨ Easily create **custom operations** by implementing simple interface\n\n✨ **Compose operations** together into **processes** with the ability to observe each step via **interceptors**\n\n✨ **OpenAI API bindings** (can be used for any openai-compatable API: text to text (completion), text to image, text to speech, speech to text\n\n\u003c!-- TODO v0.1.0\n- [ ] Name the organization\n- [ ] Reorganize folders and packages --\u003e\n\n## 🤔 Why need Agency?\n\nAt the heart of Agency is the ambition to empower users to build autonomous agents. While **perfect for all range of generative AI applications**, from chat interfaces to complex data analysis, our library's ultimate goal is to simplify the creation of autonomous AI systems. Whether you're building individual assistant or coordinating agent swarms, Agency provides the tools and flexibility needed to bring these advanced concepts to life with ease and efficiency.\n\nIn the generative AI landscape, Go-based libraries are rare. The most notable is [LangChainGo](https://github.com/tmc/langchaingo), a Go port of the Python LangChain. However, translating Python to Go can be clunky and may not fit well with Go's idiomatic style. Plus, some question LangChain's design, even in Python. This situation reveals a clear need for an idiomatic Go alternative.\n\nOur goal is to fill this gap with a Go-centric library that emphasizes clean, simple code and avoids unnecessary complexities. Agency is designed with a small, robust core, easy to extend and perfectly suited to Go's strengths in static typing and performance. It's our answer to the lack of Go-native solutions in generative AI.\n\n## Tutorial\n\n- [Part 1](https://dev.to/emil14/agency-the-go-way-to-ai-part-1-1lhe) ([Russian translation](https://habr.com/ru/sandbox/204508/))\n\n## 🛣 Roadmap\n\nIn the next versions:\n\n- [x] Support for external function calls\n- [ ] Metadata (tokens used, audio duration, etc)\n- [ ] More provider-adapters, not only openai\n- [x] Image to text operations\n- [ ] Powerful API for autonomous agents\n- [ ] Tagging and JSON output parser\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneurocult%2Fagency","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneurocult%2Fagency","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneurocult%2Fagency/lists"}