AI coding tools can lock us into one vendor, one model, or one workflow. Prices can change, providers can change, and context can get lost when switching between models. Most tools also give limited control over how code is planned, changed, tested, and reverted.
AI Dev Squad is a local-first agentic development system where we stay in control. We can choose the model, switch between AI providers, keep project context, and decide when agents are allowed to act.
The project uses:
- LangGraph for the workflow and agent orchestration
- Local tools for coding and testing
- Codex CLI as the default coding provider
- A local model provider placeholder as the second provider for offline mode later
- Streamlit as the future chat UI, included but not active yet
Build a small agent squad with three roles:
-
Orchestrator Agent
- Understands the user task
- Builds a simple execution plan
- Decides whether the next step is approval, development, or testing
-
Developer Agent
- Uses a coding provider to create or update code
- Starts with Codex CLI as the default provider
- Can later switch to a local model provider without changing the orchestration logic
-
Tester Agent
- Runs local test commands
- Returns a simple test summary and status
This repository contains a clean starter scaffold with:
- LangGraph workflow
- Agent classes
- Model router
- Codex provider wrapper
- Local provider (defaut local model: qwen2.5-coder:7b )
- Tool layer
- Streamlit UI
- Unit tests
ai-dev-squad/
├── README.md
├── requirements.txt
├── .env.example
├── langgraph.json
├── app/
│ ├── __init__.py
│ ├── main.py
│ ├── config/
│ │ ├── __init__.py
│ │ ├── settings.py
│ │ └── logging_config.py
│ ├── agents/
│ │ ├── __init__.py
│ │ ├── orchestrator.py
│ │ ├── developer.py
│ │ └── tester.py
│ ├── graph/
│ │ ├── __init__.py
│ │ ├── state.py
│ │ ├── nodes.py
│ │ ├── edges.py
│ │ └── workflow.py
│ ├── models/
│ │ ├── __init__.py
│ │ ├── base_provider.py
│ │ ├── model_router.py
│ │ ├── codex_provider.py
│ │ └── local_provider.py
│ ├── tools/
│ │ ├── __init__.py
│ │ ├── codex_tool.py
│ │ ├── test_runner.py
│ │ ├── file_tool.py
│ │ └── approval_tool.py
│ ├── services/
│ │ ├── __init__.py
│ │ ├── task_service.py
│ │ └── execution_service.py
│ ├── prompts/
│ │ ├── orchestrator_prompt.txt
│ │ ├── developer_prompt.txt
│ │ └── tester_prompt.txt
│ └── ui/
│ ├── __init__.py
│ ├── streamlit_app.py
│ └── components.py
├── tests/
│ ├── __init__.py
│ ├── test_orchestrator.py
│ ├── test_developer.py
│ ├── test_tester.py
│ ├── test_model_router.py
│ └── test_workflow.py
├── docs/
│ ├── architecture.md
│ ├── flow.md
│ ├── folder-structure.md
│ └── roadmap.md
└── scripts/
├── run_local.py
├── run_streamlit.py
└── demo_task.py
Main application package.
Configuration and logging setup.
Agent logic for Orchestrator, Developer, and Tester.
LangGraph state, nodes, edge routing, and workflow creation.
Model provider interface, router, Codex provider, and local model placeholder.
Low-level tool wrappers for approvals, file actions, Codex execution, and test execution.
Small helper services to keep the agent files clean.
Prompt templates. These are simple text files now, but they give you a clean place to keep agent instructions.
Future Streamlit UI layer. It is included in the project, but not active yet.
Unit tests for the main flow and components.
Extra documentation for architecture, flow, roadmap, and folder descriptions.
Convenience scripts for local runs.
The Developer Agent never talks directly to a specific provider.
Instead it calls the Model Router.
This keeps the design clean:
CodexProvideris the default providerLocalProvideris the offline placeholder- You can add new providers later without changing the graph flow
The default provider is Codex.
The Codex provider assumes:
- Codex CLI is installed
- You are already signed in
- The
codexcommand is available on your machine
If not, the provider returns a safe error message instead of changing files.
The project also includes a local provider placeholder.
The code comments mention a future option such as:
qwen2.5-coder:7bvia Ollama
This provider is intentionally simple for now. It is here to make the switch easy later.
This project is designed with a hard approval gate:
- no development step without approval
- no test step without approval
For now the approval value is passed in state.
Later the Streamlit UI can collect it from the user.
cd ai-dev-squadpython3 -m venv .venvsource .venv/bin/activatepip install -r requirements.txtcp .env.example .envcodex login statusExpected result:
Logged in using ChatGPT
Example values:
APP_ENV=local
APP_NAME=AI Dev Squad
DEFAULT_MODEL_PROVIDER=codex
CODEX_CLI_COMMAND=codex
LOCAL_MODEL_NAME=qwen2.5-coder:7b
DEFAULT_TEST_COMMAND=pytest -q
ENABLE_MOCK_TOOLS=falsepython3 scripts/run_local.pyThis will:
- build the workflow state
- run the Orchestrator
- run approval logic
- call the Developer Agent
- call the Tester Agent
- print the result in the console
pytestpip install -U "langgraph-cli[inmem]"LANGSMITH_API_KEY=your_pat_token_here
LANGSMITH_TRACING=trueIf preferred, tracing can also be turned off:
LANGSMITH_TRACING=falseExample:
{
"dependencies": ["."],
"graphs": {
"agent": "./app/graph/workflow.py:graph"
},
"env": ".env"
}langgraph devExpected output includes:
- local API URL
- Studio UI URL
- API docs URL
Open the Studio URL shown in the terminal, for example:
https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024
In Studio you can:
- view the graph
- run the flow
- inspect node state
- inspect messages
- inspect approval status
- inspect development and test results
The Streamlit UI files are included but not active yet.
When you want to explore them later:
streamlit run app/ui/streamlit_app.py- This scaffold is intentionally simple
- Real Codex use depends on local CLI setup
- The local model path is a placeholder for the next phase
- LangGraph Studio is useful for graph debugging and state inspection
- Streamlit will be better later for the real user-facing approval flow
- Add real approval capture from Streamlit
- Improve task-aware test logic
- Add richer result and history tracking
- Add a real local model provider
- Add ChatGPT + MCP integration later This repository is under active development, and the docs will continue to evolve with each iteration.


