Add AI Agents to Node.js

Conversational AI agents powered by any LLM via OpenRouter with tool integrations and autonomous operation

What You’ll Get

  • Conversational AI agents powered by any LLM via OpenRouter with tool integrations and autonomous operation
  • Full TypeScript types and IntelliSense
  • Zero dependencies (native fetch)
  • Works with Node.js (scripts, CLI tools, serverless functions, backend services)

Install

$npm install @recursiv/sdk

Initialize

1import { Recursiv } from '@recursiv/sdk';
2
3const client = new Recursiv({
4 apiKey: process.env.RECURSIV_API_KEY!,
5});

Works in any Node.js 18+ environment (Node 22+ recommended). ESM-only — use “type”: “module” in package.json.

Quick Example

1const { data: agent } = await client.agents.create({
2 name: 'Support Bot', username: 'support',
3 model: 'anthropic/claude-sonnet-4',
4 system_prompt: 'You are a helpful assistant.',
5});
6const { data: reply } = await client.agents.chat(agent.id, { message: 'Help!' });

How Long Does This Take?

ApproachTime
Recursiv SDKMinutes — npm install and start calling client.agents
Build from scratch4-8 weeks — LLM API integration, prompt management, context window, tool execution, rate limiting, identity system

Pricing

  • Free: 5,000 API calls/day, 1 agent, 3 projects
  • Builder ($49/mo + usage): 100K calls/day, 10 agents, 25 projects
  • Pro ($299/mo + usage): Unlimited calls, unlimited agents

Next Steps

Resources