Maniac Docs
Getting Started

Install

Install @maniac-ai/agents from npm. ESM-only package requiring Node.js 22.5 or later.

npm

npm install @maniac-ai/agents

The published package is ESM-only ("type": "module" with no require field in exports). Use it from:

  • Native ESM: import { runAgent } from "@maniac-ai/agents"
  • TypeScript with "module": "esnext" or "nodenext"
  • CommonJS via dynamic import: const { runAgent } = await import("@maniac-ai/agents")

A direct require("@maniac-ai/agents") call is not supported.

Node version

"engines": { "node": ">=22.5.0" }

Node 22.5+ is required for the runtime baseline. If you use SqliteMemory from @maniac-ai/agents/memory/sqlite, pass --experimental-sqlite on Node 22.x; SQLite is unflagged from Node 23.5+.

Subpath imports

The root barrel re-exports most symbols. For tree-shaking or explicit boundaries, import subpaths:

import { Maniac } from "@maniac-ai/agents";
import { OpenAICompatibleModel } from "@maniac-ai/agents/inference/adapters";
import { MCPToolset } from "@maniac-ai/agents/tools/adapters";
import { SqliteMemory } from "@maniac-ai/agents/memory/sqlite";
import { OTelTracer } from "@maniac-ai/agents/observability";

See the API reference for the full export map.

Optional peer dependencies

Install these only when you use the corresponding feature:

PackageFeature
@modelcontextprotocol/sdkMCPToolset
@honcho-ai/sdkHoncho memory adapter
@opentelemetry/api, @opentelemetry/sdk-trace-baseOTelTracer
@agentclientprotocol/sdkACP server

Local development (monorepo)

cd packages/agents
npm install
npm test

On this page