Skip to content

Reference

Services

Every actor-bound service, its operations and their inputs.

Get services with useAgentic(event) (Nuxt) or agentic.services(request, env) (Void). Every call acts as the signed-in user in the selected workspace, with the same access checks as the REST API. Errors are thrown as AgenticError with an HTTP status and a message.

List queries

Every list takes the same optional query and returns { data, totalCount, totalPages, page, pageSize }:

FieldDescription
pagePage number from 1
pageSizeUp to 100, default 50
limitStop after this many rows in total
searchFree-text search over the searchable fields
sortByField to sort by; sortDir is asc or desc
filtersA filter group, { type: 'group', logic: 'and', children: [...] }

Conditions are { type: 'condition', field, operator, value } with eq, neq, like, not_contains, starts_with, ends_with, gt, gte, lt, lte, is_empty, is_not_empty, is_any_of or is_none_of.

models

One entry per Agentic Model, typed from its table and limited to the actions its access allows.

const { models } = await useAgentic(event)
const { data } = await models.customer.list({ filter: { plan: 'pro' }, columns: ['name'] })
const customer = await models.customer.update(42, { plan: 'free' })
OperationDescription
list(query?)Also takes filter (equality shorthand) and columns
get(id)One record in scope
create(input)Validated against the model's writable fields
update(id, input, options?)options.expectedFingerprint rejects changes made since review
delete(id, options?)Same option; returns { deleted }

agents

OperationDescription
list(query?)Saved and code agents in the workspace
get(id)One agent
code(slug)The workspace copy of server/agents/<slug>.md
create(definition)Save a new agent
update(id, patch)Change a saved agent; code agents are read-only
delete(id)Returns { deleted }

runs

OperationDescription
start(agentId, { runId, payload?, instructions?, sessionId? })Start a durable run
get(agentId, runId, { sessionId? }){ runId, status, output, error, approvalId? }
cancel(agentId, runId, { sessionId? })Cancel a run that has not finished
runtimes()Available providers, models and local runtimes

runId is yours to choose (letters, digits, _ and -), so retries never start a second run. status is queued, running, waiting (for an approval), succeeded, failed or cancelled.

automations

OperationDescription
list, get, create, update, deleteAutomation records
start(id, { payload, eventId? })Run now; the same eventId never runs twice
deliverEvent({ event, id, payload })Start every active automation triggered by event
endpoint(id){ url }: the secret webhook URL
cancel(runId), resume(runId)Control an automation run
runs.list, runs.getRun history
folders.list, folders.create, folders.deleteFolders in the sidebar
templates.list(), templates.install(slug)defineAutomation templates

approvals

OperationDescription
list(query?), get(id)The current user's approval requests
answer(id, approve)Approve or reject; an approved call runs, then the run resumes

workspaces

OperationDescription
session()The user and their workspaces
list(), get(id)Workspaces and one workspace's members
create({ name, slug }), update(id, { name, slug }), updateLogo(id, logo)Manage workspaces
setRole(id, memberId, role), removeMember(id, memberId)Manage members
invitations.list, create, revoke, preview, acceptInvitations by email link

prompt and data

prompt.options(), prompt.plan(...), prompt.execute(...) and prompt.cancel(...) run the dashboard prompt; data reads the dashboard's model views. Both exist for the dashboard and custom prompt UIs; most apps do not call them directly.

Your features

Services from your own features appear next to these, typed from the feature's services function.