Production-ready framework for building deep agents with LangGraph
AgentForge is a TypeScript framework that provides production-grade abstractions for building autonomous agents with LangGraph. It focuses on developer experience, type safety, and real-world production needs.
π View Full Documentation | π Quick Start Guide | π‘ Examples
Phase 1-2: Core Foundation
- π οΈ Rich Tool Registry - Metadata-driven tools with automatic prompt generation
- π LangChain Integration - Seamless conversion between AgentForge and LangChain tools
- π LangGraph State Management - Type-safe state utilities with Zod validation
- ποΈ Workflow Builders - Sequential, parallel, and conditional workflow patterns
- π Error Handling Patterns - Retry, error handling, and timeout utilities
- π§© Subgraph Composition - Reusable subgraph utilities
- πΎ Memory & Persistence - Checkpointer and thread management utilities
- π Observability - LangSmith integration, metrics, logging, and error handling
Phase 3: Agent Patterns
- π€ ReAct Pattern - Reasoning and Action loop for exploratory tasks
- π Plan-Execute Pattern - Structured planning with parallel execution
- π Reflection Pattern - Iterative self-improvement through critique
- π₯ Multi-Agent Pattern - Coordinate specialized agents with supervisor routing
Phase 4-5: Advanced Features
- π Middleware System - Composable middleware for caching, rate limiting, validation
- π Streaming & Real-time - Stream transformers, aggregators, SSE, WebSocket, progress tracking
- π οΈ Advanced Tools - Async execution, lifecycle management, composition, testing utilities
- π¦ Resource Management - Connection pooling, memory management, batch processing, circuit breaker
- π Monitoring - Health checks, profiling, alerts, audit logging
- π Deployment - Docker, Kubernetes, CI/CD templates, multi-cloud guides
Phase 6: Developer Experience
- π― CLI Tool - Project scaffolding, development, testing, deployment (156 tests, 98.11% coverage)
- π§ͺ Testing Utilities - Mocks, assertions, fixtures for agent testing
- π¦ Standard Tools - 81 production-ready tools across 5 categories
- π Type Safety - Full TypeScript support with Zod schemas
- π Comprehensive Tests - 2185 tests passing across all packages
Phase 7: Documentation
- π Complete Documentation - 34 pages, 10,000+ lines of guides, tutorials, and API docs
- π‘ Pattern Guides - Detailed guides for all 4 agent patterns
- π Tutorials - 5 step-by-step tutorials from basics to advanced
- π Examples - 6 complete working examples
- π API Reference - Full API documentation for all 5 packages
All packages are published on npm and ready for production use!
| Package | Version | Description | npm |
|---|---|---|---|
| @agentforge/core | 0.16.13 | Core abstractions (tools, registry, LangGraph utilities, middleware, streaming, resources, monitoring) | |
| @agentforge/patterns | 0.16.13 | Agent patterns (ReAct, Plan-Execute, Reflection, Multi-Agent) | |
| @agentforge/tools | 0.16.13 | Standard tool library (81 production-ready tools) | |
| @agentforge/skills | 0.16.13 | Agent Skills system (SKILL.md discovery, activation, trust policies) | |
| @agentforge/testing | 0.16.13 | Testing utilities (mocks, assertions, fixtures) | |
| @agentforge/cli | 0.16.13 | CLI tool (156 tests, 98.11% coverage) |
# Install core package
npm install @agentforge/core
# Install agent patterns
npm install @agentforge/patterns
# Install standard tools
npm install @agentforge/tools
# Install testing utilities (dev dependency)
npm install -D @agentforge/testing
# Install CLI globally
npm install -g @agentforge/cliAgentForge provides 4 production-ready agent patterns:
Think β Act β Observe loop for exploratory tasks
import { createReActAgent } from '@agentforge/patterns';
import { ChatOpenAI } from '@langchain/openai';
const agent = createReActAgent({
model: new ChatOpenAI({ model: 'gpt-4' }),
tools: [searchTool, calculatorTool],
maxIterations: 5
});Structured planning with parallel execution
import { createPlanExecuteAgent } from '@agentforge/patterns';
const agent = createPlanExecuteAgent({
planner: { llm, maxSteps: 5 },
executor: { tools, parallel: true },
});Iterative self-improvement through critique
import { createReflectionAgent } from '@agentforge/patterns';
const agent = createReflectionAgent({
generator: { llm },
reflector: { llm },
maxIterations: 3,
});Coordinate specialized agents
import { createMultiAgentSystem, registerWorkers } from '@agentforge/patterns';
const system = createMultiAgentSystem({
supervisor: { model: llm, strategy: 'skill-based' },
workers: [],
aggregator: { model: llm },
});
registerWorkers(system, [
{ name: 'tech_support', capabilities: ['technical'], tools: [...] },
{ name: 'billing_support', capabilities: ['billing'], tools: [...] },
]);See the Pattern Comparison Guide to choose the right pattern.
AgentForge provides a powerful middleware system for adding cross-cutting concerns to your LangGraph nodes:
- Caching - TTL-based caching with LRU eviction
- Rate Limiting - Token bucket, sliding window, and fixed window strategies
- Validation - Zod schema validation for inputs and outputs
- Concurrency Control - Semaphore-based concurrency limiting
- Logging - Structured logging with customizable levels
- Retry - Exponential backoff retry logic
- Error Handling - Graceful error handling with fallbacks
- Timeout - Execution timeouts for long-running operations
- Metrics - Performance metrics collection
- Tracing - Distributed tracing support
import { compose, withCache, withValidation, withRateLimit } from '@agentforge/core';
import { z } from 'zod';
const schema = z.object({ query: z.string() }).strict();
const enhancedNode = compose(
withValidation({ inputSchema: schema }),
withCache({ ttl: 3600000 }),
withRateLimit({ maxRequests: 100, windowMs: 60000 }),
myNode
);import { production } from '@agentforge/core';
const productionNode = productionPreset(myNode, {
cache: { ttl: 3600000 },
rateLimit: { maxRequests: 100, windowMs: 60000 },
retry: { maxAttempts: 3 },
});See the Middleware Guide for comprehensive documentation.
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Run tests
pnpm test
# Run tests with coverage
pnpm test:coverage- π Quick Start - Get started in 5 minutes
- π Full Documentation - Complete guides and API reference
- π€ Pattern Guides - ReAct, Plan-Execute, Reflection, Multi-Agent
- π§ Middleware Guide - Comprehensive middleware guide
- π‘ Examples - Working code examples
- π API Reference - Complete API documentation
For contributors and advanced users:
- Framework Design - Architecture and design decisions
- Roadmap - Development roadmap and milestones
- Monorepo Setup - Monorepo structure and setup
- Codebase Learning Guide - Contributor onboarding
- Logging Standards - Internal logging standards
- Pattern Comparison - Detailed pattern comparison
π Deployment Templates
Production-ready templates for deploying your agents:
- Docker Templates - Containerization with docker-compose
- Kubernetes Manifests - Production K8s deployment
- CI/CD Pipelines - GitHub Actions & GitLab CI
- Cloud Guides - AWS, GCP, Azure deployment guides
π‘ Application Examples
Real-world applications and integrations:
- Research Assistant - ReAct pattern for research
- Code Reviewer - Reflection pattern for code quality
- Data Analyst - Plan-Execute pattern for data analysis
- Customer Support Bot - Multi-Agent pattern for support
- Express.js Integration - REST API with streaming
- Next.js Integration - Full-stack app with chat UI
- ReAct Examples - 4 ReAct examples
- Plan-Execute Examples - 4 Plan-Execute examples
- Reflection Examples - 4 Reflection examples
- Multi-Agent Examples - 4 Multi-Agent examples
- Streaming Examples - 5 streaming examples (32+ demonstrations)
- Advanced Tools Examples - 4 tool examples
- Resource Management Examples - 4 resource examples
- Monitoring Examples - 4 monitoring examples
- Deployment Examples - 4 deployment examples
- Node.js >= 18.0.0
- pnpm >= 8.0.0
# Clone the repository
git clone https://github.com/TVScoundrel/agentforge.git
cd agentforge
# Install dependencies
pnpm install
# Build packages
pnpm buildpnpm build # Build all packages
pnpm dev # Watch mode for all packages
pnpm test # Run tests
pnpm test:coverage # Run tests with coverage
pnpm test:ui # Run tests with UI
pnpm lint # Lint all packages
pnpm lint:fix # Lint and fix all packages
pnpm format # Format all packages
pnpm typecheck # Type check all packages
pnpm clean # Clean all build artifactsπ AgentForge v0.16.13 - Published on npm and Production-Ready!
All 7 Phases Complete:
- Rich tool metadata, builder API, registry with events
- LangChain integration, prompt generation
- Status: Complete & Published
- State management, workflow builders, error handling
- Memory & persistence, observability & logging
- Status: Complete & Published
- ReAct, Plan-Execute, Reflection, Multi-Agent patterns
- 16 working examples with comprehensive documentation
- Status: Complete & Published
- Composable middleware (caching, rate limiting, validation, concurrency)
- Production, development, and testing presets
- Status: Complete & Published
- 5.1: Streaming & Real-time (68 tests) - Stream transformers, SSE, WebSocket, progress tracking
- 5.2: Advanced Tools - Async execution, lifecycle, composition, testing utilities
- 5.3: Resource Management - Connection pooling, memory management, batch processing, circuit breaker
- 5.4: Monitoring - Health checks, profiling, alerts, audit logging
- 5.5: Deployment - Docker, Kubernetes, CI/CD, configuration management
- 20 working examples demonstrating all features
- Status: Complete & Published
- 6.1: CLI Tool - 156 tests (98.11% coverage), 13 commands, 4 templates
- 6.2: Testing Utilities - Mocks, assertions, fixtures, test helpers
- 6.3: Standard Tools - 74 production-ready tools (web, file, data, utility, agent)
- 6.4: Documentation Site - 17 pages, comprehensive guides, API docs, tutorials
- Status: Complete & Published
- 7.1: Core Concepts - 5 foundational guides
- 7.2: Pattern Guides - 4 comprehensive pattern guides (2,011 lines)
- 7.3: Advanced Topics - 4 advanced guides (3,474 lines)
- 7.4: Additional Tutorials - 3 step-by-step tutorials
- 7.5: Missing Examples - 2 complete working examples
- 7.6: Documentation Review & Polish - Quality assurance, link validation, cross-references
- Status: Complete & Published
- Total Tests: 2185 passing across all packages
- Test Coverage: 98.11% (CLI package)
- Documentation: 34 pages, 10,000+ lines
- Examples: 30+ files, 2,500+ lines of real-world code
- Tools: 74 production-ready tools
- Patterns: 4 complete agent patterns
- Packages: 5 published on npm
- π€ Autonomous Agents - ReAct, Plan-Execute, Reflection, Multi-Agent patterns
- π Real-time Applications - Streaming with SSE/WebSocket
- π Production APIs - Express.js or Next.js integrations
- π Data Analysis Tools - Research and analytics agents
- π¬ Customer Support - Multi-agent support systems
- π Code Review Tools - Reflection-based quality tools
- π Enterprise Deployments - Docker/Kubernetes ready
See ROADMAP.md for complete development history.
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch
- Make your changes
- Write tests
- Submit a pull request
For maintainers releasing new versions:
-
Automated Version Bump:
./scripts/release.sh 0.4.2
This updates all package.json files, CLI templates, and documentation.
-
Manual Steps (see release process guide):
- Update
docs-site/changelog.mdwith release notes - Run
pnpm buildandpnpm test - Review changes with
git diff - Commit:
git add . && git commit -S -m "chore: Bump version to X.Y.Z" - Tag:
git tag -a vX.Y.Z -m "Release vX.Y.Z" - Push:
git push && git push --tags
- Update
-
Publish to npm:
./scripts/publish.sh
This publishes all packages in the correct dependency order.
See .ai/RELEASE_PROCESS.md for the complete process.
MIT Β© 2026 Tom Van Schoor
- Inspired by DeepAgents
- Built on LangGraph
- Powered by LangChain