How antonosika/gpt-engineer works
gpt-engineer is a CLI coding agent: a user supplies a natural-language request (and optionally images or existing code), the agent asks a model to generate or improve files, and it can execute generated code locally. The graph includes prompt intake, agent orchestration, generation/improvement, and local execution/storage, plus documented model and custom-preprompt capabilities. Some subsystem links rely on the SOURCE INDEX or README because their implementation was not excerpted; unverified links are omitted.
Main entry points: main.py CLI entrypoint · steps.py Generation steps · cli_agent.py CLI agent · ai.py Model client
Components 17
CLI workflow
- CLI entrypoint
gpt_engineer/applications/cli/main.py - Prompt intake
gpt_engineer/applications/cli/main.py - File selection
gpt_engineer/applications/cli/file_selector.py - Learning and collection
gpt_engineer/applications/cli/learning.py
Agent and generation
- CLI agent
gpt_engineer/applications/cli/cli_agent.py - Prompt representation
gpt_engineer/core/prompt.py - Generation steps
gpt_engineer/core/default/steps.py - Custom steps
gpt_engineer/tools/custom_steps.py - Preprompt templates
gpt_engineer/core/preprompts_holder.py
Execution and files
- Generated file set
gpt_engineer/core/files_dict.py - Chat-to-files and diffs
gpt_engineer/core/chat_to_files.py - Execution environment
gpt_engineer/core/default/disk_execution_env.py - Workspace file store
gpt_engineer/core/default/file_store.py - Project memory
gpt_engineer/core/default/disk_memory.py
Model integrations
- Model client
gpt_engineer/core/ai.py - Language model APIs
Other components
- Project author
Connections 20
- Project author → CLI entrypoint: starts
README.md - CLI entrypoint → Prompt intake: collects request
gpt_engineer/applications/cli/main.py - CLI entrypoint → File selection: selects files
gpt_engineer/applications/cli/main.py - CLI entrypoint → Learning and collection: offers learning
gpt_engineer/applications/cli/main.py - Prompt intake → Prompt representation: builds prompt
gpt_engineer/applications/cli/main.py - CLI entrypoint → CLI agent: configures agent
gpt_engineer/applications/cli/main.py - CLI agent → Generation steps: runs steps
gpt_engineer/applications/cli/cli_agent.py - CLI agent → Model client: provides client
gpt_engineer/applications/cli/cli_agent.py - Generation steps → Model client: requests generation
gpt_engineer/core/default/steps.py - Generation steps → Preprompt templates: loads templates
gpt_engineer/core/default/steps.py - Generation steps → Prompt representation: uses request
gpt_engineer/core/default/steps.py - Custom steps → Model client: requests revisions
gpt_engineer/tools/custom_steps.py - Custom steps → Execution environment: runs generated code
gpt_engineer/tools/custom_steps.py - Generation steps → Generated file set: produces files
gpt_engineer/core/default/steps.py - CLI agent → Chat-to-files and diffs: improves files
gpt_engineer/applications/cli/cli_agent.py - Model client → Language model APIs: calls model
README.md - Execution environment → Workspace file store: uploads and runs
gpt_engineer/core/default/disk_execution_env.py - Execution environment → Generated file set: transfers files
gpt_engineer/core/default/disk_execution_env.py - Preprompt templates → Project memory: reads templates
gpt_engineer/core/preprompts_holder.py - CLI entrypoint → Project memory: stores project data
gpt_engineer/applications/cli/main.py