Spinrun Docs
Build

The agent document

One JSON object with a kind discriminator that names everything about an agent.

spinrun.agent/v1: identity, where it lives, what it is, what it may touch, and how it is invoked. Every top-level section is required. The server fills in id, slug, status and updated_at; a document you create must omit id and updated_at.

Agent fields

FieldTypeRequiredDescription
kind"spinrun.agent/v1"YesDocument discriminator.
idstringNoServer id. Omit when creating.
slugstringNoURL slug. Cannot change after creation.
status"draft" | "active" | "archived"NoRead-only lifecycle status.
updated_atstringNoVersion stamp. Required on replace; travels as If-Match too.
namestringYesDisplay name.
descriptionstring | nullYesWhat the agent does.
iconstring | nullYesIcon preset.
spaceobjectYesWhere the agent lives.
folderstring | nullYesFolder path within the space.
instructionsstringYesThe system instructions.
modelstringYesModel id, e.g. spinrun default or a named model.
max_stepsintegerYesMaximum tool steps per run.
reasoning_effort"low" | "medium" | "high" | nullNoAbsent = the model default.
toolsobjectYesWhat the agent may touch.
skillsstring[]YesMarketplace skill slugs.
workspace_skillsstring[]YesWorkspace skill names.
workflowsstring[]YesWorkflow slugs the agent may run.
scheduleobjectYesWhen the agent runs on its own.
emailobjectYesThe email channel.
whatsappobjectYesThe WhatsApp channel.
triggersobject[]YesEvent triggers, at most 20.
eval_criteriastring | nullYesHow a run is judged.

space

FieldTypeRequiredDescription
teamstring | nullYesTeam slug, or null for the workspace space.

tools

FieldTypeRequiredDescription
appsstring[]YesApp slugs the agent may use.
connections"all" | string[]Yes"all" or explicit connection addresses.
disabled_toolsstring[]YesTool slugs to hide.
approval"destructive" | "write"YesWhich tool calls need human approval.

schedule

FieldTypeRequiredDescription
enabledbooleanNoWhether the schedule fires.
cronstringNoCron expression for the schedule.
timezonestringNoIANA timezone for the cron.
promptstringNoPrompt the scheduled run starts with.

email

FieldTypeRequiredDescription
enabledbooleanNoWhether the email channel is on.
allowed_sendersstring[]NoSenders the agent answers.
allowed_recipientsstring[]NoRecipients the agent may mail.
from_namestringNoDisplay name on outbound mail.
localestringNoLocale for email rendering.

whatsapp

FieldTypeRequiredDescription
enabledbooleanNoWhether WhatsApp is on.

triggers[] ("webhook")

FieldTypeRequiredDescription
idstringNoServer-assigned trigger id. Omit when creating.
kind"webhook"YesTrigger kind.
namestringYesTrigger name.
promptstring | nullNoPrompt the triggered run starts with.
enabledbooleanNoWhether the trigger fires.
secret_prefixstring | nullNoRead-only display prefix of the webhook secret.

triggers[] ("poll")

FieldTypeRequiredDescription
idstringNoServer-assigned trigger id. Omit when creating.
kind"poll"YesTrigger kind.
namestringYesTrigger name.
promptstring | nullNoPrompt the triggered run starts with.
enabledbooleanNoWhether the trigger fires.
toolstringYesRead-only tool slug the poll watches with.
argsobjectNoArguments for the detector tool.
cronstringYesHow often the detector runs.
timezonestringYesIANA timezone for the cron.

triggers[] ("app_event")

FieldTypeRequiredDescription
idstringNoServer-assigned trigger id. Omit when creating.
kind"app_event"YesTrigger kind.
namestringYesTrigger name.
promptstring | nullNoPrompt the triggered run starts with.
enabledbooleanNoWhether the trigger fires.
appstringYesApp slug the event belongs to.
eventstringYesEvent slug within the app.
connectionstringYesConnection address, e.g. github__main.
configobjectNoTrigger configuration.

Full JSON Schema: /schemas/agent-v1.json.

On this page