Skip to content

What is AgentForge? โ€‹

AgentForge is a production-ready AI agent framework built on top of LangGraph and LangChain. It provides a comprehensive toolkit for building, testing, and deploying AI agents with TypeScript.

Philosophy โ€‹

AgentForge follows a simple philosophy: We wrap, don't replace. Instead of creating yet another agent framework from scratch, we build on the solid foundation of LangGraph and LangChain, providing:

  • Type-safe wrappers around LangGraph primitives
  • Production-ready patterns that work out of the box
  • Developer experience tools to accelerate development
  • Battle-tested utilities for common tasks

Key Features โ€‹

๐Ÿ› ๏ธ Tool Registry & Auto-Prompt Generation โ€‹

AgentForge's killer feature - a centralized tool registry that automatically generates LLM-ready prompts:

  • Register Once, Use Everywhere - Define tools with rich metadata (categories, tags, examples)
  • Auto-Generate Prompts - Automatically create formatted tool descriptions for LLMs
  • Smart Querying - Search by name, category, or tags
  • Seamless Integration - Convert to LangChain tools with one method call
  • 69+ Standard Tools - Production-ready tools included out of the box
typescript
const registry = new ToolRegistry();

// Mix custom tools with 69+ standard tools
import { calculator, httpGet, fileReader, webSearch } from '@agentforge/tools';
registry.registerMany([myTool, calculator, httpGet, fileReader, webSearch]);

// Automatically generate LLM-ready prompts
const prompt = registry.generatePrompt({
  includeExamples: true,
  groupByCategory: true
});

// Use with any agent
const agent = createReActAgent({
  model: llm,
  tools: registry.toLangChainTools(),
  systemPrompt: prompt // Auto-generated!
});

// Create specialized registries for different agents
const webScraperRegistry = new ToolRegistry();
const dataAnalystRegistry = new ToolRegistry();
// Each agent gets its own focused toolset!

๐ŸŽฏ Agent Patterns โ€‹

Four production-ready patterns:

  • ReAct - Reasoning and acting in cycles
  • Plan-Execute - Planning then executing steps
  • Reflection - Self-critique and improvement
  • Multi-Agent - Coordinated agent systems

๐Ÿ”Œ Middleware System โ€‹

Composable middleware for:

  • Caching and rate limiting
  • Validation and error handling
  • Logging and tracing
  • Metrics and monitoring
  • Retry and timeout logic

๐Ÿ“Š Streaming & Real-time โ€‹

  • Server-Sent Events (SSE)
  • WebSocket support
  • Progress tracking
  • Backpressure management

๐Ÿงช Testing Utilities โ€‹

  • Mock LLM and tools
  • Test helpers and assertions
  • Sample conversations and fixtures
  • Integration testing tools

๐Ÿš€ Production Features โ€‹

  • Health checks and monitoring
  • Resource management
  • Connection pooling
  • Circuit breakers
  • Deployment templates

Architecture โ€‹

AgentForge is organized into five packages:

@agentforge/core โ€‹

The foundation package containing:

  • Tool Registry - Centralized tool management with auto-prompt generation
  • Tool Builder - Fluent API for creating tools with rich metadata
  • LangGraph utilities
  • Middleware system
  • Streaming utilities
  • Resource management
  • Monitoring tools

@agentforge/patterns โ€‹

Pre-built agent patterns:

  • ReAct pattern
  • Plan-Execute pattern
  • Reflection pattern
  • Multi-Agent coordination

@agentforge/cli โ€‹

Command-line tool for:

  • Project scaffolding
  • Development server
  • Code generation
  • Deployment

@agentforge/testing โ€‹

Testing utilities:

  • Mock factories
  • Test helpers
  • Fixtures
  • Integration testing

@agentforge/tools โ€‹

Standard tools library:

  • Web tools (HTTP, scraping, parsing)
  • Data tools (JSON, CSV, XML)
  • File tools (read, write, search)
  • Utility tools (date, string, math, validation)

When to Use AgentForge โ€‹

AgentForge is ideal when you need:

โœ… Production-ready agents - Not just prototypes
โœ… Type safety - Full TypeScript support
โœ… Proven patterns - Battle-tested architectures
โœ… Smart tool management - Auto-generate prompts, no manual prompt engineering
โœ… Developer experience - CLI, testing, docs
โœ… LangChain ecosystem - Leverage existing tools

When NOT to Use AgentForge โ€‹

AgentForge might not be the best fit if:

โŒ You need a framework-agnostic solution
โŒ You're building simple chatbots (use LangChain directly)
โŒ You want to avoid the LangChain ecosystem
โŒ You need Python (AgentForge is TypeScript-only)

Note: AgentForge is built on top of LangGraph, not instead of it. You have full access to LangGraph's flexibility and can create custom patterns using AgentForge's utilities while still leveraging all of LangGraph's capabilities.

Comparison with Alternatives โ€‹

vs. LangChain/LangGraph Directly โ€‹

  • โœ… Higher-level abstractions
  • โœ… Production-ready patterns
  • โœ… Better TypeScript support
  • โœ… Auto-prompt generation - No manual tool description writing
  • โœ… More comprehensive tooling
  • โœ… Full LangGraph access - Build custom patterns when needed
  • โš ๏ธ Additional abstraction layer (minimal overhead)

vs. AutoGPT/BabyAGI โ€‹

  • โœ… More structured and maintainable
  • โœ… Better production features
  • โœ… Type safety
  • โŒ Less autonomous

vs. CrewAI โ€‹

  • โœ… TypeScript instead of Python
  • โœ… Built on LangGraph
  • โœ… More comprehensive middleware
  • โŒ Smaller community (newer)

Next Steps โ€‹

Ready to get started? Check out:

Released under the MIT License.