Built for the 2 Fast 2 MCP Hackathon Powered by Archestra.ai
AgentFabric is a governed, observable, injection-resistant multi-agent AI workforce platform.
It simulates a real enterprise where departments operate as intelligent AI agents โ securely orchestrated through Archestra and connected to live data via MCP.
โก Agents are dynamically loaded from Archestra โ not hardcoded in the frontend.
The homepage:
- Fetches available agents via Archestra Platform APIs
- Dynamically renders agent cards
- Loads agent metadata in real-time
- Allows workforce expansion without frontend redeploy
This mirrors real enterprise AI control planes.
This is not a chatbot demo. This is enterprise AI infrastructure.
- ๏ฟฝ Deployed Project
- ๏ฟฝ๐๏ธ Visual Architecture
- ๐ข AI Workforce Model
- ๐ก AI Safety Architecture
- ๐ Enterprise Governance Capabilities
- ๐ Production Observability
- ๐ธ Screenshots
- ๐ Tech Stack
- ๐ Quick Start
- ๐ What I Learned
- ๐ฎ Future Enhancements
- ๐งต Final Philosophy
You can access the live version of AgentFabric here:
flowchart TD
User["End User"]
UI["AgentFabric UI<br/>Next.js"]
API["Secure Backend Proxy<br/>Next.js API Routes"]
ArchestraAPI["Archestra Platform APIs"]
Gateway["A2A Gateway<br/>Archestra"]
Exec["Executive Manager Agent"]
HR["HR Agent"]
Finance["Finance Agent"]
MCPRegistry["MCP Registry"]
PostgresMCP["PostgreSQL MCP Server<br/>Docker"]
Metrics["Archestra Metrics<br/>"]
Prometheus["Prometheus"]
Grafana["Grafana Dashboards"]
User --> UI
UI --> API
API --> ArchestraAPI
API --> Gateway
Gateway --> Exec
Exec --> HR
Exec --> Finance
HR --> MCPRegistry
Finance --> MCPRegistry
MCPRegistry --> PostgresMCP
Gateway --> Metrics
Metrics --> Prometheus
Prometheus --> Grafana
flowchart LR
Archestra["Archestra Metrics"]
Prometheus["Prometheus Scraper"]
Grafana["Grafana Dashboards"]
Archestra --> Prometheus
Prometheus --> Grafana
| Agent | Responsibility | Capabilities |
|---|---|---|
| ๐ง Executive Manager | Orchestration | Delegation, summaries |
| ๐ฅ HR Agent | Employee intelligence | Org data, leave insights |
| ๐ฐ Finance Agent | Financial analytics | Budgets, expenses |
Each agent:
- Is registered in Archestra
- Is dynamically discovered via Archestra APIs
- Runs remotely on Archestra
- Uses controlled MCP tools
- Operates under policy enforcement
- Is fully observable via metrics
AgentFabric does not define agents in the UI.
Instead:
- Agents live in Archestra (control plane)
- Frontend fetches agent metadata via API
- New agents appear automatically
- No frontend redeploy required
This enables:
- Workforce expansion
- Multi-agent scalability
- Platform-driven architecture
- Real enterprise-style control plane separation
AgentFabric implements defense-in-depth AI governance.
Using Archestra Tool Call Policies:
SELECT
DROPDELETEUPDATEINSERTALTER
This ensures:
- Read-only analytics
- No destructive operations
- No accidental schema modification
- No LLM hallucination damage
Tool calls are evaluated before execution.
All PostgreSQL execution results are treated as untrusted input.
Instead of feeding raw tool output directly to the primary LLM:
Tool Result
โ
Quarantined LLM (Restricted)
โ
Structured Q&A
โ
Sanitized Summary
โ
Main LLM (Privileged)
- Prevents prompt injection via database rows
- Blocks malicious embedded instructions
- Strips unsafe content
- Ensures only factual summaries reach reasoning logic
Tool outputs are explicitly marked:
- Trusted
- Untrusted
- Sanitized via Dual-LLM
This prevents blind tool result usage.
Each agent only receives required tools:
| Agent | DB Access |
|---|---|
| HR | Read-only |
| Finance | Read-only |
| Executive | No direct DB execution |
Least-privilege architecture.
- Remote & self-hosted MCP servers
- Fine-grained tool assignment
- Credential isolation per service
- Conditional allow/block rules
- Context-aware execution
- SQL firewall enforcement
- Blocked query metrics tracking
- Quarantined LLM for unsafe tool data
- Structured Q&A sanitization
- Safe summary generation
- Injection-resistant architecture
- Centralized provider management
- No API keys in frontend
- Provider switching without code changes
- Secure token-based communication
- Standardized agent interoperability
- No direct client-to-LLM calls
- Dynamic agent discovery
- Agent metadata loading
- Conversation history retrieval
- Control-plane driven UI rendering
Prometheus + Grafana track:
- ๐ข Total Tokens Used
- ๐ค Tokens Per Agent
- ๐ฐ Cost Per Agent
- โก Tokens Per Second
- โฑ P95 Latency
- ๐จ Blocked Tool Attempts (SQL Firewall)
- ๐ Dual-LLM Sanitization Activity
- ๐ฅ System Health Metrics
AI becomes measurable infrastructure.
| Layer | Technology |
|---|---|
| Frontend | Next.js |
| Backend | Next.js API Routes |
| Protocol | A2A + MCP |
| AI Platform | Archestra |
| Database | PostgreSQL |
| Observability | Prometheus + Grafana |
| SDK | @a2a-js/sdk |
git clone https://github.com/TheKumaara/AgentFabric.git
cd agentfabric
npm installPostgreSQL is required only for the demo use case. The project does not break without it.
Add DATABASE_URL in .env:
createdb agentfabric
npm run db:push
npm run db:seedARCHESTRA_API_KEY=
ARCHESTRA_A2A_GATEWAY_TOKEN=
ARCHESTRA_BASE_API_URL=
npm run devA2A enables structured delegation across agents.
Agents should live in the control plane โ not in UI code.
Dynamic discovery enables scalable workforce design.
Conditional SQL firewall rules protect data integrity.
Dual-LLM quarantine taught me:
- Tool outputs can contain injection
- Data can poison prompts
- Isolation layers are required
- Sanitization must precede reasoning
Enterprise AI requires layered safety.
Metrics convert AI from demo to production system.
Building AgentFabric required:
- Governance
- Role isolation
- Injection resistance
- Cost monitoring
- Structured orchestration
- Multi-tenant isolation
- Cost governance engine
- Intelligent model routing
- SLA monitoring
- Dynamic agent builder UI
- RAG integration via Knowledge Graph MCP
AgentFabric is not an AI chatbot. It is a governed, observable, injection-resistant enterprise AI workforce infrastructure layer.


