How eteissonniere/go-autogpt works
Project type and purpose
• This is a Go-based CLI application and library providing “AutoGPT-style” agents.
• Its purpose is to let a user supply a natural-language task, then automatically plan and execute steps (via sub-agents) using GPT-3.5-Turbo (or another LLM) plus a set of local commands (filesystem, shell, etc.).
High-level architecture
• Frontend: cli package (commands run, replay, main entrypoint)
• Core agents:
• Mastermind (coordinates planning + execution)
• Planner sub-agent(s) (in agents/planner and prompt/planners)
• Executor sub-agent(s) (in agents/executor and prompt/executors)
• Prompt management (templates, commands, types in prompt/…)
• LLM integration (llms package, openai.go)
• Logging & diagnostics (misc/logging)
• Developer container config (.devcontainer)
Component relationships
• CLI receives user task → invokes Mastermind agent
• Mastermind calls Planner agent → uses prompt templates + LLM client → returns plan (list of steps)
• Mastermind feeds plan to Executor agent → each step triggers a prompt+LLM or concrete shell/fs call
• All components emit logs via misc/logging
• LLM client (in llms) is the sole external service (OpenAI API)
Architectural patterns and principles
• Hexagonal / Clean architecture:
• Ports & adapters for LLM (interface → openai.go)
• Dependency injection for agents
• Single responsibility: each package has a narrow focus (prompt commands vs. planner logic vs. executor logic).