Skip to main content

Agentlify Documentation

Complete guide to building reliable autonomous agents with Agentlify's intelligent routing platform. Create routers that automatically select the best model for each workflow step—optimizing for planning, coding, and execution phases.

Core Capabilities

Agent Routing
Automatic model selection based on workflow phase (planning vs execution), task complexity, and agent type.
Universal Access
Give your agents access to 35 models from OpenAI, Anthropic, Google, and more through a single API.
Self-Healing
Automatic failover and retry logic ensures your autonomous agents don't crash in production loops.

Choose Your SDK

Agentlify works with both our native SDK and the OpenAI SDK for easy migration.

Agentlify SDK

Recommended
Purpose-built SDK with full Agentlify features

Task classification

Prompts are classified by task type and routed to models optimized for that task.

javascript
const Agentlify = require('agentlify');

const client = new Agentlify({
  apiKey: 'mp_xxx',
  routerId: 'router_xxx'
});

const completion = await client.chat.completions.create({
  messages: [{ role: 'user', content: 'Hello!' }]
});
View full guide
OpenAI

OpenAI SDK

baseURL change only
OpenAI-compatible endpoints, request/response formats, headers.

Core features

javascript
const { OpenAI } = require('openai');

const client = new OpenAI({
  apiKey: 'mp_xxx',
  baseURL: 'https://agentlify.co/api/router/{routerId}'
});

const completion = await client.chat.completions.create({
  messages: [{ role: 'user', content: 'Hello!' }]
});
View migration guide

Popular Topics

Ready to get started?
Create your account and start routing AI requests intelligently.