Anything a call can reach is a target.
Keyline treats models, tools, external APIs, agents and workflows the same way: each one is a target with a schema. That is what lets one key and one router cover all of them.
Five kinds of target
| Kind | For example | How it behaves |
|---|---|---|
| Model | A reasoning step, a summary, a formatter. | Called with a prompt and returns text or structured output. |
| Tool | Web search, a code sandbox, a document index. | Does one job and returns its result. Has no plan of its own. |
| External API | Market data, chain data, your order system. | A third-party or private HTTP service wrapped in a schema. |
| Agent | A research agent, a coding agent, an analyst. | Plans for itself and may call other targets you allow it. |
| Workflow | A fixed sequence you run often. | A saved plan: the same steps in the same order every time. |
The contract
These are the types the Keyline codebase is built around today. The planner reads a target’s schema to decide whether a task needs it; the trace records each call against the target it went to.
They are the working model, not a published API. Expect them to change before release.
type TargetKind = 'model' | 'tool' | 'api' | 'agent' | 'workflow';
/** Anything the router can send a call to. */
interface Target {
id: string;
kind: TargetKind;
name: string;
description: string;
/** JSON Schema for the call input. */
inputSchema: Record<string, unknown>;
/** JSON Schema for the call output, when the target declares one. */
outputSchema?: Record<string, unknown>;
}
/** One routed call inside an execution. */
interface Call {
id: string;
target: string;
kind: TargetKind;
status: 'queued' | 'running' | 'succeeded' | 'failed' | 'skipped';
startedAtMs: number;
latencyMs: number | null;
/** Millionths of a US dollar, to keep sums exact. */
costMicros: number;
/** Calls whose output this call consumed. */
parents: string[];
}The catalog is not open yet
There is no public list of supported tools or providers, and no count, because none are connected in production yet. When integrations go live they will be listed here with their schemas.