How pythagora-io/gpt-pilot works
GPT Pilot is an AI developer companion that builds applications through user-guided agent workflows. The CLI starts or resumes projects; an orchestrator coordinates specification and development agents, which use LLMs, project state, execution tools, and the UI to produce and refine workspace code. The README documents project listing and continuation; the tree also shows template, filesystem, and persistence subsystems. Some agent implementations and UI/API wiring were not sampled, so those links are omitted where evidence is insufficient.
Main entry points: base.py Agent Base · orchestrator.py Agent Orchestrator · state_manager.py Project State Manager · main.py CLI
Components 17
CLI and Orchestration
- CLI
core/cli/main.py - Agent Orchestrator
core/agents/orchestrator.py
Development Agents
- Specification Writer
core/agents/spec_writer.py - Developer Agent
core/agents/developer.py - Bug Hunter
core/agents/bug_hunter.py - Agent Base
core/agents/base.py
LLM and Execution
- User Interface
core/ui/base.py - LLM Client Layer
core/llm/base.py - Anthropic Client
core/llm/anthropic_client.py - Process Manager
core/proc/process_manager.py
Project State
- Project State Manager
core/state/state_manager.py - Project State Model
core/db/models/project_state.py - Project Database
core/db/session.py
Workspace and Templates
- Workspace Filesystem
core/disk/vfs.py - App Templates
core/templates/registry.py
Other components
- Developer
- LLM Provider
Connections 15
- Developer → CLI: starts or resumes
README.md - CLI → Agent Orchestrator: runs project
core/cli/main.py - Agent Orchestrator → Specification Writer: dispatches
core/agents/orchestrator.py - Agent Orchestrator → Developer Agent: dispatches
core/agents/orchestrator.py - Agent Orchestrator → Bug Hunter: dispatches
core/agents/orchestrator.py - Specification Writer → App Templates: reads registry
core/agents/spec_writer.py - Agent Base → User Interface: sends prompts
core/agents/base.py - Agent Base → Project State Manager: uses state
core/agents/base.py - Agent Base → LLM Client Layer: creates client
core/agents/base.py - Agent Base → Process Manager: uses manager
core/agents/base.py - LLM Client Layer → Anthropic Client: selects provider
core/llm/base.py - Anthropic Client → LLM Provider: sends requests
core/llm/anthropic_client.py - Project State Manager → Project State Model: loads and saves
core/state/state_manager.py - Project State Manager → Project Database: uses sessions
core/state/state_manager.py - Project State Manager → Workspace Filesystem: reads workspace
core/state/state_manager.py