Inspiration
Current AI coding tools treat software development as a single-agent chat — one AI trying to do everything at once. But real engineering teams don’t work that way. A PM gathers requirements, backend and frontend engineers align on APIs before writing code, and then they build against a shared contract.
We wanted to see if we could model that collaborative workflow with AI agents — and give a solo developer the structure and output of a small team.
What it does
OPA is a VS Code sidebar extension where multiple agents collaborate to build your app:
- Master Agent gathers requirements through conversation and coordinates the system
- Backend Agent proposes API contracts and builds server logic
- Frontend Agent critiques APIs from a UX perspective and builds the UI
The system follows a structured workflow:
Planning → Contract Negotiation → Build → Iteration
During contract negotiation, the Backend and Frontend agents actively align on API design — catching issues like inconsistent fields or missing error handling before any code is written.
You can also see everything happening in real time through an activity feed — file reads, edits, and commands — so the system isn’t a black box.
How we built it
- VS Code Extension with a webview sidebar for the UI
- Node.js / Express backend running locally to orchestrate agents
- Bidirectional SSE protocol for tool execution
- backend streams events
- extension executes tools (read/write files, run commands)
- results are sent back to the backend
- backend streams events
- Local TF-IDF RAG system for conversation memory
- no vector DB or embeddings API
- retrieves relevant history using cosine similarity
- no vector DB or embeddings API
- Role-scoped context so each agent only sees what it needs
- Phase-gated tool access so agents can only modify files during Build and Iteration
Challenges we ran into
Agents going in circles on bugs
Multi-agent handoffs lost context. We solved this by letting the Master Agent handle debugging end-to-end.Rate limits and token usage
Multiple agent calls per step quickly hit limits. We implemented smarter retry logic using server-provided timing instead of blind backoff.Incorrect file paths
Agents would create files in the wrong place when given relative paths. Fixed with scoped workspace views and stricter path handling.Missing structured signals
Models sometimes wrote phase signals in text instead of structured output. We added fallback detection based on natural language.
Accomplishments that we're proud of
Contract negotiation actually works
The Frontend agent catches real issues (like missing fields or API inconsistencies), and the Backend agent adapts before any code is written.Built a lightweight RAG system from scratch
A full TF-IDF retrieval system in ~100 lines with no dependencies.Transparent agent execution
The activity feed shows exactly what agents are doing — no black box.Model-agnostic architecture
Works across different models without changing the system.
What we learned
Multi-agent systems are best for structure, not everything
They work well for planning and coordination, but debugging is more effective with a single agent and full context.Architecture matters more than prompting
Controlling context, roles, and tool access had a bigger impact than prompt tweaks.Token management is the real challenge
RAG, scoped context, and history compression were critical to making the system usable.
What's next for OPA - One Person Army
- Migrate to newer APIs for better reasoning and efficiency
- Add a code review agent to catch issues after build
- Enable parallel agent execution for faster builds
- Introduce persistent project memory across sessions
- Expand roles (e.g., DevOps, QA) for a more complete workflow
Built With
- express.js
- node.js
- openai-api
- typescript
Log in or sign up for Devpost to join the conversation.