|
The Agent
defineAgent and agent.ts — declare the model and Cencori configuration for an agent.
agent/agent.ts is the root of an agent. It default-exports an AgentConfig
built with defineAgent, which declares the model and how the agent talks to
Cencori.
import { defineAgent } from "arcie";
export default defineAgent({
model: "claude-sonnet-4-5",
name: "my-agent",
cencori: {
project: process.env.CENCORI_PROJECT_ID,
billing: { budget: "50.00/month" },
},
});defineAgent validates the config and returns it unchanged. The only hard
requirement is a model — omitting it throws Agent must specify a model.
AgentConfig
interface AgentConfig {
model: string; // required — any model Cencori can route
name?: string;
description?: string; // required for subagents (see below)
cencori?: CencoriConfig;
}CencoriConfig
interface CencoriConfig {
project?: string; // Cencori project id (sent as X-Project-ID)
apiKey?: string; // overrides CENCORI_API_KEY
billing?: {
budget?: string; // e.g. "50.00/month"
endUserMarkup?: number; // markup for Monetization
};
security?: {
policy?: "strict" | "standard" | "permissive";
};
}The cencori block is how an agent inherits Cencori's production features —
billing limits, security policy, and project-scoped routing. See
Cencori integration for the full picture.
Note
If agent.ts is missing or fails to load, Zett falls back to a default config of
{ model: "gpt-4o" }. Always commit an explicit agent.ts.