Agents SDK
Build agents in code: tools, handoffs, guardrails and approvals, on any model, on Cencori's durable runtime.
cencori/agents is a code-first SDK for building agents. You define agents and tools in TypeScript, your tools run in your process, and every run lives in a Cencori session: durable, traced, and able to wait hours for a human.
import { Agent, run, tool } from 'cencori/agents';
import { z } from 'zod';
const getOrder = tool({
name: 'get_order',
description: 'Look up an order by id.',
parameters: z.object({ id: z.string() }),
execute: async ({ id }) => db.orders.find(id),
});
const support = new Agent({
name: 'Support',
instructions: 'Help customers with their orders. Be brief.',
tools: [getOrder],
});
const result = await run(support, 'Where is order 1042?');
console.log(result.finalOutput);Why build on Cencori
What's in the SDK
Install
npm install cencori zodSet CENCORI_API_KEY to a secret project key (csk_...). zod is optional: tools also accept JSON Schema or any Standard Schema library.
Next: the quickstart.

