Skip to content

Latest commit

ย 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โšก AgentForge

Build AI Systems That
Think Beyond One Prompt.

Plan. Retrieve. Reason. Collaborate. Execute. Verify.

AgentForge is an extensible multi-agent AI platform built around
LangGraph, hybrid RAG, knowledge graphs, MCP tools,
human-in-the-loop workflows, persistent state, and real-time streaming.

Why AgentForge โ€ข Architecture โ€ข Capabilities โ€ข Quick Start โ€ข Roadmap


โœฆ The Idea

Most AI applications still look like this:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   USER   โ”‚ โ”€โ”€โ”€โ–บ โ”‚   LLM   โ”‚ โ”€โ”€โ”€โ–บ โ”‚  ANSWER  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

AgentForge is built around a different execution model:

                         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                         โ”‚     USER     โ”‚
                         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                โ”‚
                                โ–ผ
                       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                       โ”‚ INTENT ROUTER   โ”‚
                       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                               โ”‚
                               โ–ผ
                       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                       โ”‚   SUPERVISOR    โ”‚
                       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                               โ”‚
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ”‚                โ”‚                โ”‚
              โ–ผ                โ–ผ                โ–ผ
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚ WEB/RAG  โ”‚     โ”‚  GRAPH   โ”‚     โ”‚   MATH   โ”‚
        โ”‚  AGENT   โ”‚     โ”‚  AGENT   โ”‚     โ”‚  AGENT   โ”‚
        โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜
              โ”‚                โ”‚                โ”‚
              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                               โ–ผ
                     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                     โ”‚ TOOLS / MCP      โ”‚
                     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ–ผ
                     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                     โ”‚ HUMAN APPROVAL   โ”‚
                     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ–ผ
                     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                     โ”‚  EVALUATION      โ”‚
                     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ–ผ
                         FINAL ANSWER

The current implementation already includes a 12-agent LangGraph workflow, routing, RAG, knowledge-graph reasoning, web retrieval, HITL, persistence, and evaluation.


๐Ÿš€ Why AgentForge?

AgentForge is built for people who want to move from:

"LLM wrapper"

to:

"AI system."

It combines multiple AI engineering patterns in one extensible foundation:

๐Ÿง 

Agent Orchestration

Supervisor-driven LangGraph workflows with specialized reasoning stages.

๐Ÿ”Ž

Hybrid RAG

Vector retrieval + lexical retrieval + fusion + reranking.

๐Ÿ•ธ๏ธ

Knowledge Graph

Relationship-aware reasoning over local knowledge.

๐Ÿ”Œ

MCP

External tool integration with local fallbacks.

๐Ÿง‘โ€โš–๏ธ

HITL

Pause workflows and require explicit approval.

๐Ÿ’พ

Persistent State

Checkpointed graph state + durable conversations.

โšก

Streaming

Real-time FastAPI streaming endpoints.

๐Ÿ“Š

Observability

Prometheus + Grafana + health/readiness probes.

๐Ÿ”

Authentication

User-scoped authenticated workflows.

These capabilities are already represented in the repository's current implementation and documentation.


๐Ÿงฉ 12-Stage Intelligence Pipeline

AgentForge currently orchestrates:

01  Safety
02  Intent Routing
03  Clarification
04  Query Rewriting
05  Recency Guard
06  Human Approval Gate
07  Web Retrieval
08  Knowledge Graph Reasoning
09  RAG
10  Mathematical Reasoning
11  Response Generation
12  Evaluation

Why this matters

A user does not need to know which AI mechanism is appropriate.

AgentForge decides:

"What kind of reasoning does this task require?"
                โ†“
"Which information sources are relevant?"
                โ†“
"Which tools should be used?"
                โ†“
"Does this require approval?"
                โ†“
"How should the answer be verified?"

๐Ÿ” Retrieval That Goes Beyond Vector Search

AgentForge's local RAG pipeline combines multiple retrieval strategies:

                   QUERY
                     โ”‚
          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
          โ–ผ                     โ–ผ
   Semantic Retrieval      Lexical Retrieval
      (Vector)                  (BM25)
          โ”‚                     โ”‚
          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                     โ–ผ
              Rank Fusion
                     โ”‚
                     โ–ผ
                Reranking
                     โ”‚
                     โ–ผ
             Grounded Context

The current Chroma-based pipeline supports vector retrieval, lexical ranking, Reciprocal Rank Fusion, and optional LLM reranking.


๐Ÿ•ธ๏ธ Knowledge Graph Reasoning

Not every question is semantic.

Some questions are about relationships.

AgentForge provides a dedicated graph-oriented retrieval path:

