A sophisticated AI agent designed to help architect, plan, and research software projects. It combines the power of Large Language Models (LLMs) with real-time web research capabilities and a developer-centric terminal interface.
- 🧠 Intelligent Research: Leverages the Tavily API to perform deep web searches and extract relevant content to answer complex architectural queries.
- 💬 Conversational Interface: A robust Terminal User Interface (TUI) built with Textual, offering a smooth, chat-like experience directly in your terminal.
- 🏗️ Specialized Knowledge: Equipped with a custom system prompt designed for high-level software architecture and project planning advice.
- 🔍 Observable: Fully integrated with LangSmith for tracing, debugging, and monitoring agent performance.
- 💾 State Persistence: Uses
InMemorySaverto maintain conversation context within a session.
- AI Core: LangChain & LangGraph
- LLM: OpenAI GPT-4
- Tools: Tavily Search API
- UI: Textual (Python TUI)
- Observability: LangSmith
The agent is built as a graph-based application using LangGraph:
- Input: User queries are captured via the Textual TUI.
- Processing: The LangChain agent (OpenAI GPT-4) analyzes the request.
- Tool Usage: If research is needed, the agent calls
tavily_searchortavily_extract. - Response: The agent synthesizes findings and generates a markdown-formatted response.
- Output: The response is streamed back to the TUI in real-time.
- Python 3.13+
- Docker (optional, for containerized execution)
Create a .env file in the root directory with the following keys:
| Variable | Description |
|---|---|
OPENAI_API_KEY |
Required for the LLM (GPT-4). |
TAVILY_API_KEY |
Required for web search and extraction capabilities. |
LANGCHAIN_API_KEY |
Required for LangSmith observability. |
LANGCHAIN_TRACING_V2 |
Set to true to enable LangSmith tracing. |
LANGCHAIN_PROJECT |
(Optional) Project name for LangSmith. |
-
Clone the repository:
git clone https://github.com/andrecodea/project-architect-agent.git cd project-architect-agent -
Install dependencies:
pip install . -
Run the agent:
python agent.py
-
Build and run with Docker Compose:
docker compose up
Note: The agent runs in interactive mode, so you must have a TTY attached.
-
To stop: Press
Ctrl+C.