Skip to content

Reference

REST API

Every route the Agentic API serves, generated from the route manifest.

The API is mounted at /api/agentic (agentic.basePath in Nuxt, basePath in Void). It serves an OpenAPI 3.1 document at /api/agentic/openapi.json; point any OpenAPI client or generator at it.

Requests

  • Authentication: the better-auth session cookie. Requests without a session get 401.
  • Workspace: send X-Agentic-Workspace: <workspace id>; without it, requests act in the signed-in user's personal workspace. Membership and role are checked on every request.
  • Access: Member routes need any role in the workspace, Admin an owner or admin role, Owner the owner role. Signed in routes check workspace roles inside the handler.
  • Mutations from another origin are refused with 403.
  • Errors are JSON: { "message": "…" } with the HTTP status.
  • Lists take page (from 1), pageSize (up to 100, default 50), search, sortBy, sortDir (asc or desc) and filters (JSON), and answer { data, totalCount, totalPages, page, pageSize }.

Agentic Models

Each model adds up to five routes, one per action its access allows. For a model named customer:

models

MethodPathAccessSummary
GET/models/customerMemberList customer records
GET/models/customer/:idMemberGet a customer record
POST/models/customerAdminCreate a customer record
PATCH/models/customer/:idAdminUpdate a customer record
DELETE/models/customer/:idOwnerDelete a customer record

Built-in features

identity

MethodPathAccessSummary
POST/identity/imagesSigned inUpload a bounded raster avatar or workspace logo
GET/identity/images/:id/statusSigned inCheck whether an owned upload is still available
GET/identity/images/:idSigned inDownload an authorized image with safe attachment headers

workspaces

MethodPathAccessSummary
GET/sessionSigned inGet the authenticated user and available workspaces
GET/workspacesSigned inList available workspaces
POST/workspacesSigned inCreate a workspace with the authenticated user as owner
GET/workspaces/:workspaceSigned inGet a workspace and its members
PATCH/workspaces/:workspaceSigned inUpdate a managed workspace
PATCH/workspaces/:workspace/logoSigned inUpdate a managed workspace logo
PATCH/workspaces/:workspace/members/:idSigned inChange a member role while preserving an active owner
DELETE/workspaces/:workspace/members/:idSigned inLeave a workspace or remove a permitted member
GET/workspaces/:workspace/invitationsSigned inList invitations in a managed workspace
POST/workspaces/:workspace/invitationsSigned inCreate or rotate a workspace invitation
DELETE/workspaces/:workspace/invitations/:idSigned inRevoke a permitted workspace invitation
POST/invitations/previewSigned inPreview an invitation addressed to the authenticated account
POST/invitations/acceptSigned inAccept a valid invitation for the authenticated account

approvals

MethodPathAccessSummary
GET/records/integrationApprovalMemberList action approvals
GET/records/integrationApproval/:idMemberGet an owned action approval

integrations

MethodPathAccessSummary
POST/integrations/approvals/:idMemberAnswer an owned pending action approval
GET/oauth/:provider/callbackSigned inComplete a one-use provider authorization for the authenticated account
GET/mcp/client-metadataPublicGet public OAuth client metadata for this application
GET/mcp-oauth/callbackSigned inComplete one-use MCP authorization for the authenticated account
POST/integration-hooks/:idSigned webhookReceive a signed or capability-authenticated connection event
POST/provider-hooks/:providerSigned webhookReceive and verify a supported vendor webhook
GET/integrations/catalogMemberList available integrations and visible connections
GET/integrations/catalog/toolsMemberList tools granted by visible active connections
GET/integrations/catalog/:provider/toolsMemberList available actions for an owned or shared connection
POST/integrations/catalog/:provider/connectionMemberConnect or manage an authorized integration account
POST/integrations/catalog/:provider/actionMemberExecute a granted integration action or request approval

data

MethodPathAccessSummary
GET/dataMemberList accessible data collections
GET/data/:idMemberQuery an authorized data collection
GET/data/:id/records/:recordMemberInspect the public fields of an authorized data record

mcp

MethodPathAccessSummary
GET, POST, …/mcpMemberServe authenticated manifest tools over stateless MCP

local-mcp

MethodPathAccessSummary
GET/local-mcp/identitySigned webhookResolve a native local account using the development capability
POST/local-mcpSigned webhookServe local project tools through a development process capability

prompt

MethodPathAccessSummary
GET/prompt/optionsMemberGet public prompt decision provider settings
GET/prompt/resourcesMemberList registered public prompt resources
GET/prompt/resources/:idMemberQuery an authorized prompt resource
GET/prompt/resources/:id/records/:recordMemberRead an authorized prompt resource record
POST/prompt/planMemberPrepare a session-bound review without executing writes
POST/prompt/executeMemberClaim and execute the exact records in an owned review
POST/prompt/cancelMemberCancel an owned pending review

agents

MethodPathAccessSummary
GET/records/agentMemberList agents in the current workspace
GET/records/agent/:idMemberGet an owned agent
GET/records/agent/code/:slugMemberGet the workspace copy of a code agent by its file name
POST/records/agentMemberCreate an agent in the current workspace
PATCH/records/agent/:idMemberUpdate an owned agent
DELETE/records/agent/:idMemberDelete an owned agent
GET/agents/runtimesMemberDiscover configured model providers and local development runtimes

runs

MethodPathAccessSummary
POST/agents/:id/runsMemberAccept an owned agent run in a scoped durable runner
GET/agents/:id/runs/:runMemberGet a run in the current user, workspace, agent and session
GET/agents/:id/runs/:run/eventsMemberStream run status changes as server-sent events until the run finishes
POST/agents/:id/runs/:run/cancelMemberCancel an owned agent run in its accepted session

automations

MethodPathAccessSummary
GET/records/automationMemberList automations in the current workspace
GET/records/automation/:idMemberGet an owned automation
POST/records/automationMemberCreate an automation
PATCH/records/automation/:idMemberUpdate an owned automation
DELETE/records/automation/:idMemberDelete an owned automation
POST/automations/:id/runMemberAccept a test run from the saved automation and agent snapshot
GET/automations/:id/endpointMemberGet the secret webhook URL for an owned automation
POST/automations/eventsMemberDeliver an event to active owned automations with stable event identities
POST/automations/runs/:id/resumeMemberResume an unfinished owned automation run
POST/automations/runs/:id/cancelMemberCancel an owned automation run without overwriting a terminal result
GET/automations/templatesMemberList automation templates defined in code
POST/automations/templates/:slugMemberInstall a code-defined automation template as an inactive workspace draft
POST/hooks/:id/:tokenSigned webhookAccept a capability-authenticated automation webhook

automationFolders

MethodPathAccessSummary
GET/records/automationFolderMemberList automation folders
POST/records/automationFolderMemberCreate an automation folder
DELETE/records/automationFolder/:idMemberDelete an owned automation folder

automationRuns

MethodPathAccessSummary
GET/records/automationRunMemberList automation run history
GET/records/automationRun/:idMemberGet an owned automation run