Documents
    โ†“
Graph-RAG Store
    โ†“
Relationship Retrieval
    โ†“
NetworkX Reasoning
    โ†“
RAG Grounding
    โ†“
Answer

This is designed for relationship-style local queries and uses a separate graph-RAG ingestion path.


๐Ÿ”Œ MCP โ€” Tool Connectivity

AgentForge supports MCP-backed tools through a dedicated bridge architecture.

             Agent
               โ”‚
               โ–ผ
          MCP Bridge
               โ”‚
               โ–ผ
         MCP Tool Server
           โ•ฑ         โ•ฒ
          โ–ผ           โ–ผ
      Web Search   Calculator

The current implementation also provides local fallbacks when MCP is unavailable.


๐Ÿ›ก๏ธ Human-in-the-Loop

AI does not have to blindly continue every workflow.

For supported tasks:

        Agent
          โ”‚
          โ–ผ
      Proposed
       Action
          โ”‚
     โ”Œโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”
     โ–ผ         โ–ผ
  APPROVE    REJECT
     โ”‚         โ”‚
     โ–ผ         โ–ผ
 CONTINUE     STOP

AgentForge persists HITL decisions with user/thread context for auditing.

๐Ÿ’พ Persistent Intelligence

AgentForge isn't designed around a disposable request.

LangGraph Checkpointing

Graph State
     โ†“
Checkpoint
     โ†“
Resume

Conversation Store

User
 โ†“
Thread
 โ†“
Messages
 โ†“
Metadata
 โ†“
Audit

The documented persistence layer includes PostgreSQL checkpointer tables, conversation storage, users, and HITL events.


โšก Real-Time by Design

API

POST /invoke
POST /stream

Operational Endpoints

GET /healthz
GET /readyz
GET /metrics

Persistence

GET /store/threads
GET /store/{thread_id}
POST /feedback

The project also exposes authenticated registration/login and HITL audit endpoints.


๐Ÿ“Š Built-In Observability

AgentForge ships with:

FastAPI
   โ”‚
   โ–ผ
/metrics
   โ”‚
   โ–ผ
Prometheus
   โ”‚
   โ–ผ
Grafana

You can monitor:

  • request rate
  • 5xx error rate
  • P95 latency
  • traffic by endpoint
  • status-code distribution

๐Ÿ—๏ธ Architecture at a Glance

                         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                         โ”‚       USER        โ”‚
                         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                   โ”‚
                                   โ–ผ
                         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                         โ”‚      FASTAPI      โ”‚
                         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                   โ”‚
                                   โ–ผ
                         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                         โ”‚   INTENT ROUTER   โ”‚
                         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                   โ”‚
                                   โ–ผ
                         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                         โ”‚     SUPERVISOR    โ”‚
                         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                   โ”‚
                  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                  โ”‚                โ”‚                โ”‚
                  โ–ผ                โ–ผ                โ–ผ
             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
             โ”‚   WEB   โ”‚      โ”‚   RAG   โ”‚      โ”‚  GRAPH  โ”‚
             โ”‚  AGENT  โ”‚      โ”‚  AGENT  โ”‚      โ”‚  AGENT  โ”‚
             โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜
                  โ”‚                โ”‚                โ”‚
                  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                   โ”‚
                                   โ–ผ
                         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                         โ”‚    MCP / TOOLS    โ”‚
                         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                   โ”‚
                                   โ–ผ
                         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                         โ”‚    HITL GATE      โ”‚
                         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                   โ”‚
                                   โ–ผ
                         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                         โ”‚    EVALUATION     โ”‚
                         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                   โ”‚
                                   โ–ผ
                         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                         โ”‚  FINAL RESPONSE   โ”‚
                         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿงฐ Stack

Layer Technology
๐Ÿ Backend Python
โšก API FastAPI
๐Ÿง  Orchestration LangGraph
๐Ÿ–ฅ๏ธ UI Streamlit
๐Ÿ˜ Persistence PostgreSQL
๐Ÿ”Ž RAG ChromaDB
๐Ÿ•ธ๏ธ Graph NetworkX
๐Ÿ”Œ Tools MCP
โšก Cache Redis / in-memory fallback
๐Ÿ“ˆ Monitoring Prometheus + Grafana
๐Ÿณ Containers Docker
โ˜ธ๏ธ Deployment Kubernetes
๐Ÿ” CI/CD GitHub Actions

๐Ÿ“ Repository Structure

