# Cadenya - [Set up Cadenya from a coding agent](https://cadenya.com/docs/setup-from-a-coding-agent.md): A coding agent installs the CLI, builds in a temporary workspace with no signup, and hands you a claim link. Claim it, then move the setup into config files. - [Introduction](https://cadenya.com/docs/index.md): Cadenya is the agent runtime. Create a free account (no card) and copy an API key, then a coding agent sets up the rest with the Cadenya CLI. - [Widget quickstart](https://cadenya.com/docs/guides/getting-started/widget-quickstart.md): Build a travel concierge with Cadenya Widgets, Next.js, and the React UI kit, then ship it to Vercel. - [Tool Sets](https://cadenya.com/docs/guides/the-basics/tool-sets.md): Tool Sets group the tools you assign to an Agent Variation. Build one from an OpenAPI spec, an MCP server, HTTP endpoints you define, or Bare tools you answer. - [Agents](https://cadenya.com/docs/guides/the-basics/agents.md): An Agent gives a role a stable identity in Cadenya. Its Agent Variations hold the model, prompts, and tools, so you can test configurations side by side. - [Objectives](https://cadenya.com/docs/guides/the-basics/objectives.md): An Objective runs an Agent Variation's loop with its tools, prompts, and rules. Create one, pass it data, stream its events, approve tools, and read the result. - [Memory](https://cadenya.com/docs/guides/the-basics/memory.md): Memory layers hold skills and episodic entries for your Agents. Create a layer, add entries, assign it to an Agent Variation, and watch Objectives read from it. - [Widgets](https://cadenya.com/docs/guides/the-basics/widgets.md): Widgets put a Cadenya Agent in your web app. Your backend mints a short-lived Widget Session, and the browser talks to the Widget host with no proxy in between. - [Webhooks](https://cadenya.com/docs/guides/the-basics/webhooks.md): Set one URL on an Agent and Cadenya sends a signed POST for every message, Tool Call, approval, memory read, Sub-Objective update, and error in its Objectives. - [CLI](https://cadenya.com/docs/guides/the-basics/cli.md): Install the cadenya CLI, log in, run commands against your workspace, look up any command's schema, and apply a directory of config files. - [API keys](https://cadenya.com/docs/api-keys.md): Copy a key from the dashboard or run cadenya api-keys create, then set it as CADENYA_API_KEY. Keys belong to the account and reach the workspaces you pick. - [Config files](https://cadenya.com/docs/config-files.md): Describe Tool Sets, Agents, memory layers, and Widgets as YAML in .cadenya/, preview with cadenya config plan, and apply with config apply or the GitHub Action. - [MCP server](https://cadenya.com/docs/mcp-server.md): Connect an MCP client to https://mcp.cadenya.com/mcp, sign in or send an API key as a bearer token, and manage Agents, Tool Sets, and objectives in three tools. - [Data and security](https://cadenya.com/docs/data-and-security.md): Where Cadenya processes data, who owns it, how long it's kept, and how secrets stay protected, with the policy and agreement sections that say so. - [API reference](https://cadenya.com/docs/api-reference.md): Authentication, resource identity, updates, pagination, and endpoints for the Cadenya API. - [List tool sets](https://cadenya.com/docs/api-reference/toolservice/list-tool-sets.md): Lists all tool sets in the workspace - [Create a new tool set](https://cadenya.com/docs/api-reference/toolservice/create-a-new-tool-set.md): Creates a new tool set in the workspace, together with any secrets in spec.secrets. - [Get a tool set by ID](https://cadenya.com/docs/api-reference/toolservice/get-a-tool-set-by-id.md): Retrieves a tool set by ID from the workspace - [Update a tool set](https://cadenya.com/docs/api-reference/toolservice/update-a-tool-set.md): Updates a tool set in the workspace. A masked spec.secrets replaces the tool set's secrets; a listed secret without a value keeps its stored value. - [Delete a tool set](https://cadenya.com/docs/api-reference/toolservice/delete-a-tool-set.md): Deletes a tool set in the workspace - [Archive a tool set](https://cadenya.com/docs/api-reference/toolservice/archive-a-tool-set.md): Transitions a tool set to STATE_ARCHIVED. Syncing stops, the tool set is hidden from list results, its tools are no longer offered to objectives, and new variation assignments are rejected. Existing assignments are retained, and history is preserved — unlike delete, archiving works while the tool se… - [Unarchive a tool set](https://cadenya.com/docs/api-reference/toolservice/unarchive-a-tool-set.md): Transitions an archived tool set back to STATE_ACTIVE. Managed tool sets resume syncing on their next cycle and their tools become available to objectives again. - [List tool set events](https://cadenya.com/docs/api-reference/toolservice/list-tool-set-events.md): Lists all events (including sync status) for a tool set - [Get consumed OpenAPI spec](https://cadenya.com/docs/api-reference/toolservice/get-consumed-openapi-spec.md): Retrieves the current OpenAPI specification JSON that has been consumed by the tool set. Only applicable to tool sets using the OpenAPI adapter. - [List tool set usage](https://cadenya.com/docs/api-reference/toolservice/list-tool-set-usage.md): Lists the agent variations (with their parent agent) that have the tool set assigned. Pass tool_id to instead list variations with a direct assignment of that individual tool; variations that receive the tool implicitly through a whole-set assignment are not included in that filtered view. - [List tools](https://cadenya.com/docs/api-reference/toolservice/list-tools.md): Lists all tools in the tool set - [Create a new tool](https://cadenya.com/docs/api-reference/toolservice/create-a-new-tool.md): Creates a new tool in the tool set - [Get a tool by ID](https://cadenya.com/docs/api-reference/toolservice/get-a-tool-by-id.md): Retrieves a tool by ID from the workspace - [Update a tool](https://cadenya.com/docs/api-reference/toolservice/update-a-tool.md): Updates a tool in the tool set - [Delete a tool](https://cadenya.com/docs/api-reference/toolservice/delete-a-tool.md): Deletes a tool in the tool set - [Omit a tool](https://cadenya.com/docs/api-reference/toolservice/omit-a-tool.md): Transitions a tool to STATE_OMITTED, excluding it from agent use. Fails if the tool is currently assigned to agent variations. - [Restore a tool](https://cadenya.com/docs/api-reference/toolservice/restore-a-tool.md): Transitions an omitted tool back to STATE_AVAILABLE. For managed tool sets, the next sync may omit the tool again if its filters still exclude it. - [Search for tools or tool sets](https://cadenya.com/docs/api-reference/searchservice/search-for-tools-or-tool-sets.md): Searches for tools or tool sets in the workspace - [List tool set secrets](https://cadenya.com/docs/api-reference/toolservice/list-tool-set-secrets.md): Lists all secrets scoped to the tool set - [Create a new tool set secret](https://cadenya.com/docs/api-reference/toolservice/create-a-new-tool-set-secret.md): Creates a new secret scoped to the tool set - [Get a tool set secret by ID](https://cadenya.com/docs/api-reference/toolservice/get-a-tool-set-secret-by-id.md): Retrieves a tool set secret by ID from the tool set - [Update a tool set secret](https://cadenya.com/docs/api-reference/toolservice/update-a-tool-set-secret.md): Updates a secret scoped to the tool set - [Delete a tool set secret](https://cadenya.com/docs/api-reference/toolservice/delete-a-tool-set-secret.md): Deletes a secret scoped to the tool set - [List agents](https://cadenya.com/docs/api-reference/agentservice/list-agents.md): Lists all agents in the workspace - [Create a new agent](https://cadenya.com/docs/api-reference/agentservice/create-a-new-agent.md): Creates a new agent in the workspace - [List feedback for an agent](https://cadenya.com/docs/api-reference/agentservice/list-feedback-for-an-agent.md): Lists feedback submitted across all objectives belonging to an agent. Supports search by comment, sentiment filter, agent variation filter, and creation date range. Results are ordered by creation time, newest first. - [List webhook deliveries](https://cadenya.com/docs/api-reference/agentservice/list-webhook-deliveries.md): Lists all webhook deliveries for an agent - [Get an agent by ID](https://cadenya.com/docs/api-reference/agentservice/get-an-agent-by-id.md): Retrieves an agent by ID from the workspace - [Delete an agent](https://cadenya.com/docs/api-reference/agentservice/delete-an-agent.md): Deletes an agent from the workspace - [Update an agent](https://cadenya.com/docs/api-reference/agentservice/update-an-agent.md): Updates an agent in the workspace - [Publish an agent](https://cadenya.com/docs/api-reference/agentservice/publish-an-agent.md): Transitions an agent to STATE_PUBLISHED, making it available for objectives. The agent must have at least one variation. - [Unpublish an agent](https://cadenya.com/docs/api-reference/agentservice/unpublish-an-agent.md): Transitions a published agent back to STATE_DRAFT. Active schedules for the agent are paused until it is published again. - [Archive an agent](https://cadenya.com/docs/api-reference/agentservice/archive-an-agent.md): Transitions an agent to STATE_ARCHIVED. Archived agents are hidden from list results and cannot be used for objectives; active schedules are paused. - [Unarchive an agent](https://cadenya.com/docs/api-reference/agentservice/unarchive-an-agent.md): Transitions an archived agent back to STATE_DRAFT. Publish the agent again to make it available for objectives. - [List variations](https://cadenya.com/docs/api-reference/agentvariationservice/list-variations.md): Lists all variations for an agent - [Create a new variation](https://cadenya.com/docs/api-reference/agentvariationservice/create-a-new-variation.md): Creates a variation and all assignments in spec atomically. Omitted assignment lists start empty. Invalid targets or memory cascades reject the entire request. - [Get a variation by ID](https://cadenya.com/docs/api-reference/agentvariationservice/get-a-variation-by-id.md): Retrieves a variation by ID from an agent - [Delete a variation](https://cadenya.com/docs/api-reference/agentvariationservice/delete-a-variation.md): Deletes a variation from an agent - [Update a variation](https://cadenya.com/docs/api-reference/agentvariationservice/update-a-variation.md): Updates a variation atomically. Masked spec.assignments and spec.memory_layer_assignments replace their entire lists; an empty masked list clears it. A spec mask replaces the complete spec. Without a mask, only non-empty fields are updated. - [Add an assignment to a variation](https://cadenya.com/docs/api-reference/agentvariationservice/add-an-assignment-to-a-variation.md): Assigns a tool, tool set, sub-agent, or agent pool to a variation. Exactly one target ID must be set. Adding an existing target returns AlreadyExists. Returns the updated variation with its full spec. - [Remove an assignment from a variation](https://cadenya.com/docs/api-reference/agentvariationservice/remove-an-assignment-from-a-variation.md): Detaches a tool, tool set, sub-agent, or agent pool by its target ID. Exactly one target ID must be set. Removing an unassigned target returns NotFound. Returns the updated variation. - [Attach a memory layer to a variation](https://cadenya.com/docs/api-reference/agentvariationservice/attach-a-memory-layer-to-a-variation.md): Attaches a memory layer by its ID. If already attached, returns AlreadyExists regardless of the requested position. Otherwise, an omitted position appends at the most general end. Returns the updated variation. - [Remove a memory layer assignment from a variation](https://cadenya.com/docs/api-reference/agentvariationservice/remove-a-memory-layer-assignment-from-a-variation.md): Detaches a memory layer by its ID. Removing an unassigned layer returns NotFound. Returns the updated variation. - [Update a variation's memory layer assignment](https://cadenya.com/docs/api-reference/agentvariationservice/update-a-variations-memory-layer-assignment.md): Updates a memory layer position by memory layer ID. Position is required, including zero. An unassigned layer returns NotFound; a position collision returns InvalidArgument. Returns the updated variation. - [List schedules](https://cadenya.com/docs/api-reference/agentscheduleservice/list-schedules.md): Lists all schedules for an agent - [Create a new schedule](https://cadenya.com/docs/api-reference/agentscheduleservice/create-a-new-schedule.md): Creates a new schedule for an agent - [Get a schedule by ID](https://cadenya.com/docs/api-reference/agentscheduleservice/get-a-schedule-by-id.md): Retrieves a schedule by ID from an agent - [Delete a schedule](https://cadenya.com/docs/api-reference/agentscheduleservice/delete-a-schedule.md): Deletes a schedule from an agent - [Update a schedule](https://cadenya.com/docs/api-reference/agentscheduleservice/update-a-schedule.md): Updates a schedule for an agent - [Pause a schedule](https://cadenya.com/docs/api-reference/agentscheduleservice/pause-a-schedule.md): Transitions a schedule to STATE_PAUSED. Paused schedules retain history but do not fire. - [Resume a schedule](https://cadenya.com/docs/api-reference/agentscheduleservice/resume-a-schedule.md): Transitions a paused schedule back to STATE_ACTIVE so it fires on its cadence again. Archived schedules cannot be resumed. - [Archive a schedule](https://cadenya.com/docs/api-reference/agentscheduleservice/archive-a-schedule.md): Transitions a schedule to STATE_ARCHIVED and removes its underlying timer. Archiving is terminal: archived schedules never fire and cannot be reactivated; create a new schedule instead. - [List objectives](https://cadenya.com/docs/api-reference/objectiveservice/list-objectives.md): Lists all objectives in the workspace - [Create a new objective](https://cadenya.com/docs/api-reference/objectiveservice/create-a-new-objective.md): Creates a new objective in the workspace - [Create an objective and stream its events](https://cadenya.com/docs/api-reference/objectiveeventstreamsservice/create-an-objective-and-stream-its-events.md): Creates an objective and streams its events over server-sent events (SSE) on the same connection, so a single request both starts the work and shows it happening. The request body is identical to Create objective, except that `metadata.externalId` is REQUIRED (it is this endpoint's idempotency key)… - [Get an objective by ID](https://cadenya.com/docs/api-reference/objectiveservice/get-an-objective-by-id.md): Retrieves an objective by ID from the workspace - [Cancel an objective](https://cadenya.com/docs/api-reference/objectiveservice/cancel-an-objective.md): Cancels a running or pending objective. The objective's state will be set to OBJECTIVE_STATE_CANCELLED. - [Compact an objective](https://cadenya.com/docs/api-reference/objectiveservice/compact-an-objective.md): Compacts an objective's conversation, optionally overriding the variation's compaction config. Compaction is always recorded as a queued action: a waiting objective starts it immediately, and an objective whose agent loop is busy runs it before its next assistant turn. - [List objective context windows](https://cadenya.com/docs/api-reference/objectiveservice/list-objective-context-windows.md): Read-only list of the last five windows of execution for this objective, ordered by most recent first - [Continue an objective](https://cadenya.com/docs/api-reference/objectiveservice/continue-an-objective.md): Sends a user message to an objective. A waiting objective receives it immediately and resumes. With enqueue set, an objective whose agent loop is busy queues the message instead, and the agent picks it up before its next assistant turn. - [List objective events](https://cadenya.com/docs/api-reference/objectiveservice/list-objective-events.md): Lists all events for an objective - [Stream objective events](https://cadenya.com/docs/api-reference/objectiveeventstreamsservice/stream-objective-events.md): Streams objective events and transient execution heartbeats using server-sent events (SSE). Only durable objevt_ event IDs are accepted as Last-Event-ID reconnect cursors. Heartbeats carry hb_ IDs in their payload and no SSE id field; they are not replayed from history. Set includeDeltas to also rec… - [Get objective context usage](https://cadenya.com/docs/api-reference/objectiveservice/get-objective-context-usage.md): Returns the context-usage breakdown measured for the objective's most recent iteration: character lengths per context component (system prompt, memory appendices, tool definitions, messages by role) alongside the iteration's input token counts. - [List feedback for an objective](https://cadenya.com/docs/api-reference/objectiveservice/list-feedback-for-an-objective.md): Lists all feedback submitted for an objective - [Submit feedback for an objective](https://cadenya.com/docs/api-reference/objectiveservice/submit-feedback-for-an-objective.md): Submits feedback for an objective's execution. Feedback scores are used by the agent variation scoring system to evaluate and rank variation performance. - [List objective tool calls](https://cadenya.com/docs/api-reference/objectiveservice/list-objective-tool-calls.md): Lists all tool calls for an objective - [Get an objective tool call by ID](https://cadenya.com/docs/api-reference/objectiveservice/get-an-objective-tool-call-by-id.md): Retrieves a single tool call, including the content the tool returned. Media content (images, audio) is served as short-lived signed URLs. - [Approve a tool call](https://cadenya.com/docs/api-reference/objectiveservice/approve-a-tool-call.md): When an agent attempts to use a tool that requires approval, use this endpoint to mark it as approved. - [Deny a tool call](https://cadenya.com/docs/api-reference/objectiveservice/deny-a-tool-call.md): When an agent attempts to use a tool that requires approval, use this endpoint to mark it as denied. Use a memo to steer the LLM to a different decision or usage of the tool. - [Set a bare tool call's content](https://cadenya.com/docs/api-reference/objectiveservice/set-a-bare-tool-calls-content.md): For bare tool calls (tool sets with no execution adapter), sets the content an external API consumer supplies for the call — used for human-in-the-loop tools and reverse harnesses that execute tools locally and report results back. - [List objective tools](https://cadenya.com/docs/api-reference/objectiveservice/list-objective-tools.md): Lists all tools that were assigned to an objective - [List widgets](https://cadenya.com/docs/api-reference/widgetservice/list-widgets.md): Lists all widgets in a workspace - [Create a new widget](https://cadenya.com/docs/api-reference/widgetservice/create-a-new-widget.md): Creates a widget bound to an agent. The widget's DNS label and hostname are generated by the server and returned in `info`. The hostname may take up to a minute to become reachable while the edge propagates. - [Get a widget by ID](https://cadenya.com/docs/api-reference/widgetservice/get-a-widget-by-id.md): Retrieves a widget by ID - [Update a widget](https://cadenya.com/docs/api-reference/widgetservice/update-a-widget.md): Updates a widget's metadata or spec. The DNS label is immutable and cannot be updated. Re-pointing the agent affects new sessions only; in-flight conversations finish against the agent they started with. - [Delete a widget](https://cadenya.com/docs/api-reference/widgetservice/delete-a-widget.md): Deletes a widget. Its hostname stops serving and all of its sessions are revoked. - [Archive a widget](https://cadenya.com/docs/api-reference/widgetservice/archive-a-widget.md): Transitions a widget to STATE_ARCHIVED. The hostname stops serving at the edge, existing sessions are revoked, and no new sessions can be minted. Reversible via :unarchive. - [Unarchive a widget](https://cadenya.com/docs/api-reference/widgetservice/unarchive-a-widget.md): Transitions an archived widget back to STATE_ACTIVE so its hostname serves traffic again. Sessions revoked by archival stay revoked; mint new ones. - [List widget sessions](https://cadenya.com/docs/api-reference/widgetsessionservice/list-widget-sessions.md): Lists widget sessions in a workspace, filterable by widget, tenant, subject, and state - [Create a widget session](https://cadenya.com/docs/api-reference/widgetsessionservice/create-a-widget-session.md): Creates a bounded session and returns WidgetSessionCredentials in credentials. For v1 compatibility, spec.token, spec.tokenExpiresAt, info.host, and spec.expiresAt remain populated and agree with credentials. Credentials are creation-only and omitted on reads. Use Cache-Control: no-store. The custom… - [Get a widget session by ID](https://cadenya.com/docs/api-reference/widgetsessionservice/get-a-widget-session-by-id.md): Retrieves a widget session. The bearer token is never returned on reads. - [Revoke a widget session](https://cadenya.com/docs/api-reference/widgetsessionservice/revoke-a-widget-session.md): Transitions a session to STATE_REVOKED. New operations reject outstanding tokens after revocation commits; existing streams stop delivering events and close within 10 seconds, independently of frontend renewal. The session's secrets are deleted. Terminal: issuance cannot reactivate the session. Alre… - [Delete a widget session](https://cadenya.com/docs/api-reference/widgetsessionservice/delete-a-widget-session.md): Deletes a session and its secrets. The session's conversations are disassociated, not deleted; use the tenant-level delete for full erasure. - [Delete all of a tenant's widget sessions](https://cadenya.com/docs/api-reference/widgetsessionservice/delete-all-of-a-tenants-widget-sessions.md): Deletes every session belonging to a tenant across all widgets in the workspace, along with the conversations those sessions created — built for GDPR erasure requests. The tenant is required; an empty value is rejected rather than matching everything. - [List tenants](https://cadenya.com/docs/api-reference/tenantservice/list-tenants.md): Lists the tenants asserted in a workspace, newest first. `query` matches against a tenant's name and its external_id, for type-ahead filters. - [Get a tenant by ID](https://cadenya.com/docs/api-reference/tenantservice/get-a-tenant-by-id.md): Retrieves a tenant by its canonical id or by the `external_id:` form the customer asserted it under. - [List a tenant's subjects](https://cadenya.com/docs/api-reference/tenantservice/list-a-tenants-subjects.md): Lists the subjects asserted under a tenant. Subjects are only listable through their tenant: a subject's external_id is unique within its tenant, not across the workspace, so the same key can name different people under different tenants. - [Erase a tenant](https://cadenya.com/docs/api-reference/tenantservice/erase-a-tenant.md): Destroys the tenant, its subjects, every objective associated with it and everything reachable from those objectives, and its widget sessions. This is the full erasure hammer, wider than `DELETE /widget_sessions`, which removes only what widget sessions created. The work runs in the background: this… - [List memory layers](https://cadenya.com/docs/api-reference/memoryservice/list-memory-layers.md): Lists all memory layers in the workspace - [Create a new memory layer](https://cadenya.com/docs/api-reference/memoryservice/create-a-new-memory-layer.md): Creates a new memory layer in the workspace - [Get a memory layer by ID](https://cadenya.com/docs/api-reference/memoryservice/get-a-memory-layer-by-id.md): Retrieves a memory layer by ID from the workspace - [Delete a memory layer](https://cadenya.com/docs/api-reference/memoryservice/delete-a-memory-layer.md): Deletes a memory layer from the workspace - [Update a memory layer](https://cadenya.com/docs/api-reference/memoryservice/update-a-memory-layer.md): Updates a memory layer in the workspace - [List memory entries](https://cadenya.com/docs/api-reference/memoryservice/list-memory-entries.md): Lists all entries in a memory layer - [Create a new memory entry](https://cadenya.com/docs/api-reference/memoryservice/create-a-new-memory-entry.md): Creates a new entry in a memory layer. Returns the detail view, including the resolved content body. - [Get a memory entry by ID](https://cadenya.com/docs/api-reference/memoryservice/get-a-memory-entry-by-id.md): Retrieves a memory entry by ID from a memory layer. Returns the detail view, including the content body. - [Delete a memory entry](https://cadenya.com/docs/api-reference/memoryservice/delete-a-memory-entry.md): Deletes a memory entry from a memory layer - [Update a memory entry](https://cadenya.com/docs/api-reference/memoryservice/update-a-memory-entry.md): Updates a memory entry in a memory layer. Returns the detail view, including the resolved content body. - [List models](https://cadenya.com/docs/api-reference/modelservice/list-models.md): Lists all models in the workspace - [Get a model by ID](https://cadenya.com/docs/api-reference/modelservice/get-a-model-by-id.md): Retrieves a model by ID from the workspace - [Enable a model](https://cadenya.com/docs/api-reference/modelservice/enable-a-model.md): Transitions a model to STATE_ENABLED, making it available for agent variations in the workspace - [Disable a model](https://cadenya.com/docs/api-reference/modelservice/disable-a-model.md): Transitions a model to STATE_DISABLED. Fails while agent variations are still provisioned on the model; use :swapModelOnVariations to move them first. - [Swap models on agent variations](https://cadenya.com/docs/api-reference/modelservice/swap-models-on-agent-variations.md): Reassigns agent variations from one model to another in bulk. Runs asynchronously and returns immediately. - [Create an upload](https://cadenya.com/docs/api-reference/uploadservice/create-an-upload.md): Issues a short-lived presigned URL for direct upload to object storage. The returned id is used to reference the upload from resources that accept binary content. - [Get an upload by ID](https://cadenya.com/docs/api-reference/uploadservice/get-an-upload-by-id.md): Retrieves the current state of an upload, including its lifecycle status - [List workspaces](https://cadenya.com/docs/api-reference/workspaceservice/list-workspaces.md): Lists all workspaces for the current account - [List workspace secrets](https://cadenya.com/docs/api-reference/workspacesecretservice/list-workspace-secrets.md): Lists all workspace secrets in the workspace - [Create a new workspace secret](https://cadenya.com/docs/api-reference/workspacesecretservice/create-a-new-workspace-secret.md): Creates a new workspace secret in the workspace - [Get a workspace secret by ID](https://cadenya.com/docs/api-reference/workspacesecretservice/get-a-workspace-secret-by-id.md): Retrieves a workspace secret by ID from the workspace - [Delete a workspace secret](https://cadenya.com/docs/api-reference/workspacesecretservice/delete-a-workspace-secret.md): Deletes a workspace secret from the workspace - [Update a workspace secret](https://cadenya.com/docs/api-reference/workspacesecretservice/update-a-workspace-secret.md): Updates a workspace secret in the workspace - [Search account profiles](https://cadenya.com/docs/api-reference/workspaceadminservice/search-account-profiles.md): Searches the account's profiles for a member picker, with free-form name/email search and an optional type filter. Account-scoped; admin only. - [List all workspaces in the account](https://cadenya.com/docs/api-reference/workspaceadminservice/list-all-workspaces-in-the-account.md): Lists every workspace in the account, optionally including archived ones. Admin only. - [Create a workspace](https://cadenya.com/docs/api-reference/workspaceadminservice/create-a-workspace.md): Creates a new workspace in the account. Admin only. - [Get a workspace by ID](https://cadenya.com/docs/api-reference/workspaceadminservice/get-a-workspace-by-id.md): Retrieves a workspace in the account by ID. Admin only. - [Archive a workspace](https://cadenya.com/docs/api-reference/workspaceadminservice/archive-a-workspace.md): Archives a workspace (soft delete). The workspace is retained, but any subsequent request scoped to it returns a permission error. Archiving the account's last active (non-archived) workspace is not allowed and returns FailedPrecondition. Admin only. - [Update a workspace](https://cadenya.com/docs/api-reference/workspaceadminservice/update-a-workspace.md): Updates a workspace's metadata (e.g. name) and spec. Admin only. - [List workspace members](https://cadenya.com/docs/api-reference/workspaceadminservice/list-workspace-members.md): Lists the members of a workspace. Admin only. - [Add a member to a workspace](https://cadenya.com/docs/api-reference/workspaceadminservice/add-a-member-to-a-workspace.md): Grants a profile access to the workspace by creating (or reactivating) the actor that links the profile to the workspace. Accepts either an existing profile_id or an email to resolve-or-invite. Idempotent for an already-active member. Admin only. - [Remove a member from a workspace](https://cadenya.com/docs/api-reference/workspaceadminservice/remove-a-member-from-a-workspace.md): Revokes a member's access by deactivating their actor; the member is immediately cut off. The underlying profile is not deleted. Admin only. - [Retrieves the current account for the token accessing the API](https://cadenya.com/docs/api-reference/accountservice/retrieves-the-current-account-for-the-token-accessing-the-api.md): Retrieves the current account for the token accessing the API. Useful to check if the credentials are valid. - [Retrieves the profile for the credentials accessing the API](https://cadenya.com/docs/api-reference/profilesservice/retrieves-the-profile-for-the-credentials-accessing-the-api.md): Retrieves the profile of the authenticated caller and their default workspace. Useful to check which principal a token belongs to, and which workspace to use when none is given. - [Rotates the webhook signing key for the account](https://cadenya.com/docs/api-reference/accountservice/rotates-the-webhook-signing-key-for-the-account.md): Rotates the webhook signing key for the account. Returns only the new key. - [Rotates the challenge token for the account](https://cadenya.com/docs/api-reference/accountservice/rotates-the-challenge-token-for-the-account.md): Rotates the challenge token sent in the X-Cadenya-Challenge-Token header on MCP tools/list requests. Returns only the new token. - [List API keys](https://cadenya.com/docs/api-reference/apikeyservice/list-api-keys.md): Lists the account's API keys, optionally only those that can reach a workspace. - [Create a new API key](https://cadenya.com/docs/api-reference/apikeyservice/create-a-new-api-key.md): Creates a new API key for the account, assigned to the given workspaces or to all workspaces. - [Get an API key by ID](https://cadenya.com/docs/api-reference/apikeyservice/get-an-api-key-by-id.md): Retrieves an API key by ID or by external ID (external_id:default retrieves the default key). The token is never included; use :reveal. - [Update an API key](https://cadenya.com/docs/api-reference/apikeyservice/update-an-api-key.md): Updates an API key, including its workspace assignments. - [Delete an API key](https://cadenya.com/docs/api-reference/apikeyservice/delete-an-api-key.md): Deletes an API key. - [Rotate an API key](https://cadenya.com/docs/api-reference/apikeyservice/rotate-an-api-key.md): Rotates an API key and returns a new token. All previous tokens for this key are invalidated. - [Disable an API key](https://cadenya.com/docs/api-reference/apikeyservice/disable-an-api-key.md): Disables an API key. While disabled, presenting the key's token fails authentication on every endpoint; the key is retained. Idempotent. - [Enable an API key](https://cadenya.com/docs/api-reference/apikeyservice/enable-an-api-key.md): Re-enables a disabled API key so its token authenticates again. Idempotent. - [Assign a workspace to an API key](https://cadenya.com/docs/api-reference/apikeyservice/assign-a-workspace-to-an-api-key.md): Assigns one workspace to an API key. Idempotent. - [Remove a workspace from an API key](https://cadenya.com/docs/api-reference/apikeyservice/remove-a-workspace-from-an-api-key.md): Removes one workspace from an API key. Fails for a key with all_workspaces set. Idempotent. - [Reveal an API key's token](https://cadenya.com/docs/api-reference/apikeyservice/reveal-an-api-keys-token.md): Returns the API key with its token. A disabled key is reported as not found. - [List AI provider keys](https://cadenya.com/docs/api-reference/aiproviderkeyservice/list-ai-provider-keys.md): Lists all customer-provided AI provider keys in the workspace - [Create a new AI provider key](https://cadenya.com/docs/api-reference/aiproviderkeyservice/create-a-new-ai-provider-key.md): Creates a new customer-provided AI provider key in the workspace - [Get an AI provider key by ID](https://cadenya.com/docs/api-reference/aiproviderkeyservice/get-an-ai-provider-key-by-id.md): Retrieves an AI provider key by ID from the workspace - [Update an AI provider key](https://cadenya.com/docs/api-reference/aiproviderkeyservice/update-an-ai-provider-key.md): Updates an AI provider key's name or key value in the workspace - [Delete an AI provider key](https://cadenya.com/docs/api-reference/aiproviderkeyservice/delete-an-ai-provider-key.md): Deletes an AI provider key from the workspace - [Webhook events](https://cadenya.com/docs/api-reference/webhook-events.md): Every event Cadenya can POST to an agent's webhook URL, what triggers it, and how to verify and unwrap a delivery. - [User message](https://cadenya.com/docs/api-reference/objective-user-message-event.md): Cadenya sends objective_event.user_message when an objective receives a message from your application. - [Assistant message](https://cadenya.com/docs/api-reference/objective-assistant-message-event.md): Cadenya sends objective_event.assistant_message each time the model finishes a turn, with its text and any tool calls it asked for. - [Tool called](https://cadenya.com/docs/api-reference/objective-tool-called-event.md): Cadenya sends objective_event.tool_called when it dispatches a tool call, with the tool, its adapter config, and the parsed arguments. - [Tool result](https://cadenya.com/docs/api-reference/objective-tool-result-event.md): Cadenya sends objective_event.tool_result when a tool returns, with the content blocks the model was shown. - [Tool approval requested](https://cadenya.com/docs/api-reference/objective-tool-approval-requested-event.md): Cadenya sends objective_event.tool_approval_requested when a tool call needs a human decision before it runs. - [Tool approved](https://cadenya.com/docs/api-reference/objective-tool-approved-event.md): Cadenya sends objective_event.tool_approved when a reviewer approves a pending tool call. - [Tool denied](https://cadenya.com/docs/api-reference/objective-tool-denied-event.md): Cadenya sends objective_event.tool_denied when a reviewer denies a pending tool call, along with the memo the agent receives. - [Tool error](https://cadenya.com/docs/api-reference/objective-tool-error-event.md): Cadenya sends objective_event.tool_error when a tool call fails during execution. - [Sub-agent spawned](https://cadenya.com/docs/api-reference/objective-sub-agent-spawned-event.md): Cadenya sends objective_event.sub_agent_spawned when an agent hands work to another agent as a sub-objective. - [Sub-agent updated](https://cadenya.com/docs/api-reference/objective-sub-agent-updated-event.md): Cadenya sends objective_event.sub_agent_updated to the parent objective when a sub-objective changes status. - [Memory read](https://cadenya.com/docs/api-reference/objective-memory-read-event.md): Cadenya sends objective_event.memory_read when the agent resolves a key through the memory cascade and loads an entry. - [Reasoning](https://cadenya.com/docs/api-reference/objective-reasoning-event.md): Cadenya sends objective_event.reasoning with the model's thinking text for a turn, when the model exposes it. - [Objective finalized](https://cadenya.com/docs/api-reference/objective-finalized-event.md): Cadenya sends objective_event.finalized when an objective completes with a final result. - [Error](https://cadenya.com/docs/api-reference/objective-error-event.md): Cadenya sends objective_event.error when the objective itself hits an error during execution. - [Widgets API reference](https://cadenya.com/docs/widgets-api-reference.md): Hosts, authentication, session renewal, event streaming, and endpoints for the browser-facing Cadenya Widgets API. - [Get widget config](https://cadenya.com/docs/api-reference/widgetconfigservice/get-widget-config.md): Returns the widget's presentation configuration. Publicly reachable per widget; creates no session and no billable event. - [Renew a widget session token](https://cadenya.com/docs/api-reference/widgetsessionservice/renew-a-widget-session-token.md): Returns a fresh token for the caller's current session. The session keeps its identity, scope, and hard expiry. Tokens up to 60 seconds past expiry can still renew; older tokens fail with TOKEN_EXPIRED. Revoked, expired, and exhausted sessions cannot renew. - [List conversations](https://cadenya.com/docs/api-reference/widgetconversationservice/list-conversations.md): Lists the tenant/subject's conversations on this widget and agent, newest activity first. Sessions with the same identity share history, subject to the current session's read permission. - [Start a conversation](https://cadenya.com/docs/api-reference/widgetconversationservice/start-a-conversation.md): Starts a new conversation with the widget's agent. The session's tenant, subject, labels, secrets, and pinned parameters are applied server-side. - [Get a conversation](https://cadenya.com/docs/api-reference/widgetconversationservice/get-a-conversation.md): Retrieves one of the token's visible conversations - [Send the next message](https://cadenya.com/docs/api-reference/widgetconversationservice/send-the-next-message.md): Sends the visitor's next message. An open conversation receives it immediately. With enqueue set, a conversation whose agent is responding queues it for the agent's next reply instead of rejecting it. The session's current secrets are re-applied on every turn. - [Submit conversation feedback](https://cadenya.com/docs/api-reference/widgetconversationservice/submit-conversation-feedback.md): Records the visitor's rating of a conversation (score -1.0 to 1.0 plus optional comment). Flows into the same feedback machinery that scores agent variations. - [List conversation events](https://cadenya.com/docs/api-reference/widgetconversationservice/list-conversation-events.md): Returns a conversation's event history for initial render, oldest first. Live updates arrive on the event stream. - [Stream conversation events](https://cadenya.com/docs/api-reference/widgetconversationeventstreamsservice/stream-conversation-events.md): Server-sent events for a conversation. Durable event IDs are Last-Event-ID resume checkpoints; live heartbeat/control frames never advance them. Token expiry leaves a healthy stream open. Session revocation, hard expiry, and exhaustion stop delivery and close the stream within 10 seconds; the server… - [List queued messages](https://cadenya.com/docs/api-reference/widgetconversationservice/list-queued-messages.md): Lists the messages sent while the agent was responding, oldest first, with their delivery state. - [Remove a queued message](https://cadenya.com/docs/api-reference/widgetconversationservice/remove-a-queued-message.md): Removes a queued message before the agent picks it up, so the agent never sees it. Fails once the message has been sent. - [Approve a pending tool call](https://cadenya.com/docs/api-reference/widgetconversationservice/approve-a-pending-tool-call.md): Approves a tool call the agent paused on, in response to a toolApprovalRequested event. The tool then runs. - [Deny a pending tool call](https://cadenya.com/docs/api-reference/widgetconversationservice/deny-a-pending-tool-call.md): Denies a tool call the agent paused on, in response to a toolApprovalRequested event. The agent continues without the tool. - [Supply a bare tool call's result](https://cadenya.com/docs/api-reference/widgetconversationservice/supply-a-bare-tool-calls-result.md): Sets the result of a bare tool call — one the embedding page executes client-side. The result reaches the conversation as a toolResult event. ## OpenAPI Specs - [api-spec](/docs/api-spec.yml) - [api-spec](https://openapi.cadenya.com/api-spec.yml) - [widgets-api-spec](/docs/widgets-api-spec.yml) This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.