Skip to content

AgentForgeProduction-Ready AI Agent Framework

Build powerful AI agents with TypeScript, LangGraph, and battle-tested patterns

AgentForge

Quick Start โ€‹

bash
# Create a new project
npx @agentforge/cli create my-agent

# Navigate to project
cd my-agent

# Install dependencies
pnpm install

# Run your first agent
pnpm dev

Example: ReAct Agent โ€‹

typescript
import { createReActAgent } from '@agentforge/patterns';
import { ChatOpenAI } from '@langchain/openai';
import { calculator, currentDateTime } from '@agentforge/tools';

const agent = createReActAgent({
  model: new ChatOpenAI({ model: 'gpt-4' }),
  tools: [calculator, currentDateTime],
  maxIterations: 5
});

const result = await agent.invoke({
  messages: [{
    role: 'user',
    content: 'What is 25 multiplied by 4, and what time is it?'
  }]
});

console.log(result.messages[result.messages.length - 1].content);

Example: Tool Registry with Auto-Prompt Generation โ€‹

typescript
import { ToolRegistry, toolBuilder, ToolCategory } from '@agentforge/core';
import { z } from 'zod';

// Create a registry
const registry = new ToolRegistry();

// Register tools with rich metadata
registry.register(
  toolBuilder()
    .name('search-web')
    .description('Search the web for information')
    .category(ToolCategory.WEB)
    .tag('search')
    .tag('internet')
    .schema(z.object({ query: z.string() }))
    .example('Search for TypeScript tutorials', { query: 'TypeScript tutorials' })
    .implement(async ({ query }) => {
      // Implementation here
      return `Results for: ${query}`;
    })
    .build()
);

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

console.log(prompt);
// Available Tools:
//
// WEB TOOLS:
// - search-web: Search the web for information
//   Parameters: query (string)
//   Example: Search for TypeScript tutorials
//     Input: { "query": "TypeScript tutorials" }

// Use with any agent
const agent = createReActAgent({
  model: new ChatOpenAI({ model: 'gpt-4' }),
  tools: registry.toLangChainTools(), // Seamless conversion!
  systemPrompt: prompt // Use auto-generated prompt!
});

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

// Create specialized registries for different agents
const webScraperRegistry = new ToolRegistry();
webScraperRegistry.registerMany([httpGet, jsonParser]);

const dataAnalystRegistry = new ToolRegistry();
dataAnalystRegistry.registerMany([fileReader, calculator]);

Why AgentForge? โ€‹

๐ŸŽฏ Production-Ready Patterns โ€‹

Don't reinvent the wheel. Use battle-tested agent patterns that work in production.

๐Ÿ› ๏ธ Smart Tool Management โ€‹

Register tools once with rich metadata, then automatically generate LLM prompts, query by category/tags, and convert to LangChain tools. No manual prompt engineering needed.

๐Ÿ“š Extensive Documentation โ€‹

Interactive tutorials, API reference, and real-world examples to get you started quickly.

๐Ÿ”’ Type Safety โ€‹

Full TypeScript support with Zod validation ensures your agents are reliable and maintainable.

๐Ÿš€ Scalable โ€‹

Built-in resource management, monitoring, and deployment templates for production workloads.

What's Included? โ€‹

  • @agentforge/core - Tool system, middleware, streaming, and utilities
  • @agentforge/patterns - ReAct, Plan-Execute, Reflection, Multi-Agent patterns
  • @agentforge/cli - Project scaffolding and development tools
  • @agentforge/testing - Mock factories, test helpers, and fixtures
  • @agentforge/tools - 69+ production-ready tools for common tasks

Community โ€‹

License โ€‹

MIT ยฉ 2026 Tom Van Schoor

Released under the MIT License.