AgentForge/
โ”‚
โ”œโ”€โ”€ agent/                 # AI orchestration + agents + tools
โ”œโ”€โ”€ client/                # Python client
โ”œโ”€โ”€ service/               # FastAPI service + persistence
โ”œโ”€โ”€ schema/                # Request / response schemas
โ”œโ”€โ”€ scripts/               # RAG ingestion
โ”œโ”€โ”€ docs/                  # Architecture documentation
โ”œโ”€โ”€ docker/                # Container definitions
โ”œโ”€โ”€ k8s/                   # Kubernetes manifests
โ”œโ”€โ”€ monitoring/            # Prometheus configuration
โ”œโ”€โ”€ media/                 # Architecture assets
โ”‚
โ”œโ”€โ”€ compose.yaml
โ”œโ”€โ”€ run_service.py
โ”œโ”€โ”€ run_client.py
โ”œโ”€โ”€ streamlit_app.py
โ”œโ”€โ”€ requirements.txt
โ””โ”€โ”€ README.md

The current repository separates orchestration, tools, local RAG, graph RAG, persistence, service APIs, monitoring, and deployment.


๐Ÿงช CI/CD

The repository currently includes:

Continuous Integration

  • Python tests
  • Docker build verification
  • push/PR triggers

Continuous Delivery

  • version-tag releases
  • Docker image publishing
  • manual dispatch

These workflows are already documented in the repository.


๐Ÿš€ Quick Start

Clone

git clone https://github.com/Roshanrameshhub/AgentForge.git
cd AgentForge

Install

pip install -r requirements.txt

Start API

python run_service.py

Start UI

streamlit run streamlit_app.py

Optional full infrastructure

docker compose up -d --build

The documented local stack includes FastAPI, Streamlit, Prometheus, and Grafana.


๐Ÿ“š Feed AgentForge Your Own Knowledge

Place PDFs inside:

rag_docs/

Run:

python scripts/ingestion/ingest_local_rag_pdfs.py \
  --pdf-dir rag_docs \
  --reset

Then ask:

local: summarize the uploaded documents

For graph-oriented documents:

graph_rag_docs/
python scripts/ingestion/ingest_graph_rag_pdfs.py \
  --pdf-dir graph_rag_docs \
  --reset

๐ŸŒŒ Roadmap

AgentForge is evolving toward a broader autonomous AI workbench.

โœ… Foundation

  • LangGraph supervisor
  • Multi-agent workflow
  • Hybrid RAG
  • Knowledge graph reasoning
  • MCP tools
  • Human-in-the-loop
  • Persistent graph state
  • Conversation persistence
  • Streaming
  • Monitoring
  • Authentication

๐Ÿšง Intelligence

  • Dynamic task planning
  • Parallel agent execution
  • Long-term memory
  • Context compression
  • Agent verification
  • Self-correction
  • Better evaluation
  • Advanced retrieval

๐Ÿ”ฎ Next Generation

  • Multimodal AI
  • Realtime voice
  • Computer-use workflows
  • Expanded MCP ecosystem
  • Agent/plugin marketplace
  • Autonomous multi-step execution

The existing codebase already provides the supervisor, retrieval, HITL, persistence, MCP, and monitoring foundations on which these capabilities can evolve.


โš ๏ธ Current Limitations

The current implementation is strong as an orchestration foundation but is still evolving.

Known limitations include:

  • heuristic evaluation rather than complete factual verification
  • clarification requiring a subsequent user turn
  • possible routing errors for ambiguous inputs
  • retrieval quality depending on ingestion, embeddings, chunking, and reranking quality

๐ŸŽฏ What AgentForge Is For

AgentForge can serve as a foundation for building:

Research Agents
Developer Copilots
Knowledge Assistants
Document Intelligence
Enterprise AI Workflows
Autonomous Task Systems
Multi-Agent Applications

The underlying goal is simple:

Don't build another chatbot. Build a system that can reason through work.


๐Ÿค Contributing

Contributions are welcome across:

  • new agents
  • retrieval strategies
  • MCP integrations
  • security
  • evaluation
  • observability
  • agent state
  • multimodal workflows
  • performance optimization

โš–๏ธ License

AgentForge is distributed under the MIT License.

See LICENSE for the full terms.

This project is derived from an MIT-licensed open-source foundation and has been renamed and substantially extended as AgentForge. Original license and copyright notices are retained.


โšก AgentForge

From prompts โ†’ to reasoning โ†’ to autonomous workflows.

The orchestration layer for the next generation of AI applications.

About

Build autonomous AI workflows with multi-agent orchestration, intelligent routing, hybrid RAG, knowledge graphs, MCP tools, persistent memory, and human-in-the-loop execution.

Topics

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages