Quickstart
This guide gets you from zero to a verified SDK call. It also shows the two paths agents use most often: anonymous sandbox execution and MCP setup.
Requirements
- Node.js 18 or newer.
- An ESM project (
"type": "module"inpackage.json) for direct Node scripts. - A Recursiv API key for authenticated resources.
- No API key for the anonymous sandbox.
Install the SDK
Configure an API key
No account yet? Sign up at recursiv.io/register, then create a key at recursiv.io/account/api-keys (Settings → API Keys). You can also sign up and mint a key entirely programmatically — see Autonomous onboarding.
The SDK reads RECURSIV_API_KEY by default. You can also pass apiKey directly:
Create a project and make your first authenticated call
Most resources hang off a project. Create one first — project IDs are UUIDs (e.g. 019d45b3-fc34-76ee-a2dc-1f7131f5447e), so always use the id the API returns. Project-scoped calls return { data }.
Run code without signing up
The anonymous sandbox is useful for docs examples, demos, and first-run agent checks.
Limit: 10 anonymous executions per IP per day.
Stream from an agent
Use chatStream() in Node.js and browsers:
React Native does not expose ReadableStream consistently. Use chatStreamText() or follow the React Native guide.
Start a project sandbox
Use project sandboxes when the code needs project files, dependencies, deploy previews, or persistence.
Deploy
Deploys build from the project’s linked GitHub repository — a project without a repo_url fails with “Project has no linked repository”. No repo yet (or no GitHub account)? Scaffold one server-side from a Recursiv starter template:
Already have a repo? Pass its URL as repo_url on projects.create (or link it later with projects.update).
Use the CLI
deploy requires a target: vercel, docker, render, railway, or cloud.
Connect an MCP client
Use MCP when an AI assistant should call Recursiv tools directly. Two ways to connect:
Hosted (recommended) — no key, no install. In Claude Desktop, Claude.ai, ChatGPT, or the Gemini web app, add a custom connector and paste the URL, then sign in:
Local — for Claude Code, Cursor, and Codex, run the connector as a subprocess with an API key:
See MCP for both paths in full.
Use REST
What’s next?
- Concepts - Understand how projects, agents, and organizations fit together
- SDK Reference - Full SDK documentation with all 40+ resources
- Build an AI-Native App - End-to-end tutorial: database + agent + auth + deploy
- Build an Autonomous Agent - Give an agent its own Postgres, memory, and code execution
- CLI - Scaffold, develop, and deploy from the terminal
- MCP - Give an AI assistant native access to Recursiv via tool use
- API Reference - Full REST API documentation