personaforgeAI agents that ship.
One framework. From hello-world to hardened enterprise — durability, guardrails, budgets, and audit included. In one package. With zero lock-in.
One framework. From hello-world to hardened enterprise — durability, guardrails, budgets, and audit included. In one package. With zero lock-in.
Every pattern you'll ever need — from a one-liner to a hardened enterprise agent.
import { agent } from 'personaforge';
// That's it. Model, session & guardrails wired automatically.
const ai = agent('You are a helpful assistant.');
const { text } = await ai.run(
'Summarize the Rust ownership model in 3 bullets.',
);
console.log(text);Most agent frameworks give you an LLM wrapper and call it a day. personaforge is different — it ships every production primitive in a single npm install. No stitching together 7 packages. No "choose your own adventure" with sessions, memory, and guardrails.
| Capability | personaforge | LangChain.js | Vercel AI SDK | CrewAI | LangGraph | Mastra | Agno |
|---|---|---|---|---|---|---|---|
| Zero-config progressive DX | |||||||
| First-class TypeScript | |||||||
| 100+ built-in tools | |||||||
| Multi-agent orchestration | |||||||
| Durable DAG graph engine | |||||||
| Native MCP support | |||||||
| OTLP distributed tracing | |||||||
| Circuit breakers & retries | |||||||
| USD budget enforcement | |||||||
| Multi-tenancy context | |||||||
| Audit logging | |||||||
| Human-in-the-loop (HITL) | |||||||
| Intelligent LLM router | |||||||
| Automatic REST API | |||||||
| Voice & video |
import { agent } from 'personaforge';
const bot = agent('You are a helpful assistant.');
const { text } = await bot.run('What is the capital of France?');
console.log(text); // "The capital of France is Paris."Zero config. The framework resolves the provider from your environment, wires sessions in memory, and runs. No boilerplate. No ceremony.
import { agent, tool, InMemorySessionStore, Memory } from 'personaforge';
import { z } from 'zod';
const searchWeb = tool({
name: 'search_web',
description: 'Search the web.',
parameters: z.object({ query: z.string() }),
execute: async ({ query }) => fetch(`https://api.search.com?q=${query}`).then(r => r.json()),
});
const memory = new Memory({ options: { lastMessages: 20 } });
const researchAgent = agent({
name: 'researcher',
model: 'gpt-4o',
instructions: 'Research topics using web search. Remember preferences.',
tools: [searchWeb],
memory,
sessionStore: new InMemorySessionStore(),
dev: true, // console logging when you're iterating
});import { createEnterpriseGateway, createAgent } from 'personaforge';
const support = createAgent({ name: 'support', model: 'gpt-4o', instructions: '...' });
const billing = createAgent({ name: 'billing', model: 'gpt-4o', instructions: '...' });
const gateway = createEnterpriseGateway({
agents: { support, billing },
auth: apiKeyAuth([process.env.GATEWAY_API_KEY!]),
tenants: [
{ id: 'acme', monthlyBudgetUsd: 500, maxRpm: 60, allowedAgents: ['support'] },
],
policy: { monthlyBudgetUsd: 5000 },
});
await gateway.start(8787);
// → SOC 2 / HIPAA / GDPR dashboard at /compliance| Primitive | When |
|---|---|
| Agent | One model-backed worker with tools, memory, and state |
| Team | Specialists coordinating — supervisor, consensus, swarm, handoff |
| Workflow | Staged execution with branching, parallelism, and durability |
Every tool is Zod-validated, tree-shakeable, and ready to drop into any agent. Import only what you need — each subpath is independently bundleable.
personaforgeMain barrel exportpersonaforge/tools100+ built-in toolspersonaforge/orchestrationMulti-agent patternspersonaforge/knowledgeRAG + vector storepersonaforge/sessionSession storespersonaforge/guardrailsSafety & validationpersonaforge/productionCircuit breakers, rate limitspersonaforge/observabilityOTLP, logs, evalspersonaforge/runtimeHTTP + WebSocket serverpersonaforge/adapters20-category adapterspersonaforge/testingMocks & fixturespersonaforge/contractsShared types only30+ providers built-in. Swap with one import — the same agent code runs on every model.
OPENAI_API_KEYANTHROPIC_API_KEYGOOGLE_API_KEYOPENROUTER_API_KEYOPENAI_BASE_URL@aws-sdk/...apiKey + baseURLNo key needed| Capability | Ships in the box |
|---|---|
| Guardrails | PII detection, prompt injection defense, content moderation, tool/host allowlists |
| Budget enforcement | Per-user, per-session, and global USD caps — stop before the bill surprises you |
| Rate limiting | Sliding-window (in-memory + Redis) |
| Circuit breakers | Automatic provider failure detection and recovery |
| HITL approvals | Human-in-the-loop tool approval with interrupt() / resume() |
| Audit trail | Hash-chained event log, SOC 2 ready |
| OTLP tracing | OpenTelemetry with gen-ai semantic conventions |
| Prometheus metrics | Request counts, latency, token usage, error rates out of the box |
| Durable execution | Checkpoint/restore, deterministic replay from event log |
| Multi-tenancy | Per-tenant budgets, rate limits, agent allowlists, RBAC |
| Graceful shutdown | Drain active executions before shutdown |
| Health checks | Readiness, liveness, dependency probes |
import { evaluate, fromAgent } from 'personaforge';
const results = await evaluate({
subject: fromAgent(myAgent),
dataset: [
{ input: 'What is 2+2?', expected: { contains: '4' } },
{ input: 'Capital of Japan?', expected: { contains: 'Tokyo' } },
],
metrics: ['accuracy', 'latency', 'cost'],
judge: { model: 'gpt-4o', criteria: ['correctness', 'conciseness'] },
});
console.log(results.passRate); // 0.92No patchwork of add-ons. Every production concern is built-in and composable.
| Capability | personaforge | LangChain.js | Vercel AI SDK | CrewAI | LangGraph | Mastra | Agno |
|---|---|---|---|---|---|---|---|
| Zero-config progressive DX | |||||||
| First-class TypeScript | |||||||
| 100+ built-in tools | |||||||
| Multi-agent orchestration | |||||||
| Durable DAG graph engine | |||||||
| Native MCP support | |||||||
| OTLP distributed tracing | |||||||
| Circuit breakers & retries | |||||||
| USD budget enforcement | |||||||
| Multi-tenancy context | |||||||
| Audit logging | |||||||
| Human-in-the-loop (HITL) | |||||||
| Intelligent LLM router | |||||||
| Automatic REST API | |||||||
| Voice & video |
Migration guides for LangChain, CrewAI, LangGraph, Mastra & Agno →
Capability claims are easy. We publish the evidence — tests, benchmarks, security policy, and governance.
Private vulnerability disclosure, JWT hardening, SSRF-protected tools, and a production hardening checklist.
Learn more →1,500+ tests across 124 files. MockLLMProvider for deterministic runs. Coverage gates enforced on every PR.
Learn more →τ-bench harness with verifier-based scoring. Cross-framework protocol for LangGraph, Agno, CrewAI, and Mastra.
Learn more →OpenTelemetry-native tracing, tamper-evident audit logs, Prometheus metrics, and a built-in control plane.
Learn more →Zero-to-agent in 3 lines. A path to enterprise that never forces a rewrite. Every abstraction earns its place.
npm install personaforgeOPENAI_API_KEY=sk-...import { agent } from 'personaforge';
const { text } = await agent('Be helpful.').run('Hello!');agent() one-liner. Add tools, sessions, guardrails, budgets one-by-one as you need them. Never rewrite.any.MockLLMProvider + MockToolRegistry let you write fast, deterministic unit tests without real API calls.createAgent(), compose(), createSupervisor() freely. The abstractions are composable, not hierarchical. No switching frameworks at scale. Every capability ships with personaforge.
One package. From prototype to enterprise without changing frameworks.
npm install personaforge