Skip to content

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.

personaforge
100+Built-in Tools
20+Vector Stores
30+LLM Providers
MITOpen Source

From idea to production, in minutes

Every pattern you'll ever need — from a one-liner to a hardened enterprise agent.

hello.tsTypeScript
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);

Why personaforge?

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.

CapabilitypersonaforgeLangChain.jsVercel AI SDKCrewAILangGraphMastraAgno
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~

One agent, one run — start here

ts
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.

Add capabilities as you need them

ts
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
});

Scale to production — same API

ts
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

Three primitives. Every pattern.

PrimitiveWhen
AgentOne model-backed worker with tools, memory, and state
TeamSpecialists coordinating — supervisor, consensus, swarm, handoff
WorkflowStaged execution with branching, parallelism, and durability

100+ tools, zero assembly required

Every tool is Zod-validated, tree-shakeable, and ready to drop into any agent. Import only what you need — each subpath is independently bundleable.

🌐HTTP & Web
fetchscrapebrowsercrawlsitemap
💬Communication
emailSlackDiscordTwilioTelegram
🗄️Databases
PostgreSQLMySQLSQLiteRedisMongoDB
☁️Cloud Storage
S3GCSAzure BlobDropboxDrive
🔧Dev Tools
GitHubGitLabJiraLinearNotion
🔍Search & Data
DuckDuckGoWikipediaCSVJSONExcel
💳Payments
StripePayPalinvoicessubscriptionsrefunds
📁File System
readwritecopymovezip/unzip
🧮Compute & Math
calculatorcode runnerunit convertdate/timecron
Tree-shakeable subpath importsImport only what you need
personaforgeMain barrel export
personaforge/tools100+ built-in tools
personaforge/orchestrationMulti-agent patterns
personaforge/knowledgeRAG + vector store
personaforge/sessionSession stores
personaforge/guardrailsSafety & validation
personaforge/productionCircuit breakers, rate limits
personaforge/observabilityOTLP, logs, evals
personaforge/runtimeHTTP + WebSocket server
personaforge/adapters20-category adapters
personaforge/testingMocks & fixtures
personaforge/contractsShared types only

One framework, every model

30+ providers built-in. Swap with one import — the same agent code runs on every model.

OpenAIGPT & o-series
OPENAI_API_KEY
AnthropicClaude family
ANTHROPIC_API_KEY
GoogleGemini family
GOOGLE_API_KEY
OpenRouter100+ models
OPENROUTER_API_KEY
Azure OpenAIEnterprise
OPENAI_BASE_URL
AWS BedrockPeer dep
@aws-sdk/...
Any OpenAI-compatCustom URL
apiKey + baseURL
OllamaLocal
No key needed

Built for production — by default

CapabilityShips in the box
GuardrailsPII detection, prompt injection defense, content moderation, tool/host allowlists
Budget enforcementPer-user, per-session, and global USD caps — stop before the bill surprises you
Rate limitingSliding-window (in-memory + Redis)
Circuit breakersAutomatic provider failure detection and recovery
HITL approvalsHuman-in-the-loop tool approval with interrupt() / resume()
Audit trailHash-chained event log, SOC 2 ready
OTLP tracingOpenTelemetry with gen-ai semantic conventions
Prometheus metricsRequest counts, latency, token usage, error rates out of the box
Durable executionCheckpoint/restore, deterministic replay from event log
Multi-tenancyPer-tenant budgets, rate limits, agent allowlists, RBAC
Graceful shutdownDrain active executions before shutdown
Health checksReadiness, liveness, dependency probes

Eval built in

ts
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.92

Framework comparisons

Enterprise-ready from day one

No patchwork of add-ons. Every production concern is built-in and composable.

CapabilitypersonaforgeLangChain.jsVercel AI SDKCrewAILangGraphMastraAgno
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 →

Built for developer happiness at every scale

Zero-to-agent in 3 lines. A path to enterprise that never forces a rewrite. Every abstraction earns its place.

01
Install one package
npm install personaforge
No 12-step setup. No mandatory config files.
02
Set an API key
OPENAI_API_KEY=sk-...
Any of 30+ providers. Swap at any time.
03
Run your first agent
import { agent } from 'personaforge';
const { text } = await agent('Be helpful.').run('Hello!');
Smart defaults chosen for you. Override anything.
🧩
Progressive Escape Hatches
Start with agent() one-liner. Add tools, sessions, guardrails, budgets one-by-one as you need them. Never rewrite.
📐
Full TypeScript Inference
Every parameter, every hook, every tool result is typed end-to-end. Autocomplete works everywhere — no any.
🧪
Test Without an LLM
MockLLMProvider + MockToolRegistry let you write fast, deterministic unit tests without real API calls.
Smart Defaults, Not Magic
Defaults are explicit and documented. No hidden global state. No invisible retry loops. Every behaviour is opt-in.
🔀
Mix and Match
Combine createAgent(), compose(), createSupervisor() freely. The abstractions are composable, not hierarchical.
📦
Monorepo Friendly
Independent subpath imports mean each service only bundles what it needs. Works perfectly with Turborepo, Nx, and Bun workspaces.

Everything you need to go to production

No switching frameworks at scale. Every capability ships with personaforge.

🔒Security
  • Guardrails engine with sensitive-data rules
  • JWT RBAC on HTTP routes
  • Secret-manager adapters (AWS, Azure KV, HashiCorp, GCP)
  • Content safety hooks
Reliability
  • Circuit breakers with configurable thresholds
  • Exponential-backoff retry with jitter
  • Redis distributed rate limiting
  • Graceful shutdown + checkpoint/resume
📋Compliance
  • Persistent audit log (SQLite / pluggable)
  • X-Idempotency-Key deduplication
  • Per-user and per-tenant cost caps
  • W3C trace-context propagation
🔭Observability
  • OTLP tracing (Jaeger, Datadog, Honeycomb)
  • Structured logging with context
  • Eval store + LLM-as-judge scoring
  • Health endpoints + Grafana dashboard
🚀Deployment
  • Docker + docker-compose templates
  • Kubernetes with rolling updates & probes
  • Fly.io and Render one-click config
  • OpenAPI + WebSocket + SSE server built-in
🧪Testing
  • MockLLMProvider for deterministic tests
  • MockToolRegistry + fixture helpers
  • Vitest-compatible test utilities
  • Deterministic tests — no live API calls
READY TO SHIP?

Start building in
30 seconds

One package. From prototype to enterprise without changing frameworks.

npm install personaforge
MIT License·No telemetry by default·TypeScript-first·Zero lock-in

Released under the MIT License.