Forge Agent is a terminal-first coding assistant for a single local repository. It uses Anthropic tool calling to inspect files, edit code, and search a Markdown knowledge base without pretending to be a full IDE replacement.
This project is positioned as a compact portfolio build: small enough to understand end to end, but structured enough to demonstrate tool-driven agent design, prompt orchestration, workspace safety, and retrieval-backed context.
- Runs a conversational coding agent in the terminal
- Gives the model structured tools for reading, listing, writing, and editing files
- Restricts file operations to the current workspace
- Searches project docs from
docs/ - Supports local slash commands for help, reset, and transcript export
- Supports two documentation modes:
- Weaviate semantic search when the local vector stack is running
- Local Markdown fallback search when Weaviate is unavailable
- Python
- Anthropic Messages API
- Pydantic tool schemas
- Optional Weaviate + Transformers inference for vector search
main.py- interactive agent looptools.py- tool definitions and workspace-safe file operationsrag.py- vector search integration plus local Markdown retrieval fallbackindex_doc.py- documentation indexing entry point for Weaviatedocs/- project knowledge base used by the agentsnake-game/- a small side experiment kept as an example artifact
-
Create a virtual environment and install dependencies:
pip install -r requirements.txt
-
Create your environment file:
copy .env.example .env
-
Add your Anthropic API key to
.env:ANTHROPIC_API_KEY=your_key_here
-
Start the agent:
python main.py
/helpshows the local command list/clearresets the active chat state/saveexports the current chat transcript tosessions/
The agent can search docs/ without any extra services, but semantic search gets better if you run the local Weaviate stack.
-
Start Weaviate:
docker-compose up -d
-
Index the documentation:
python index_doc.py --clear
If Weaviate is down, search_documentation automatically falls back to local Markdown ranking.
Summarize the architecture of this repositoryList the Python files and explain what looks unfinishedCreate a new docs/setup-notes.md file with onboarding stepsSearch the documentation for the prompt strategyRefactor the file tools so they do not write outside the repo
- The scope is honest. It is a local coding assistant, not a fake autonomous platform.
- The architecture is inspectable. The full loop fits in a handful of files.
- The tradeoffs are visible. You can see how prompt design, tool schemas, and retrieval behavior interact.
- The safety model is simple but real. File writes are workspace-scoped.
- The default model is configurable with
ANTHROPIC_MODEL. - The docs in
docs/are intentionally project-specific so retrieval stays relevant. - The repo still includes a small game/demo artifact, but it is now clearly separated from the core agent.