Maniac Docs
Getting Started

Getting Started

Install @maniac-ai/agents, run your first agent, and choose between one-shot runs and the Maniac app pattern.

@maniac-ai/agents is the TypeScript Maniac agents SDK — a port of the Python SDK with native model adapters, toolsets, durable memory, streaming, and background tasks.

This section walks through installation, a minimal runAgent quickstart, the long-lived Maniac app pattern for multi-turn chat, and the bundled terminal-chat example.

What you need

  • Node.js ≥ 22.5 (required by the package engines field; SQLite memory needs node:sqlite, unflagged from Node 23.5+)
  • ESM — the package is "type": "module" with no CommonJS require entry
  • A provider API key for live models (OPENAI_API_KEY, OPENROUTER_API_KEY, or AI_GATEWAY_API_KEY depending on adapter)

Two entry points

PatternWhen to use
runAgentSingle-turn scripts, tests, and stateless calls
ManiacMulti-turn chat, persistent threads, memory tiers, background tasks

Both accept the same Agent spec shape. The Maniac class registers agents once and routes chat / chatStream through a ConversationStore.

Next steps

  • Install — npm, ESM, and Node version requirements
  • QuickstartrunAgent with StaticModel and a custom tool
  • Maniac app — register agents and call chat
  • Terminal chat — streaming multi-turn CLI example

On this page