Programmatically create and control OpenClaw AI agents from your code or AI assistant.
| Package | Version | Description |
|---|---|---|
@creative-tim/agents |
TypeScript SDK — create agents, chat, stream, manage skills | |
@creative-tim/mcp |
MCP server — use agents from Claude Code, Cursor, Claude Desktop |
npm install @creative-tim/agentsimport { OpenClaw } from '@creative-tim/agents'
const client = new OpenClaw({ apiKey: 'sk-ct-...' })
const agent = await client.agents.create({
name: 'My Agent',
anthropicApiKey: process.env.ANTHROPIC_API_KEY!,
})
// Poll until ready (~60-80s cold, ~15-20s warm)
let status
do {
await new Promise(r => setTimeout(r, 5000))
status = await agent.status()
} while (status.status === 'provisioning')
const { text } = await agent.chat('Hello! What can you do?')
console.log(text)Add to .mcp.json:
{
"mcpServers": {
"creative-tim": {
"command": "npx",
"args": ["-y", "@creative-tim/mcp"],
"env": { "OPENCLAW_API_KEY": "sk-ct-..." }
}
}
}Then ask your AI: "Create a new OpenClaw agent and chat with it"
- Go to creative-tim.com/ui/dashboard/api-keys
- Scroll to OpenClaw Agents API Keys
- Click Create API key — copy your
sk-ct-...key (shown once)
pnpm install
pnpm buildApache-2.0 — Creative Tim
OpenClaw is an independent open-source project and is not affiliated with or endorsed by Creative Tim. OpenClaw is licensed under the MIT License. For more information visit openclaw.ai or the OpenClaw GitHub repository.