Skip to content

About

AgentFabric is a governed, observable, injection-resistant multi-agent AI workforce platform built on Archestra with MCP, SQL tool firewall policies, and Dual-LLM quarantine sanitization.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

ย 

History

18 Commits

Folders and files

Repository files navigation

๐Ÿงต AgentFabric โ€” Enterprise AI Workforce Control Plane

Built for the 2 Fast 2 MCP Hackathon Powered by Archestra.ai


๐Ÿš€ What Is AgentFabric?

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.


๐Ÿ“‘ Table of Contents


๐ŸŒ Deployed Project

You can access the live version of AgentFabric here:

๐Ÿš€ Access Live Demo


๐Ÿ—๏ธ Visual Architecture

๐Ÿ”ท Core System Architecture

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

Loading

๐Ÿ“Š Observability Architecture

flowchart LR

    Archestra["Archestra Metrics"]
    Prometheus["Prometheus Scraper"]
    Grafana["Grafana Dashboards"]

    Archestra --> Prometheus
    Prometheus --> Grafana
Loading

๐Ÿข AI Workforce Model

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

๐Ÿ”„ Dynamic Agent Discovery

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

๐Ÿ›ก AI Safety Architecture

AgentFabric implements defense-in-depth AI governance.


๐Ÿ” Layer 1 โ€” SQL Tool Firewall

Using Archestra Tool Call Policies:

Allowed:

  • SELECT

Blocked:

  • DROP
  • DELETE
  • UPDATE
  • INSERT
  • ALTER

This ensures:

  • Read-only analytics
  • No destructive operations
  • No accidental schema modification
  • No LLM hallucination damage

Tool calls are evaluated before execution.


๐Ÿง  Layer 2 โ€” Dual-LLM Quarantine Sanitization

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)

Benefits:

  • Prevents prompt injection via database rows
  • Blocks malicious embedded instructions
  • Strips unsafe content
  • Ensures only factual summaries reach reasoning logic

๐Ÿท Layer 3 โ€” Trusted vs Untrusted Result Classification

Tool outputs are explicitly marked:

  • Trusted
  • Untrusted
  • Sanitized via Dual-LLM

This prevents blind tool result usage.


๐ŸŽฏ Layer 4 โ€” Role-Based Tool Assignment

Each agent only receives required tools:

Agent DB Access
HR Read-only
Finance Read-only
Executive No direct DB execution

Least-privilege architecture.


๐Ÿ” Enterprise Governance Capabilities

โœ… MCP Registry

  • Remote & self-hosted MCP servers
  • Fine-grained tool assignment
  • Credential isolation per service

โœ… Tool Policies (Execution Governance)

  • Conditional allow/block rules
  • Context-aware execution
  • SQL firewall enforcement
  • Blocked query metrics tracking

โœ… Dual-LLM Isolation

  • Quarantined LLM for unsafe tool data
  • Structured Q&A sanitization
  • Safe summary generation
  • Injection-resistant architecture

โœ… LLM Configuration Abstraction

  • Centralized provider management
  • No API keys in frontend
  • Provider switching without code changes

โœ… A2A Gateway

  • Secure token-based communication
  • Standardized agent interoperability
  • No direct client-to-LLM calls

โœ… Archestra Platform APIs

  • Dynamic agent discovery
  • Agent metadata loading
  • Conversation history retrieval
  • Control-plane driven UI rendering

๐Ÿ“Š Production Observability

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.


๐Ÿ“ธ Screenshots

๐Ÿ–ฅ Workforce UI

UI

๐Ÿ’ฌ Agent Conversation

Chat

๐Ÿ“Š Observability

Grafana


๐Ÿ›  Tech Stack

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

๐Ÿš€ Quick Start

git clone https://github.com/TheKumaara/AgentFabric.git
cd agentfabric
npm install

Setup Database (Demo Only)

PostgreSQL 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:seed

Configure Archestra

ARCHESTRA_API_KEY=
ARCHESTRA_A2A_GATEWAY_TOKEN=
ARCHESTRA_BASE_API_URL=
npm run dev

๐Ÿ“š What I Learned

๐Ÿง  1. Agents as Protocol-Driven Services

A2A enables structured delegation across agents.


๐Ÿ”„ 2. Platform-Driven Agent Discovery

Agents should live in the control plane โ€” not in UI code.

Dynamic discovery enables scalable workforce design.


๐Ÿ” 3. Tool Governance Is Critical

Conditional SQL firewall rules protect data integrity.


๐Ÿ›ก 4. Treat Tool Output as Adversarial

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.


๐Ÿ“Š 5. Observability Transforms AI Into Infrastructure

Metrics convert AI from demo to production system.


๐Ÿ— 6. Enterprise Thinking > Prompt Engineering

Building AgentFabric required:

  • Governance
  • Role isolation
  • Injection resistance
  • Cost monitoring
  • Structured orchestration

๐Ÿ”ฎ Future Enhancements

  • Multi-tenant isolation
  • Cost governance engine
  • Intelligent model routing
  • SLA monitoring
  • Dynamic agent builder UI
  • RAG integration via Knowledge Graph MCP

๐Ÿงต Final Philosophy

AgentFabric is not an AI chatbot. It is a governed, observable, injection-resistant enterprise AI workforce infrastructure layer.


About

AgentFabric is a governed, observable, injection-resistant multi-agent AI workforce platform built on Archestra with MCP, SQL tool firewall policies, and Dual-LLM quarantine sanitization.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages