Skip to content

Packages & Imports

Install personaforge once. That is the public consumer package.

Use personaforge for the common agent APIs. Use personaforge/<module> when you want a more focused import path from the same installation.

bash
npm install personaforge

Root imports

Use the root package for the headline APIs that most apps start with.

ts
import { agent, defineAgent, compose, tool } from 'personaforge';

Module subpaths

Use subpaths when you want clearer intent or a narrower import surface.

ts
import { TavilySearchTool } from 'personaforge/tools/search';
import { createSqliteStore } from 'personaforge/session';
import { GuardrailValidator, createPiiDetectionRule } from 'personaforge/guardrails';
import { withResilience } from 'personaforge/production';
import { CircuitBreaker } from 'personaforge/guard';
import { createHttpService, listenService } from 'personaforge/runtime';
import { ConsoleLogger } from 'personaforge/observability';
import { openai } from 'personaforge/model';

Common subpaths:

Import pathUse for
personaforge/toolsIntegrations and toolkits
personaforge/sessionSession stores
personaforge/guardrailsSafety rules and validators
personaforge/productionwithResilience() and production wrappers
personaforge/guardLow-level circuit breaker, rate limiter, health helpers
personaforge/runtimeHTTP runtime, auth, WebSocket transport
personaforge/orchestrationSupervisor, routing, consensus, A2A
personaforge/observabilityLogging, tracing, eval utilities
personaforge/llmProvider classes and routing utilities
personaforge/modelopenai(), anthropic(), ollama() shorthands
personaforge/processorsMastra-style input/output/error processor pipeline
personaforge/durableLong-running, resumable agent execution with replay
personaforge/goalsDurable, thread-scoped judge-scored objectives
personaforge/code-modeSandboxed multi-tool computation
personaforge/approvalHuman-in-the-loop approval + suspended runs
personaforge/eventsTyped event bus + core event vocabulary
personaforge/registryAgent registration, discovery, delegation toolkit
personaforge/harnessevaluate() — A/B harness over agents/tasks/workflows

Contributor note

The repository is organized internally as a monorepo, so contributors will see @personaforge/* workspace package names in implementation code and build scripts.

That internal layout is not the public install story. Consumer docs, app code, and examples should use:

  • personaforge
  • personaforge/<module>

Publish checks

The repository still validates every exported subpath before publishing:

bash
npm run package:prepare

That command builds the single public package surface and verifies that every declared export target exists on disk.

Released under the MIT License.