DOCS/CORE-CONCEPTS/HOW-ANDROMITY-WORKS

how andromity works

How Andromity Works

Andromity operates as a stateful agent loop. Understanding this architecture helps you get the most out of the system and customize its behavior.


The Execution Loop

When you ask Andromity to perform a task, it follows a structured sequence:

MARKUP
graph TD
  Prompt[User Instruction] --> Explore[Read & Explore Code]
  Explore --> Plan[Create Plan]
  Plan --> Review[User Approval]
  Review -->|Approve| Build[Execute Edits]
  Review -->|Reject| Explore
  Build --> Test[Run Tests]
  Test -->|Pass| ReviewCode[Final Code Review]
  Test -->|Fail| Fix[Auto-debug & Fix]
  Fix --> Test
1. Read & Explore

Andromity performs a fast, semantic search across your codebase using file lists and ripgrep searches. It matches symbols and scans relevant modules to form a context map.

2. Plan

Once the context is loaded, the agent produces a step-by-step implementation plan (stored as a temporary workspace markdown file). It details files to be created, modified, or deleted.

3. Approve (Safe Mode)

The plan is presented to you in the TUI or CLI. In SAFE or TRUST mode, Andromity pauses and waits for you to review and click [Approve] or run /approve.

4. Build

The agent uses granular file tools (like edit_file or write_file) to apply code changes. It modifies only the exact ranges required, minimizing diffs.

5. Test

After applying changes, Andromity executes your project's test suite (such as pytest, npm test, or go test) via the shell to verify correctness.

6. Review

If tests pass, Andromity summarizes the modifications and shows a clean git diff. If tests fail, it reads the error stack trace, loops back to fix the bug, and re-runs the tests automatically.