Objectives
List objectives
List objective events
Continue an objective
Cancel an objective
Compact an objective
List objective context windows
ModelsExpand Collapse
type AssistantMessage struct{…}
CallableTool is a union that represents a tool that can be called by an agent. In Cadenya, a tool that is used within an agent objective might be a user-defined tool (IE: MCP, HTTP), another Agent (useful to separate context), or a Cadenya Tool (one Cadenya provides).
type AssistantToolCall struct{…}
CallableTool is a union that represents a tool that can be called by an agent. In Cadenya, a tool that is used within an agent objective might be a user-defined tool (IE: MCP, HTTP), another Agent (useful to separate context), or a Cadenya Tool (one Cadenya provides).
type CallableTool struct{…}
CallableTool is a union that represents a tool that can be called by an agent. In Cadenya, a tool that is used within an agent objective might be a user-defined tool (IE: MCP, HTTP), another Agent (useful to separate context), or a Cadenya Tool (one Cadenya provides).
type ContextWindowCompacted struct{…}
The new context window created by this compaction
CompletionTokens int64optional
A calculated value for how many completion tokens (output tokens) have been used in this context window
PreviousWindowContinueInstructions stringoptional
The instructions for this window to continue from a previous window's chat history.
type Objective struct{…}
Data ObjectiveData
Agent resource
Metadata ResourceMetadata
Spec AgentSpec
Agent specification (user-provided configuration)
VariationSelectionMode AgentSpecVariationSelectionMode
Controls how variations are automatically selected when creating objectives Defaults to RANDOM when unspecified
AgentInfo contains simple information about an agent for display or quick reference
Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
Metadata AccountResourceMetadata
Spec ProfileSpec
Data unknownoptional
Represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values.
InitialMessage stringoptional
The initial message sent to the agent. This becomes the first user message in the LLM chat history.
ParentObjectiveID stringoptional
A parent objective means the objective was spawned off using a separate agent to complete an objective
AgentVariation resource
Metadata ResourceMetadata
Spec AgentVariationSpec
AgentVariationSpec defines the operational configuration for a variation
Description stringoptional
Human-readable description of what this variation does or when it should be used
EnableEpisodicMemory booloptional
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 int64optional
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.
Tool selection strategy
AutoDiscovery 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. 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.
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.
Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
Metadata AccountResourceMetadata
Spec ProfileSpec
FeedbackCount int64optional
Total number of objective feedbacks received for this variation
Metadata OperationMetadata
Metadata for ephemeral operations and activities (e.g., objectives, executions, runs)
Status ObjectiveStatus
ObjectiveInfo provides read-only aggregated statistics about an objective's execution
List of callable tools assigned to the agent for this objective Includes tools, agents, and cadenya-provided tools from the agent's configuration
Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
Metadata AccountResourceMetadata
Spec ProfileSpec
TotalContextWindows int64optional
Total number of context windows that this objective has generated
TotalEvents int64optional
Total number of events generated during this objective's execution
TotalInputTokens int64optional
Total input tokens consumed across all LLM completions across all context windows
Read-only list of the last five windows of execution for this objective, ordered by most recent first. Is only included in singular RPC calls (GetObjective, for example).
CompletionTokens int64optional
A calculated value for how many completion tokens (output tokens) have been used in this context window
PreviousWindowContinueInstructions stringoptional
The instructions for this window to continue from a previous window's chat history.
Metadata OperationMetadata
Metadata for ephemeral operations and activities (e.g., objectives, executions, runs)
Info ObjectiveContextWindowInfooptional
Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
Metadata AccountResourceMetadata
Spec ProfileSpec
Metadata for ephemeral operations and activities (e.g., objectives, executions, runs)
type ObjectiveContextWindow struct{…}
ObjectiveContextWindow is a window of chat completions that is grouped together to prevent context-window overflows. Context windows also allow agents to compact their windows and carry on into a new one.
CompletionTokens int64optional
A calculated value for how many completion tokens (output tokens) have been used in this context window
PreviousWindowContinueInstructions stringoptional
The instructions for this window to continue from a previous window's chat history.
Metadata OperationMetadata
Metadata for ephemeral operations and activities (e.g., objectives, executions, runs)
Info ObjectiveContextWindowInfooptional
Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
Metadata AccountResourceMetadata
Spec ProfileSpec
Metadata for ephemeral operations and activities (e.g., objectives, executions, runs)
type ObjectiveContextWindowData struct{…}
CompletionTokens int64optional
A calculated value for how many completion tokens (output tokens) have been used in this context window
PreviousWindowContinueInstructions stringoptional
The instructions for this window to continue from a previous window's chat history.
type ObjectiveData struct{…}
Agent resource
Metadata ResourceMetadata
Spec AgentSpec
Agent specification (user-provided configuration)
VariationSelectionMode AgentSpecVariationSelectionMode
Controls how variations are automatically selected when creating objectives Defaults to RANDOM when unspecified
AgentInfo contains simple information about an agent for display or quick reference
Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
Metadata AccountResourceMetadata
Spec ProfileSpec
Data unknownoptional
Represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values.
InitialMessage stringoptional
The initial message sent to the agent. This becomes the first user message in the LLM chat history.
ParentObjectiveID stringoptional
A parent objective means the objective was spawned off using a separate agent to complete an objective
AgentVariation resource
Metadata ResourceMetadata
Spec AgentVariationSpec
AgentVariationSpec defines the operational configuration for a variation
Description stringoptional
Human-readable description of what this variation does or when it should be used
EnableEpisodicMemory booloptional
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 int64optional
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.
Tool selection strategy
AutoDiscovery 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. 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.
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.
Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
Metadata AccountResourceMetadata
Spec ProfileSpec
FeedbackCount int64optional
Total number of objective feedbacks received for this variation
type ObjectiveEventData struct{…}
CallableTool is a union that represents a tool that can be called by an agent. In Cadenya, a tool that is used within an agent objective might be a user-defined tool (IE: MCP, HTTP), another Agent (useful to separate context), or a Cadenya Tool (one Cadenya provides).
The new context window created by this compaction
CompletionTokens int64optional
A calculated value for how many completion tokens (output tokens) have been used in this context window
PreviousWindowContinueInstructions stringoptional
The instructions for this window to continue from a previous window's chat history.
Metadata for ephemeral operations and activities (e.g., objectives, executions, runs)
type ObjectiveEventInfo struct{…}
Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
Metadata AccountResourceMetadata
Spec ProfileSpec
Metadata for ephemeral operations and activities (e.g., objectives, executions, runs)
type ObjectiveEventWebhookData struct{…}
The envelope for an objective event webhook delivery. Contains timestamp, event type, and the webhook data payload.
Data ObjectiveEventWebhookDataData
The webhook data payload with flat top-level keys for agent, variation, objective, and event.
Agent ResourceMetadata
AgentVariation ResourceMetadata
Objective OperationMetadata
Metadata for ephemeral operations and activities (e.g., objectives, executions, runs)
ObjectiveEvent ObjectiveEventWebhookDataDataObjectiveEvent
Data ObjectiveEventData
CallableTool is a union that represents a tool that can be called by an agent. In Cadenya, a tool that is used within an agent objective might be a user-defined tool (IE: MCP, HTTP), another Agent (useful to separate context), or a Cadenya Tool (one Cadenya provides).
The new context window created by this compaction
CompletionTokens int64optional
A calculated value for how many completion tokens (output tokens) have been used in this context window
PreviousWindowContinueInstructions stringoptional
The instructions for this window to continue from a previous window's chat history.
Metadata for ephemeral operations and activities (e.g., objectives, executions, runs)
Metadata OperationMetadata
Metadata for ephemeral operations and activities (e.g., objectives, executions, runs)
Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
Metadata AccountResourceMetadata
Spec ProfileSpec
Metadata for ephemeral operations and activities (e.g., objectives, executions, runs)
type ObjectiveInfo struct{…}
ObjectiveInfo provides read-only aggregated statistics about an objective's execution
List of callable tools assigned to the agent for this objective Includes tools, agents, and cadenya-provided tools from the agent's configuration
Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
Metadata AccountResourceMetadata
Spec ProfileSpec
TotalContextWindows int64optional
Total number of context windows that this objective has generated
TotalEvents int64optional
Total number of events generated during this objective's execution
TotalInputTokens int64optional
Total input tokens consumed across all LLM completions across all context windows
type SubObjectiveCreated struct{…}
Metadata for ephemeral operations and activities (e.g., objectives, executions, runs)
ObjectivesTools
List objective tools
ModelsExpand Collapse
type ObjectiveTool struct{…}
ObjectiveTool represents a tool that was assigned to an objective.
Metadata BareMetadata
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.
Snapshot of the tool at the time it was assigned to the objective. Because tools can change over time, snapshots are used to ensure tools don't change unexpectedly during an objective's lifecycle.
Metadata ResourceMetadata
Spec ToolSpec
Config ToolSpecConfig
Config defines the adapter to use for the tool. This is used to determine how the tool is called. For example, if the tool is an HTTP tool, the adapter will be Http. If the tool is an inline tool, the adapter will be Inline.
Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
Metadata AccountResourceMetadata
Spec ProfileSpec
ObjectivesTool Calls
List objective tool calls
Approve a tool call
Deny a tool call
ModelsExpand Collapse
type ObjectiveToolCall struct{…}
ObjectiveToolCall is a record of a tool call made during an objective's execution. Tool calls are mutable — their status changes as they are approved, denied, or executed.
Callable CallableTool
CallableTool is a union that represents a tool that can be called by an agent. In Cadenya, a tool that is used within an agent objective might be a user-defined tool (IE: MCP, HTTP), another Agent (useful to separate context), or a Cadenya Tool (one Cadenya provides).
Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
Metadata AccountResourceMetadata
Spec ProfileSpec
Metadata OperationMetadata
Metadata for ephemeral operations and activities (e.g., objectives, executions, runs)
Status ObjectiveToolCallStatus
Current status of the tool call
ExecutionStatus ObjectiveToolCallExecutionStatusoptional
Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
Metadata AccountResourceMetadata
Spec ProfileSpec
Metadata for ephemeral operations and activities (e.g., objectives, executions, runs)
type ObjectiveToolCallData struct{…}
Callable CallableTool
CallableTool is a union that represents a tool that can be called by an agent. In Cadenya, a tool that is used within an agent objective might be a user-defined tool (IE: MCP, HTTP), another Agent (useful to separate context), or a Cadenya Tool (one Cadenya provides).
Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
Metadata AccountResourceMetadata
Spec ProfileSpec
type ObjectiveToolCallInfo struct{…}
Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
Metadata AccountResourceMetadata
Spec ProfileSpec
Metadata for ephemeral operations and activities (e.g., objectives, executions, runs)
ObjectivesTasks
List objective tasks
Get an objective task by ID
ModelsExpand Collapse
type ObjectiveTask struct{…}
ObjectiveTask represents a task within an objective, typically created and managed by an AI agent to track progress toward completing the objective.
Data ObjectiveTaskData
Metadata BareMetadata
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.
ObjectivesFeedback
Submit feedback for an objective
List feedback for an objective
ModelsExpand Collapse
type ObjectiveFeedback struct{…}
ObjectiveFeedback represents feedback submitted for an objective's execution. Feedback is used to score agent variations and improve agent performance over time.
Metadata BareMetadata
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.
Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
Metadata AccountResourceMetadata
Spec ProfileSpec
type ObjectiveFeedbackData struct{…}
type ObjectiveFeedbackInfo struct{…}
Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).