Agents
Manage AI agents within a workspace. Agents define AI behavior and tool access.
List agents
Create a new agent
Get an agent by ID
Delete an agent
Update an agent
ModelsExpand Collapse
Agent { metadata, spec, info }
Agent resource
Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
name: string
Human-readable name for the resource (e.g., “Customer Support Agent”, “Email Tool”) Required for resources that users interact with directly
Agent specification (user-provided configuration)
status: "AGENT_STATUS_UNSPECIFIED" | "AGENT_STATUS_DRAFT" | "AGENT_STATUS_PUBLISHED" | "AGENT_STATUS_ARCHIVED"
variationSelectionMode: "VARIATION_SELECTION_MODE_UNSPECIFIED" | "VARIATION_SELECTION_MODE_RANDOM" | "VARIATION_SELECTION_MODE_WEIGHTED"
inputDataSchema?: Record<string, unknown>
InputDataSchema is used for enforcing a data input when objectives are created. This is valuable when using liquid formatting in agent variation prompts. Input data schema is also valuable when using an agent as a sub-agent, as the schema is used as the tool’s input parameter schema. If omitted, the sub-agent schema will be loaded with a simple “prompt” free text string as its schema.
outputDefinition?: Record<string, unknown>
Optional output definition for objectives created for this agent. When provided, Cadenya will append a tool to that will be called by the LLM in use by the variant to extract information in the format provided here. Use this option when you want structured data to be created by your objectives.
AgentInfo contains simple information about an agent for display or quick reference
A profile identifies a user or non-human principal (such as an API key) at the account level. Profiles are account-scoped and can be granted access to multiple workspaces.
AgentInfo { createdBy, variationCount }
AgentInfo contains simple information about an agent for display or quick reference
A profile identifies a user or non-human principal (such as an API key) at the account level. Profiles are account-scoped and can be granted access to multiple workspaces.
AgentSpec { status, variationSelectionMode, description, 3 more }
Agent specification (user-provided configuration)
status: "AGENT_STATUS_UNSPECIFIED" | "AGENT_STATUS_DRAFT" | "AGENT_STATUS_PUBLISHED" | "AGENT_STATUS_ARCHIVED"
variationSelectionMode: "VARIATION_SELECTION_MODE_UNSPECIFIED" | "VARIATION_SELECTION_MODE_RANDOM" | "VARIATION_SELECTION_MODE_WEIGHTED"
inputDataSchema?: Record<string, unknown>
InputDataSchema is used for enforcing a data input when objectives are created. This is valuable when using liquid formatting in agent variation prompts. Input data schema is also valuable when using an agent as a sub-agent, as the schema is used as the tool’s input parameter schema. If omitted, the sub-agent schema will be loaded with a simple “prompt” free text string as its schema.
outputDefinition?: Record<string, unknown>
Optional output definition for objectives created for this agent. When provided, Cadenya will append a tool to that will be called by the LLM in use by the variant to extract information in the format provided here. Use this option when you want structured data to be created by your objectives.
AgentsFeedback
Manage AI agents within a workspace. Agents define AI behavior and tool access.
List feedback for an agent
AgentsWebhook Deliveries
Manage AI agents within a workspace. Agents define AI behavior and tool access.
List webhook deliveries
ModelsExpand Collapse
WebhookDelivery { data, metadata }
Webhook delivery details.
eventType: "OBJECTIVE_EVENT_TYPE_UNSPECIFIED" | "OBJECTIVE_EVENT_TYPE_USER_MESSAGE" | "OBJECTIVE_EVENT_TYPE_TOOL_APPROVAL_REQUESTED" | 13 more
The type of objective event that triggered this webhook delivery
WebhookDeliveryData { agentId, attemptCount, eventType, 11 more }
eventType: "OBJECTIVE_EVENT_TYPE_UNSPECIFIED" | "OBJECTIVE_EVENT_TYPE_USER_MESSAGE" | "OBJECTIVE_EVENT_TYPE_TOOL_APPROVAL_REQUESTED" | 13 more
The type of objective event that triggered this webhook delivery
AgentsVariations
Manage variations of an agent and their tool, sub-agent, and memory layer assignments.
List variations
Create a new variation
Get a variation by ID
Delete a variation
Update a variation
Add an assignment to a variation
Remove an assignment from a variation
Attach a memory layer to a variation
Update a variation's memory layer assignment
Remove a memory layer assignment from a variation
ModelsExpand Collapse
AgentVariation { metadata, spec, info }
AgentVariation resource
Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
name: string
Human-readable name for the resource (e.g., “Customer Support Agent”, “Email Tool”) Required for resources that users interact with directly
AgentVariationSpec defines the operational configuration for a variation
compactionConfig?: AgentVariationSpecCompactionConfig { summarization, toolResultClearing, triggerThreshold }
description?: string
Human-readable description of what this variation does or when it should be used
enableEpisodicMemory?: boolean
Enable episodic memory for objectives using this variation. When true, the system automatically creates a document namespace for each objective using the objective’s episodic_key as the external_id, allowing the agent to store and retrieve documents specific to that episode.
episodicMemoryTtl?: number
How long episodic memories should be retained. After this duration, episodic document namespaces can be automatically cleaned up. If not set, episodic memories are retained indefinitely.
ProgressiveDiscovery is used to indicate that the agent should automatically discover tools that are not explicitly assigned to it. Max tools is the maximum number of tools that can be discovered per search. Hints are optional hints for tool search. These are used in conjunction with the context-aware tool search and can help select the best tools for the task.
rerankThreshold?: number
Rerank Threshold is an optional value that instructs whether or not to run a search result through a embedding/reranker process which can improve performance and reduce context bloat when tools reach the configured threshold. If a tool match must exceed 0.8, for example, the tool very closely match the query the tool search performed.
AgentVariationInfo provides read-only summary information about a variation
All tools, tool sets, and sub-agents assigned to this variation. Populated on reads so clients can render a variation’s full assignment list without calling the add/remove endpoints just to enumerate.
BareMetadata contains the minimal metadata for a resource: the ID and an optional human-readable name. These are used for reference fields where the full metadata (account scoping, timestamps, labels, external IDs) is not needed — e.g., the tool references inside an agent variation spec or the tools assigned to an objective. Both fields are server-populated; clients provide IDs through sibling fields rather than by constructing a BareMetadata themselves.
BareMetadata contains the minimal metadata for a resource: the ID and an optional human-readable name. These are used for reference fields where the full metadata (account scoping, timestamps, labels, external IDs) is not needed — e.g., the tool references inside an agent variation spec or the tools assigned to an objective. Both fields are server-populated; clients provide IDs through sibling fields rather than by constructing a BareMetadata themselves.
BareMetadata contains the minimal metadata for a resource: the ID and an optional human-readable name. These are used for reference fields where the full metadata (account scoping, timestamps, labels, external IDs) is not needed — e.g., the tool references inside an agent variation spec or the tools assigned to an objective. Both fields are server-populated; clients provide IDs through sibling fields rather than by constructing a BareMetadata themselves.
A profile identifies a user or non-human principal (such as an API key) at the account level. Profiles are account-scoped and can be granted access to multiple workspaces.
Read-only list of memory layer assignments for this variation,
returned in ascending position (bottom → top). Capped at 10 entries.
id?: string
Assignment row id — handle for removing the assignment. Distinct from the referenced memory layer’s id.
BareMetadata contains the minimal metadata for a resource: the ID and an optional human-readable name. These are used for reference fields where the full metadata (account scoping, timestamps, labels, external IDs) is not needed — e.g., the tool references inside an agent variation spec or the tools assigned to an objective. Both fields are server-populated; clients provide IDs through sibling fields rather than by constructing a BareMetadata themselves.
position?: number
Position in the variation’s baseline stack. Lower values sit lower; the highest-position assignment is on top of the variation’s baseline. Gaps are fine — only relative position matters. Positions must be unique within a variation; a request that would collide with an existing assignment’s position is rejected with InvalidArgument.
Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
name: string
Human-readable name for the resource (e.g., “Customer Support Agent”, “Email Tool”) Required for resources that users interact with directly
AgentVariationInfo { assignments, createdBy, feedbackCount, 7 more }
AgentVariationInfo provides read-only summary information about a variation
All tools, tool sets, and sub-agents assigned to this variation. Populated on reads so clients can render a variation’s full assignment list without calling the add/remove endpoints just to enumerate.
BareMetadata contains the minimal metadata for a resource: the ID and an optional human-readable name. These are used for reference fields where the full metadata (account scoping, timestamps, labels, external IDs) is not needed — e.g., the tool references inside an agent variation spec or the tools assigned to an objective. Both fields are server-populated; clients provide IDs through sibling fields rather than by constructing a BareMetadata themselves.
BareMetadata contains the minimal metadata for a resource: the ID and an optional human-readable name. These are used for reference fields where the full metadata (account scoping, timestamps, labels, external IDs) is not needed — e.g., the tool references inside an agent variation spec or the tools assigned to an objective. Both fields are server-populated; clients provide IDs through sibling fields rather than by constructing a BareMetadata themselves.
BareMetadata contains the minimal metadata for a resource: the ID and an optional human-readable name. These are used for reference fields where the full metadata (account scoping, timestamps, labels, external IDs) is not needed — e.g., the tool references inside an agent variation spec or the tools assigned to an objective. Both fields are server-populated; clients provide IDs through sibling fields rather than by constructing a BareMetadata themselves.
A profile identifies a user or non-human principal (such as an API key) at the account level. Profiles are account-scoped and can be granted access to multiple workspaces.
Read-only list of memory layer assignments for this variation,
returned in ascending position (bottom → top). Capped at 10 entries.
id?: string
Assignment row id — handle for removing the assignment. Distinct from the referenced memory layer’s id.
BareMetadata contains the minimal metadata for a resource: the ID and an optional human-readable name. These are used for reference fields where the full metadata (account scoping, timestamps, labels, external IDs) is not needed — e.g., the tool references inside an agent variation spec or the tools assigned to an objective. Both fields are server-populated; clients provide IDs through sibling fields rather than by constructing a BareMetadata themselves.
position?: number
Position in the variation’s baseline stack. Lower values sit lower; the highest-position assignment is on top of the variation’s baseline. Gaps are fine — only relative position matters. Positions must be unique within a variation; a request that would collide with an existing assignment’s position is rejected with InvalidArgument.
Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
name: string
Human-readable name for the resource (e.g., “Customer Support Agent”, “Email Tool”) Required for resources that users interact with directly
AgentVariationSpec { compactionConfig, constraints, description, 6 more }
AgentVariationSpec defines the operational configuration for a variation
compactionConfig?: AgentVariationSpecCompactionConfig { summarization, toolResultClearing, triggerThreshold }
description?: string
Human-readable description of what this variation does or when it should be used
enableEpisodicMemory?: boolean
Enable episodic memory for objectives using this variation. When true, the system automatically creates a document namespace for each objective using the objective’s episodic_key as the external_id, allowing the agent to store and retrieve documents specific to that episode.
episodicMemoryTtl?: number
How long episodic memories should be retained. After this duration, episodic document namespaces can be automatically cleaned up. If not set, episodic memories are retained indefinitely.
ProgressiveDiscovery is used to indicate that the agent should automatically discover tools that are not explicitly assigned to it. Max tools is the maximum number of tools that can be discovered per search. Hints are optional hints for tool search. These are used in conjunction with the context-aware tool search and can help select the best tools for the task.
rerankThreshold?: number
Rerank Threshold is an optional value that instructs whether or not to run a search result through a embedding/reranker process which can improve performance and reduce context bloat when tools reach the configured threshold. If a tool match must exceed 0.8, for example, the tool very closely match the query the tool search performed.
AgentVariationSpecCompactionConfig { summarization, toolResultClearing, triggerThreshold }
AgentVariationSpecProgressiveDiscovery { hints, maxTools, rerankThreshold }
ProgressiveDiscovery is used to indicate that the agent should automatically discover tools that are not explicitly assigned to it. Max tools is the maximum number of tools that can be discovered per search. Hints are optional hints for tool search. These are used in conjunction with the context-aware tool search and can help select the best tools for the task.
rerankThreshold?: number
Rerank Threshold is an optional value that instructs whether or not to run a search result through a embedding/reranker process which can improve performance and reduce context bloat when tools reach the configured threshold. If a tool match must exceed 0.8, for example, the tool very closely match the query the tool search performed.
VariationAssignment { id, agent, tool, toolSet }
A read-only reference to a single tool, tool set, or sub-agent attached to
a variation. Read the full set of assignments via AgentVariationInfo.assignments;
mutations go through the dedicated add/remove assignment endpoints.
The id identifies the assignment itself (not the referenced resource) and
is the handle used to remove the assignment. It is returned by the add
endpoint and present on every entry in AgentVariationInfo.assignments.
BareMetadata contains the minimal metadata for a resource: the ID and an optional human-readable name. These are used for reference fields where the full metadata (account scoping, timestamps, labels, external IDs) is not needed — e.g., the tool references inside an agent variation spec or the tools assigned to an objective. Both fields are server-populated; clients provide IDs through sibling fields rather than by constructing a BareMetadata themselves.
BareMetadata contains the minimal metadata for a resource: the ID and an optional human-readable name. These are used for reference fields where the full metadata (account scoping, timestamps, labels, external IDs) is not needed — e.g., the tool references inside an agent variation spec or the tools assigned to an objective. Both fields are server-populated; clients provide IDs through sibling fields rather than by constructing a BareMetadata themselves.
BareMetadata contains the minimal metadata for a resource: the ID and an optional human-readable name. These are used for reference fields where the full metadata (account scoping, timestamps, labels, external IDs) is not needed — e.g., the tool references inside an agent variation spec or the tools assigned to an objective. Both fields are server-populated; clients provide IDs through sibling fields rather than by constructing a BareMetadata themselves.
VariationMemoryLayerAssignment { id, memoryLayer, position }
VariationMemoryLayerAssignment attaches a single MemoryLayer to a variation at a given position in the variation’s baseline memory stack. A variation has at most one assignment per memory_layer_id.
Variations only support whole-layer attachments — entry pinning is an objective-level capability.
id?: string
Assignment row id — handle for removing the assignment. Distinct from the referenced memory layer’s id.
BareMetadata contains the minimal metadata for a resource: the ID and an optional human-readable name. These are used for reference fields where the full metadata (account scoping, timestamps, labels, external IDs) is not needed — e.g., the tool references inside an agent variation spec or the tools assigned to an objective. Both fields are server-populated; clients provide IDs through sibling fields rather than by constructing a BareMetadata themselves.
position?: number
Position in the variation’s baseline stack. Lower values sit lower; the highest-position assignment is on top of the variation’s baseline. Gaps are fine — only relative position matters. Positions must be unique within a variation; a request that would collide with an existing assignment’s position is rejected with InvalidArgument.
AgentsSchedules
Manage recurring schedules attached to agents. Schedules trigger objectives on a cadence defined by AgentScheduleSpec.Schedule.
List schedules
Create a new schedule
Get a schedule by ID
Delete a schedule
Update a schedule
ModelsExpand Collapse
AgentSchedule { metadata, spec, info }
AgentSchedule resource — a recurring trigger attached to an agent that creates objectives on its cadence.
Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
name: string
Human-readable name for the resource (e.g., “Customer Support Agent”, “Email Tool”) Required for resources that users interact with directly
AgentScheduleSpec is the user-provided configuration for a schedule.
initialMessage: string
The initial message passed to CreateObjective on each fire. Becomes the first user message in the objective’s chat history.
data?: unknown
Optional input data passed to the objective. If the agent has an input_data_schema, this must satisfy it.
AgentScheduleInfo provides read-only runtime data about a schedule.
A profile identifies a user or non-human principal (such as an API key) at the account level. Profiles are account-scoped and can be granted access to multiple workspaces.
lastSkippedAt?: string
When the schedule most recently skipped a fire (SKIP policy + prior in flight).
AgentScheduleInfo { createdBy, lastFireAt, lastObjectiveId, 4 more }
AgentScheduleInfo provides read-only runtime data about a schedule.
A profile identifies a user or non-human principal (such as an API key) at the account level. Profiles are account-scoped and can be granted access to multiple workspaces.
lastSkippedAt?: string
When the schedule most recently skipped a fire (SKIP policy + prior in flight).
AgentScheduleSpec { initialMessage, schedule, data, 3 more }
AgentScheduleSpec is the user-provided configuration for a schedule.
initialMessage: string
The initial message passed to CreateObjective on each fire. Becomes the first user message in the objective’s chat history.
data?: unknown
Optional input data passed to the objective. If the agent has an input_data_schema, this must satisfy it.