https://github.com/littleblacky/agenticforge
A TypeScript Agent Framework Driven by Tool Invocation
https://github.com/littleblacky/agenticforge
agent agent-framework ai-agents memory multi-agent-protocol rag tools-calling typescript
Last synced: 24 days ago
JSON representation
A TypeScript Agent Framework Driven by Tool Invocation
- Host: GitHub
- URL: https://github.com/littleblacky/agenticforge
- Owner: LittleBlacky
- License: other
- Created: 2026-03-03T02:51:43.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-05-10T19:36:17.000Z (about 2 months ago)
- Last Synced: 2026-05-15T06:19:34.797Z (about 1 month ago)
- Topics: agent, agent-framework, ai-agents, memory, multi-agent-protocol, rag, tools-calling, typescript
- Language: TypeScript
- Homepage: https://littleblacky.github.io/AgenticFORGE/
- Size: 6.42 MB
- Stars: 76
- Watchers: 3
- Forks: 5
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
AgenticFORGE
Build production-ready TypeScript AI agents with tools, memory, skills, and protocols.
中文 | English
---
## Overview
AgenticFORGE is a monorepo TypeScript framework for building tool-driven AI agents.
It provides a complete stack from core LLM abstractions to advanced agent workflows, skill routing, memory + RAG, built-in tools, and multi-agent communication protocols.
If you want one unified SDK to build from a simple chatbot to a production multi-agent system, start with `@agenticforge/kit`.
---
## Why AgenticFORGE
- **Tool-first architecture**: Standardized `Tool`, `ToolRegistry`, `ToolChain`, and async execution model
- **Multiple agent paradigms**: `Simple`, `FunctionCall`, `ReAct`, `PlanSolve`, `Reflection`, `SkillAgent`, and `WorkflowAgent`
- **Skill system**: Define skills with `SKILL.md` or TypeScript classes; `SkillDispatcher` auto-routes by keyword (zero LLM cost) then LLM intent; `withSkills` mixin adds skill routing to any Agent type
- **Memory + RAG built-in**: Working / episodic / semantic / perceptual memory with pluggable stores
- **Protocol layer included**: MCP, A2A, and ANP implementations for inter-agent communication
- **Production-friendly TypeScript**: ESM/CJS builds, strict typing, modular packages, and subpath imports
---
## Package Architecture
| Package | Purpose |
| --- | --- |
| [`@agenticforge/kit`](packages/kit) | One-stop package that re-exports the core ecosystem |
| [`@agenticforge/core`](packages/core) | Agent base types, message model, `LLMClient`, hooks & metrics |
| [`@agenticforge/tools`](packages/tools) | Tool abstraction, schema validation, registry, chain, async execution |
| [`@agenticforge/agents`](packages/agents) | Built-in agent implementations and workflow orchestration |
| [`@agenticforge/workflow`](packages/workflow) | Standalone DAG workflow engine (`WorkflowEngine` + types) |
| [`@agenticforge/skills`](packages/skills) | Markdown / TypeScript skill definitions, loading, routing, execution |
| [`@agenticforge/memory`](packages/memory) | MemoryManager, storage adapters, embedding support, RAG pipeline |
| [`@agenticforge/tools-builtin`](packages/tools-builtin) | Ready-to-use tools: search, memory, notes, RAG, terminal |
| [`@agenticforge/context`](packages/context) | Token-aware context composition and budget management |
| [`@agenticforge/protocols`](packages/protocols) | MCP / A2A / ANP protocol implementations |
| [`@agenticforge/utils`](packages/utils) | Shared utility helpers (cache, prompt helpers, etc.) |
---
## Agent Types
| Agent | Best For |
| --- | --- |
| `SimpleAgent` | Multi-turn conversation without tool execution |
| `FunctionCallAgent` | Reliable tool-invocation workflows |
| `ReActAgent` | Iterative reasoning + action loops |
| `PlanSolveAgent` | Plan-first decomposition for complex tasks |
| `ReflectionAgent` | Self-critique and answer refinement |
| `SkillAgent` | Intent-based capability routing across many skills |
| `WorkflowAgent` | DAG-style orchestration with parallelizable nodes |
---
## Quick Start
### 1) Install
```bash
npm install @agenticforge/kit zod
```
### 2) Minimal Tool-Driven Agent
```ts
import { LLMClient, FunctionCallAgent, Tool, toolAction } from "@agenticforge/kit";
import { z } from "zod";
const calculator = new Tool({
name: "calculator",
description: "Evaluate a simple expression: a+b, a-b, a*b, a/b",
parameters: [{ name: "expr", type: "string", required: true }],
action: toolAction(
z.object({ expr: z.string() }),
async ({ expr }) => {
const safe = expr.match(/^\s*[-\d.]+\s*[+\-*/]\s*[-\d.]+\s*$/);
if (!safe) return "Unsupported expression";
return String(Function(`"use strict"; return (${expr})`)());
}
),
});
const llm = new LLMClient({
provider: "openai",
model: "gpt-4o",
apiKey: process.env.OPENAI_API_KEY,
});
const agent = new FunctionCallAgent({
llm,
tools: [calculator],
});
const output = await agent.run("What is (123 + 456) * 2?");
console.log(output);
```
---
## Skills (Markdown + TypeScript)
AgenticFORGE supports two skill authoring styles:
- **Markdown skills** (`SKILL.md` / `*.skill.md`) for fast iteration
- **TypeScript skills** (`AgentSkill`) for custom logic and deeper control
```ts
import { SkillLoader, SkillRunner } from "@agenticforge/skills";
const skills = await SkillLoader.fromDirectory(".cursor/skills");
const runner = new SkillRunner({ llm, skills });
const result = await runner.run("Is it raining in Tokyo tomorrow?");
console.log(result.output);
```
---
## Memory and RAG
Use `MemoryManager` to combine short-term and long-term memory, then layer retrieval with the built-in RAG pipeline.
```ts
import { MemoryManager } from "@agenticforge/memory";
const memory = new MemoryManager({
enableWorking: true,
enableEpisodic: true,
enableSemantic: true,
});
await memory.addMemory({
content: "User prefers concise answers.",
memoryType: "semantic",
importance: 0.8,
});
const recalled = await memory.retrieveMemories({
query: "response style preference",
limit: 3,
memoryTypes: ["semantic"],
});
console.log(recalled);
```
---
## Protocols (MCP / A2A / ANP)
`@agenticforge/protocols` includes practical protocol implementations to expose tools, connect agents, and manage networks:
- **MCP**: Standardized tool/resource access
- **A2A**: Agent-to-agent skill invocation
- **ANP**: Service discovery, topology, and routing
---
## Monorepo Apps & Docs
This repository also includes:
- `apps/second-brain` — an end-to-end sample app (frontend + backend) built with AgenticFORGE
- `docs-site/` — VitePress documentation site
- `.cursor/skills/` and `skills/` — reusable skill templates and examples
---
## AI-Assisted Development with Skills
Every AgenticFORGE package ships with a companion `SKILL.md` under `skills/`, designed to be loaded into AI coding assistants (Cursor, Windsurf, etc.) as context-aware skills.
| Skill | Covers |
| --- | --- |
| [`agenticforge-agents`](skills/agenticforge-agents/SKILL.md) | Agent selection, configuration, WorkflowAgent DAG patterns |
| [`agenticforge-tools`](skills/agenticforge-tools/SKILL.md) | Tool authoring, ToolRegistry, ToolChain, AsyncToolExecutor |
| [`agenticforge-memory`](skills/agenticforge-memory/SKILL.md) | WorkingMemory, EpisodicMemory, SemanticMemory, RAG pipeline |
| [`agenticforge-skills`](skills/agenticforge-skills/SKILL.md) | SKILL.md authoring, SkillRunner, SkillLoader, routing |
| [`agenticforge-context`](skills/agenticforge-context/SKILL.md) | ContextBuilder, token budget management |
| [`agenticforge-protocols`](skills/agenticforge-protocols/SKILL.md) | MCP, A2A, ANP protocol setup |
| [`agenticforge-debugging`](skills/agenticforge-debugging/SKILL.md) | Diagnosing agent loop errors, tool failures, type errors |
| [`agenticforge-vibe-coding`](skills/agenticforge-vibe-coding/SKILL.md) | All-in-one assistant for rapid AgenticFORGE development |
To load them into Cursor, add the `skills/` directory to your `.cursor/skills/` path or reference individual `SKILL.md` files in your project rules.
---
## Local Development
```bash
git clone https://github.com/LittleBlacky/AgenticFORGE.git
cd AgenticFORGE
pnpm install
pnpm -r run build
pnpm test
```
---
## Documentation
- Docs site: [`docs-site/`](docs-site)
- Guide entry: [`docs-site/guide/introduction`](docs-site/guide/introduction.md)
- Package-level docs: each package contains its own `README.md`
---
## Contributing
Issues and pull requests are welcome.
If you plan a larger feature or API change, please open an issue first so we can align on design and scope.
---
## License
[CC BY-NC-SA 4.0](LICENSE) © LittleBlacky
---