Skip to content
Get started
API Reference

API Reference

Libraries

npm install @cadenya/cadenya
go get -u 'github.com/cadenya/cadenya-go@v0.0.1'
 

API Overview

Account

AccountService manages account-level operations. Accounts are the top-level organizational unit in the system. All operations are scoped to the authenticated account determined by the JWT token.

Authentication: Bearer token (JWT) Scope: Account-level operations

Agents

AgentService manages AI agents at the WORKSPACE level. Agents are workspace-scoped resources that define AI behavior and tool access. All operations are implicitly scoped to the workspace determined by the JWT token.

Authentication: Bearer token (JWT) Scope: Workspace-level operations

List agents
GET/v1/agents
Create a new agent
POST/v1/agents
Get an agent by ID
GET/v1/agents/{id}
Delete an agent
DELETE/v1/agents/{id}
Update an agent
PATCH/v1/agents/{id}

AgentsWebhook Deliveries

AgentService manages AI agents at the WORKSPACE level. Agents are workspace-scoped resources that define AI behavior and tool access. All operations are implicitly scoped to the workspace determined by the JWT token.

Authentication: Bearer token (JWT) Scope: Workspace-level operations

List webhook deliveries
GET/v1/agents/{agentId}/webhook_deliveries

Agent Variations

List variations
GET/v1/agents/{agentId}/variations
Create a new variation
POST/v1/agents/{agentId}/variations
Get a variation by ID
GET/v1/agents/{agentId}/variations/{id}
Delete a variation
DELETE/v1/agents/{agentId}/variations/{id}
Update a variation
PATCH/v1/agents/{agentId}/variations/{id}
Add an assignment to a variation
POST/v1/agent_variations/{agentVariationId}/assignments
Remove an assignment from a variation
DELETE/v1/agent_variations/{agentVariationId}/assignments/{id}

Objectives

List objectives
GET/v1/objectives
Create a new objective
POST/v1/objectives
Get an objective by ID
GET/v1/objectives/{id}
List objective events
GET/v1/objectives/{objectiveId}/events
Continue an objective
POST/v1/objectives/{objectiveId}/continue
Cancel an objective
POST/v1/objectives/{objectiveId}/cancel
Compact an objective
POST/v1/objectives/{objectiveId}/compact
List objective context windows
GET/v1/objectives/{objectiveId}/context_windows

ObjectivesTools

List objective tools
GET/v1/objectives/{objectiveId}/tools

ObjectivesTool Calls

List objective tool calls
GET/v1/objectives/{objectiveId}/tool_calls
Approve a tool call
PUT/v1/objectives/{objectiveId}/tool_calls/{toolCallId}/approve
Deny a tool call
PUT/v1/objectives/{objectiveId}/tool_calls/{toolCallId}/deny

ObjectivesTasks

List objective tasks
GET/v1/objectives/{objectiveId}/tasks
Get an objective task by ID
GET/v1/objectives/{objectiveId}/tasks/{id}

ObjectivesFeedback

Submit feedback for an objective
POST/v1/objectives/{objectiveId}/feedback
List feedback for an objective
GET/v1/objectives/{objectiveId}/feedback

Memory Layers

MemoryService manages memory layers and their entries at the WORKSPACE level. Layers are named containers that can be composed into an objective's memory stack; entries are the keyed values within a layer.

All operations are implicitly scoped to the workspace determined by the JWT token. System-managed layers (e.g., episodic layers created by the runtime) cannot be mutated through this API.

Authentication: Bearer token (JWT) Scope: Workspace-level operations

List memory layers
GET/v1/memory_layers
Create a new memory layer
POST/v1/memory_layers
Get a memory layer by ID
GET/v1/memory_layers/{id}
Update a memory layer
PATCH/v1/memory_layers/{id}
Delete a memory layer
DELETE/v1/memory_layers/{id}

Memory LayersEntries

MemoryService manages memory layers and their entries at the WORKSPACE level. Layers are named containers that can be composed into an objective's memory stack; entries are the keyed values within a layer.

All operations are implicitly scoped to the workspace determined by the JWT token. System-managed layers (e.g., episodic layers created by the runtime) cannot be mutated through this API.

Authentication: Bearer token (JWT) Scope: Workspace-level operations

