Skip to content

persys-dev/intelligence-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AgentForge

A Modular AI Agent Platform for Knowledge, Automation, and Infrastructure Operations

Version: 1.0


Executive Summary

AgentForge is a production-oriented AI Agent Platform designed to serve as a foundation for building intelligent assistants, automation systems, infrastructure operators, and knowledge workers.

Unlike traditional Retrieval-Augmented Generation (RAG) systems that focus exclusively on document retrieval and question answering, AgentForge treats RAG as a tool within a larger agent ecosystem.

The platform provides:

  • Agent execution runtime
  • Tool orchestration
  • Memory systems
  • Knowledge management
  • Workflow execution
  • Human approval gates
  • Multi-provider LLM integration
  • Observability
  • Asynchronous task execution
  • Infrastructure automation capabilities

AgentForge is designed to evolve from a single-agent platform into a distributed multi-agent system.


Vision

Modern AI systems require more than retrieval.

Organizations increasingly need agents that can:

  • Understand goals
  • Create plans
  • Execute actions
  • Use tools
  • Access knowledge
  • Maintain memory
  • Collaborate with humans
  • Automate workflows

AgentForge aims to provide a framework where new capabilities can be added as tools without modifying the core runtime.


Core Principles

1. Everything Is a Tool

Agents never directly interact with external systems.

Every capability is implemented through a tool interface.

Examples:

  • RAG Tool
  • Search Tool
  • SQL Tool
  • File Tool
  • Kubernetes Tool
  • Firecracker Tool
  • Ceph Tool
  • Email Tool

2. Agent Runtime Owns Execution

The runtime is responsible for:

  • Planning
  • Tool selection
  • Context management
  • Memory access
  • Execution orchestration
  • Result aggregation

3. Storage Is Abstracted

The runtime never directly queries databases.

All persistence is accessed through service interfaces.


4. Event-Driven Architecture

Long-running operations are delegated to Celery workers.

Examples:

  • Document ingestion
  • Embedding generation
  • Knowledge indexing
  • Agent execution
  • Workflow execution

5. Provider Agnostic

Any LLM provider should be replaceable.

Examples:

  • OpenAI
  • Anthropic
  • Ollama
  • Local vLLM
  • Azure OpenAI

High-Level Architecture

User Request

API Layer

Agent Runtime

Planner

Tool Registry

Tool Execution

Memory Integration

Response Generation

User


Technology Stack

Backend

  • Python 3.12+
  • Django
  • Django REST Framework

Asynchronous Processing

  • Celery
  • Redis

Database

  • PostgreSQL

Vector Storage

  • pgvector

LLM Providers

  • OpenAI
  • Anthropic
  • Ollama
  • vLLM

Monitoring

  • Prometheus
  • Grafana
  • OpenTelemetry

Deployment

  • Docker
  • Docker Compose
  • Kubernetes

Project Structure

agentforge/

manage.py

config/

apps/

core/

providers/

workers/

tests/

docs/


Core Components

Agent Runtime

Responsible for executing agents.

Responsibilities:

  • Context management
  • Tool orchestration
  • Memory integration
  • Plan execution
  • Result aggregation

The runtime is the heart of the platform.


Planner

Converts goals into executable plans.

Example:

Goal:

"Find all invoices from April and summarize spending"

Plan:

  1. Search documents
  2. Retrieve invoices
  3. Extract text
  4. Aggregate totals
  5. Generate summary

Tool Registry

Maintains available tools.

Responsibilities:

  • Tool registration
  • Discovery
  • Validation
  • Permissions

Memory System

Short-Term Memory

Stores active conversations.

Technology:

  • Redis

Used for:

  • Conversation state
  • Agent state
  • Active workflows

Long-Term Memory

Stores persistent knowledge.

Technology:

  • PostgreSQL
  • pgvector

Used for:

  • Agent memories
  • Knowledge bases
  • Historical interactions

Knowledge Management

The knowledge subsystem provides:

  • Document ingestion
  • Chunking
  • Embedding generation
  • Indexing
  • Retrieval

Supported formats:

  • PDF
  • Markdown
  • DOCX
  • TXT
  • HTML

RAG System

RAG is implemented as a tool.

Pipeline:

Upload

Chunk

Embed

Store

Retrieve

Context Assembly

LLM


Hybrid Retrieval

AgentForge implements hybrid retrieval.

Methods:

BM25 Retrieval

Keyword-based ranking.

Advantages:

  • Precise matching
  • Fast retrieval

Vector Retrieval

Semantic similarity search.

Advantages:

  • Concept matching
  • Context awareness

Reciprocal Rank Fusion

Combines both methods.

Result:

Higher retrieval quality.


Tool System

Every tool must implement:

Tool Metadata

  • Name
  • Description
  • Permissions
  • Input Schema
  • Output Schema

Execution Interface

execute()

Validation Interface

validate()


Built-in Tools

Knowledge Tool

Provides document retrieval.

Search Tool

Provides internet search.

File Tool

Provides filesystem access.

SQL Tool

Provides database querying.

Workflow Tool

Provides workflow execution.

Scheduler Tool

Provides scheduled tasks.


Infrastructure Tools

Future capabilities:

Firecracker Tool

  • VM creation
  • VM deletion
  • VM lifecycle management

Container Tool

  • Container deployment
  • Container monitoring

Ceph Tool

  • Storage operations
  • Volume management

Kubernetes Tool

  • Cluster operations
  • Deployment management

Workflow Engine

Workflows allow agents to execute repeatable processes.

Example:

User Onboarding

  1. Create account
  2. Send email
  3. Provision resources
  4. Notify team

Human Approval System

Some operations require approval.

Examples:

  • Infrastructure changes
  • Database migrations
  • VM deletion

Agent execution pauses until approval is granted.


API

Agent Management

Create Agent

List Agents

Update Agent

Delete Agent


Agent Execution

Run Agent

Get Execution Status

Get Execution Logs

Get Execution Results


Knowledge Management

Upload Document

Delete Document

Reindex Document

Search Knowledge Base


Tool Management

List Tools

Enable Tool

Disable Tool

View Tool Metadata


Celery Queues

ingestion

chunking

embedding

indexing

agent_execution

tool_execution

workflow_execution

maintenance


Security

Authentication

  • JWT

Authorization

  • RBAC

Roles

  • Admin
  • Operator
  • Developer
  • Viewer

Observability

Metrics

  • Request latency
  • Tool execution time
  • Retrieval performance
  • Agent runtime performance

Logs

  • Structured JSON logs

Tracing

  • OpenTelemetry

Testing Strategy

Unit Tests

  • Services
  • Tools
  • Providers

Integration Tests

  • Retrieval
  • Agent Runtime
  • API

End-to-End Tests

  • Full execution paths

Roadmap

Phase 1

Core Platform

  • Agent runtime
  • Tool registry
  • Knowledge management
  • Hybrid retrieval

Phase 2

Advanced Agents

  • Planning
  • Reflection
  • Memory systems

Phase 3

Multi-Agent System

  • Agent collaboration
  • Agent messaging

Phase 4

Infrastructure Operations

  • Firecracker integration
  • Ceph integration
  • Kubernetes integration

Phase 5

Enterprise Features

  • Multi-tenancy
  • Audit trails
  • SSO
  • Approval workflows

Long-Term Goal

AgentForge should evolve into a platform where organizations can create specialized AI workers that interact with knowledge, software systems, infrastructure, and business processes through a unified agent runtime.

The ultimate objective is to provide a flexible foundation for building operational AI systems rather than isolated chatbots.

About

Infrastructure Metrics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors