5 specialized agents. 4 AI providers. 1 unified pipeline. Zero compromises.
---NexusSentry is a production-grade multi-agent orchestration system that replaces single-model AI with a coordinated hive of specialized agents β each an expert in its domain, each talking to the best available LLM for its role.
Where most AI tools give you one brain solving everything, NexusSentry gives you an engineering team: a decomposer, a planner, an executor, a QA scorer, a quality gatekeeper, and an observability integrator β all wired together with a self-correcting feedback loop that iterates until the output is actually good.
Without NexusSentry With NexusSentry
βββββββββββββββββ βββββββββββββββββββββββββββββββββββββββββ
User β GPT-4 β Result User β Scout β Architect β Builder
β β
Architect β Critic β Verifier β QA
β
Integrator β Tracer β Dashboard
"5 specialized agents. 4 AI providers. 12+ tool calls. Direct Integrator-to-Tracer observability pipeline. 1 human approval. Under 90 seconds."
| Feature | Details | |
|---|---|---|
| π | Integrator Agent | New agent after Critic β maps approved output directly to Agent Tracer for structured, real-time observability |
| π§ | Swarm Memory | Thread-safe shared context across all sub-tasks and agents |
| β‘ | Parallel Execution | Sub-tasks run concurrently via asyncio.gather β up to 4Γ faster |
| π | Enhanced Dashboard | Provider analytics, interactive Critic score trends, live agent graph |
| π | Smarter Fallback | 4-provider chain with automatic degradation β never a dead end |
| π | Full Mock Mode | Complete demo with zero API keys β no friction for evaluators |
Five agents. Each a specialist. Each talking to the best model for its job.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β NEXUSSENTRY SWARM β
β β
β π Scout ποΈ Architect π§ Builder β
β Task Decomposer Technical Planner Code Executor β
β ββ Gemini ββ OpenRouter ββ Auto β
β β
β β
Verifier π Critic π Integrator β
β QA Scorer Quality Gate Result Mapper β
β ββ Grok ββ Grok ββ Auto β Tracer β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Agent | Role | Responsibility | Provider |
|---|---|---|---|
| π Scout | Task Decomposer | Breaks a goal into 3β5 precise, actionable sub-tasks | π Gemini |
| ποΈ Architect | Technical Planner | Designs the execution plan for each sub-task | π OpenRouter |
| π§ Builder | Executor | Generates and runs code to fulfill the plan | π Auto |
| β Verifier | QA Scorer | Tests output against acceptance criteria with a numeric score | π§ Grok |
| π Critic | Quality Gate | Approves or rejects β feeds rejection reason back to Architect | π§ Grok |
| π Integrator | Result Mapper | Maps approved output and routes events directly to Agent Tracer | π Auto |
graph TB
User["π€ User<br/>(CLI / App)"]
subgraph ProviderLayer["π€ Multi-Provider AI Layer"]
Gemini["π Gemini"]
Grok["π§ Grok"]
OpenRouter["π OpenRouter"]
Anthropic["π€ Anthropic"]
end
subgraph AgentSwarm["π§ Agent Swarm"]
Scout["π Scout<br/>Task Decomposer"]
Architect["ποΈ Architect<br/>Technical Planner"]
Builder["π§ Builder<br/>Executor"]
QAVerifier["β
QA Verifier<br/>Quality Scorer"]
Critic["π Critic<br/>Quality Gate"]
Integrator["π Integrator<br/>Result Mapper"]
end
subgraph Observability["π Observability"]
Tracer["Agent Tracer<br/>JSONL Logs"]
Dashboard["Web Dashboard<br/>Real-Time UI"]
end
User -->|"goal"| Scout
Scout -->|"sub-tasks"| Architect
Architect -->|"plan"| Builder
Builder -->|"generated code"| QAVerifier
QAVerifier -->|"score + issues"| Critic
Critic -->|"approve β
"| User
Critic -->|"reject + feedback"| Architect
Critic -->|"approved output"| Integrator
Integrator -->|"mapped result"| Tracer
Scout -.->|"LLM call"| ProviderLayer
Architect -.->|"LLM call"| ProviderLayer
Critic -.->|"LLM call"| ProviderLayer
Scout -.->|"events"| Tracer
Architect -.->|"events"| Tracer
Builder -.->|"events"| Tracer
QAVerifier -.->|"events"| Tracer
Critic -.->|"events"| Tracer
Tracer -.->|"polls"| Dashboard
style ProviderLayer fill:#1a1030,stroke:#a855f7,stroke-width:2px
style AgentSwarm fill:#1a1040,stroke:#6366f1,stroke-width:2px
style Observability fill:#101830,stroke:#06b6d4,stroke-width:2px
The self-correcting loop is what separates NexusSentry from basic LLM wrappers. Every sub-task goes through up to 3 full iterations before being accepted or passed through.
sequenceDiagram
participant U as π€ User
participant S as π Scout
participant P as π€ Provider
participant A as ποΈ Architect
participant B as π§ Builder
participant Q as β
Verifier
participant C as π Critic
participant I as π Integrator
U->>S: Submit goal
S->>P: Decompose (via Gemini)
P-->>S: Sub-tasks JSON
S->>A: Sub-task 1
loop Max 3 attempts (retry if rejected)
A->>P: Plan (via OpenRouter)
P-->>A: Execution plan
A->>B: Send plan
B->>B: Generate code (LLM)
B->>Q: Submit for scoring
Q->>Q: Deterministic QA checks
Q-->>C: QA score + issues
C->>P: Review execution (via Grok)
P-->>C: Verdict
alt QA β₯ 70 AND Critic β₯ 72
C-->>U: β
Approved
C->>I: Pass approved output
I->>I: Map result to Tracer
else Score < threshold
C-->>A: β Rejected + QA+Critic feedback
Note over A: Next attempt with improvements
else All 3 attempts exhausted
C-->>U: βοΈ Best attempt (pass-through)
C->>I: Pass best-attempt output
I->>I: Map result to Tracer
end
end
No single provider is the best at everything. NexusSentry routes each agent to its optimal model β and falls back automatically when a provider is down.
graph TB
subgraph Agents["Agent Swarm"]
Scout["π Scout"]
Architect["ποΈ Architect"]
Critic["π Critic"]
Builder["π§ Builder"]
Integrator["π Integrator"]
end
Provider["π LLM Provider<br/>Auto-Router"]
Scout -->|"prefer: gemini"| Provider
Architect -->|"prefer: openrouter"| Provider
Critic -->|"prefer: grok"| Provider
Builder -->|"prefer: auto"| Provider
Integrator -->|"prefer: auto"| Provider
subgraph Backends["Available Backends"]
G["π Gemini<br/>gemini-2.0-flash"]
K["π§ Grok<br/>grok-3-mini-fast"]
O["π OpenRouter<br/>100+ models"]
A["π€ Anthropic<br/>claude-sonnet"]
M["π Mock<br/>Demo Mode"]
end
Provider -->|"priority 1"| G
Provider -->|"priority 2"| K
Provider -->|"priority 3"| O
Provider -->|"priority 4"| A
Provider -->|"no keys"| M
style Agents fill:#1a1040,stroke:#6366f1,stroke-width:2px
style Backends fill:#0d1a2d,stroke:#06b6d4,stroke-width:2px
style Provider fill:#2d1030,stroke:#a855f7,stroke-width:2px
If all providers are unavailable, Mock Mode activates automatically β the full demo still runs, every agent fires, the dashboard still populates. Zero dead demos.
- Python 3.11+
- At least ONE LLM API key (Gemini recommended β it's free)
git clone https://github.com/namanhere23/DevMatrix
cd DevMatrix
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env
# Open .env and drop in at least one API key| Provider | Link | Cost |
|---|---|---|
| π Gemini (recommended) | aistudio.google.com/apikey | Free tier |
| π§ Grok | console.x.ai | Free credits |
| π OpenRouter | openrouter.ai/keys | Pay-per-use |
| π€ Anthropic | console.anthropic.com | Pay-per-use |
# Interactive (recommended for first run)
python demo/run_demo.py
# Fully automated β great for live demos
python demo/run_demo.py --auto
# Custom task
python demo/run_demo.py --auto --goal "Refactor the auth module to use JWT"
# Direct
python -m nexussentry.main "Your goal here"The moment the swarm starts, a real-time dashboard opens at http://localhost:7777
ββββββββββββββββββββββββββββββββββββββββββββ
β NexusSentry Dashboard β LIVE β
β β
β Agents ββββββββββββββ 4/5 active β
β Tasks ββββββββββββββ 3/6 done β
β Score ββββββββββββββ 94 / 100 β
β β
β Scout β Architect β Builder β β
β Verifier β Critic β Integrator β β
ββββββββββββββββββββββββββββββββββββββββββββ
Features: live agent feed Β· task progress Β· approval counters Β· provider analytics Β· Critic score trend Β· architecture diagram
DevMatrix/
βββ nexussentry/
β βββ main.py # π― Swarm orchestrator β start here
β βββ providers/
β β βββ llm_provider.py # π Gemini / Grok / OpenRouter / Anthropic router
β βββ agents/
β β βββ scout.py # π Task decomposition β Gemini
β β βββ architect.py # ποΈ Technical planning β OpenRouter
β β βββ fixer.py # π§ Code execution β Auto
β β βββ critic.py # π Quality review β Grok
β β βββ integrator.py # π Result mapping β Agent Tracer
β βββ hitl/
β β βββ user_permission.py # π€ Human-in-the-loop gate
β βββ observability/
β β βββ tracer.py # π JSONL event log + provider tracking
β β βββ dashboard.py # π Zero-dependency HTTP server
β β βββ static/index.html # β¨ Real-time dashboard UI
β βββ utils/
β βββ response_cache.py # πΎ MD5-keyed LLM response cache
βββ demo/
β βββ run_demo.py # π¬ One-command demo runner
βββ .env.example # All provider keys, documented
βββ requirements.txt
βββ Containerfile # Docker-ready
βββ README.md
docker build -f Containerfile -t nexussentry .
docker run --env-file .env -p 7777:7777 nexussentry|
**π Multi-Provider AI Routing**
4 providers with agent-level preference and automatic fallback. No single point of failure.
π Self-Correcting Feedback Loop Critic rejects β sends specific feedback β Architect replans β up to 3 iterations before pass-through. π Integrator β Tracer Pipeline Every approved result is immediately mapped and routed to Agent Tracer β structured observability with zero manual wiring. π Real-Time Dashboard Zero-dependency HTTP server. Glassmorphism UI. No external services needed. |
**πΎ Response Caching**
MD5-keyed disk cache. API outage during a demo? Cached responses keep the show running.
β Deterministic QA HTML/CSS selector validation + error detection before Critic review β catches structural failures before LLM review. π Mock Mode Full swarm runs with zero API keys. Every agent fires, the dashboard populates, the loop completes. βοΈ Graceful Degradation Every component has a fallback path. Nothing crashes. The swarm always returns a result. |
ββββββββββββββββββββββββββββββββββββββββββββββ
β β
β 5 specialized agents β
β 4 LLM providers with auto-fallback β
β 12+ tool calls per task β
β 3 max self-correction iterations β
β 1 direct Integrator β Tracer hop β
β <90s end-to-end execution β
β 0 external services required β
β β
ββββββββββββββββββββββββββββββββββββββββββββββ