List memory entries
GET/v1/memory_layers/{memoryLayerId}/entries
Create a new memory entry
POST/v1/memory_layers/{memoryLayerId}/entries
Get a memory entry by ID
GET/v1/memory_layers/{memoryLayerId}/entries/{id}
Update a memory entry
PATCH/v1/memory_layers/{memoryLayerId}/entries/{id}
Delete a memory entry
DELETE/v1/memory_layers/{memoryLayerId}/entries/{id}

Uploads

UploadService issues short-lived presigned URLs for direct client-to-object- storage uploads at the WORKSPACE level. Created uploads can be referenced by id when creating or updating resources that accept binary content (e.g., MemoryEntry).

Authentication: Bearer token (JWT) Scope: Workspace-level operations

Create an upload
POST/v1/uploads
Get an upload by ID
GET/v1/uploads/{id}

Models

ModelService manages LLM models at the WORKSPACE level. Models represent available LLM providers and families (e.g., "anthropic/claude-sonnet-4.6"). Models are seeded into workspaces and can be enabled or disabled. All operations are implicitly scoped to the workspace determined by the JWT token.

Authentication: Bearer token (JWT) Scope: Workspace-level operations

List models
GET/v1/models
Get a model by ID
GET/v1/models/{id}
Set model status
PUT/v1/models/{id}/status
Search for tools or tool sets
GET/v1/search/tools_or_tool_sets

Tool Sets

ToolService manages tool sets and tools at the WORKSPACE level. Tool sets group related tools, and tools define specific capabilities for agents. All operations are implicitly scoped to the workspace determined by the JWT token.

Note: When a ToolSet has managed=true, only API Key actors can modify its tools. Profile actors (humans) are restricted from modifying managed tool sets.

Authentication: Bearer token (JWT) Scope: Workspace-level operations

List tool sets
GET/v1/tool_sets
Create a new tool set
POST/v1/tool_sets
Get a tool set by ID
GET/v1/tool_sets/{id}
Update a tool set
PUT/v1/tool_sets/{id}
Delete a tool set
DELETE/v1/tool_sets/{id}
List tool set events
GET/v1/tool_sets/{toolSetId}/events

Tool SetsTools

ToolService manages tool sets and tools at the WORKSPACE level. Tool sets group related tools, and tools define specific capabilities for agents. All operations are implicitly scoped to the workspace determined by the JWT token.

Note: When a ToolSet has managed=true, only API Key actors can modify its tools. Profile actors (humans) are restricted from modifying managed tool sets.

Authentication: Bearer token (JWT) Scope: Workspace-level operations

List tools
GET/v1/tool_sets/{toolSetId}/tools
Create a new tool
POST/v1/tool_sets/{toolSetId}/tools
Get a tool by ID
GET/v1/tool_sets/{toolSetId}/tools/{id}
Update a tool
PUT/v1/tool_sets/{toolSetId}/tools/{id}
Delete a tool
DELETE/v1/tool_sets/{toolSetId}/tools/{id}

API Keys

APIKeyService manages workspace-scoped API Keys. Each API key belongs to a single workspace, ensuring isolation between environments.

Authentication: Bearer token (JWT) Scope: Workspace-level operations

List API keys
GET/v1/api_keys
Create a new API key
POST/v1/api_keys
Get an API key by ID
GET/v1/api_keys/{id}
Delete an API key
DELETE/v1/api_keys/{id}
Update an API key
PATCH/v1/api_keys/{id}
Rotate an API key
PUT/v1/api_keys/{id}/rotate

Workspace Secrets

List workspace secrets
GET/v1/workspace_secrets
Create a new workspace secret
POST/v1/workspace_secrets
Get a workspace secret by ID
GET/v1/workspace_secrets/{id}
Delete a workspace secret
DELETE/v1/workspace_secrets/{id}
Update a workspace secret
PATCH/v1/workspace_secrets/{id}

Workspaces

WorkspaceService manages workspaces at the ACCOUNT level. This service is responsible for creating and listing workspaces within an account. Workspaces provide organizational grouping for resources within an account.

Authentication: Bearer token (JWT) Scope: Account-level operations (manages workspaces themselves, not resources within workspaces)

List workspaces
GET/v1/workspaces
Get the current workspace
GET/v1/workspaces/current

Webhooks

Unwrap
Function