Help
DevelopersReference

Agents

The workspace's agents and what is published.

Base URL https://api.showpilot.com/v1. Every call needs Authorization: Bearer <api key>; see Authentication.

List agents, newest first

GET /agents

Scope: agents:read. Operation id: listAgents.

Parameters

NameInTypeMeaning
limitqueryintegerPage size, 1 to 200. Default 50.
cursorquerystringThe nextCursor from the previous page. Opaque; never build one.

Example request

curl "https://api.showpilot.com/v1/agents?limit=50" \
  -H "Authorization: Bearer $SHOWPILOT_API_KEY"
Runs against your sandbox with a test key.

Response

One page of agents.

FieldTypeAlwaysMeaning
itemsarray of Agentyes
nextCursorNextCursoryes

Agent

FieldTypeAlwaysMeaning
idstring (uuid)yes
publicIdstringyesThe id in the embed tag.
namestringyes
titlestring or nullyes
publishedbooleanyesA revision is live and serving visitors.
publishedVersioninteger or nullyes
publishedAtstring or null (date-time)yes
skillsarray of stringyesSlugs of the skills attached to the agent.
viewstring or nullyes
createdAtstring (date-time)yes
updatedAtstring (date-time)yes

NextCursor

Pass as cursor for the next page; null on the last page.

Errors

StatusWhen
400A parameter is malformed, such as a cursor this API did not issue, a limit under 1, or an unknown status. Code invalid-request.
401No key, or an unknown or revoked key. Code unauthorized.
403A valid key without the operation's scope (code insufficient-scope), or a plan without API access (code plan-api-off).
429The key's bucket is empty. Code rate-limited; wait the Retry-After seconds.

One agent

GET /agents/{id}

Scope: agents:read. Operation id: getAgent.

Parameters

NameInTypeMeaning
idpathstringThe agent's UUID or public id.

Example request

curl "https://api.showpilot.com/v1/agents/2f7c1d4e-9b3a-4c6d-8e5f-0a1b2c3d4e5f" \
  -H "Authorization: Bearer $SHOWPILOT_API_KEY"
Runs against your sandbox with a test key.

Response

The agent with its welcome message, tone and company name.

Every field of Agent, plus:

FieldTypeAlwaysMeaning
welcomeMessagestring or nullno
tonestring or nullno
companyNamestring or nullno

Agent

FieldTypeAlwaysMeaning
idstring (uuid)yes
publicIdstringyesThe id in the embed tag.
namestringyes
titlestring or nullyes
publishedbooleanyesA revision is live and serving visitors.
publishedVersioninteger or nullyes
publishedAtstring or null (date-time)yes
skillsarray of stringyesSlugs of the skills attached to the agent.
viewstring or nullyes
createdAtstring (date-time)yes
updatedAtstring (date-time)yes

Errors

StatusWhen
401No key, or an unknown or revoked key. Code unauthorized.
403A valid key without the operation's scope (code insufficient-scope), or a plan without API access (code plan-api-off).
404No object with that id in this workspace. Code not-found.
429The key's bucket is empty. Code rate-limited; wait the Retry-After seconds.

The agent's script as a document

GET /agents/{id}/script

Scope: agents:read. Operation id: getAgentScript.

The authored prompt text (instructions, persona, behavior, welcome message, tone) and the skills the agent runs. version is the base an apply must carry. include=context adds what an author needs: the agent's facts, every resolvable skill, knowledge bases, forms, offers, tours, and the active script's prompts and modules.

Parameters

NameInTypeMeaning
idpathstringThe agent's UUID or public id.
includequerycontext

Example request

curl "https://api.showpilot.com/v1/agents/2f7c1d4e-9b3a-4c6d-8e5f-0a1b2c3d4e5f/script" \
  -H "Authorization: Bearer $SHOWPILOT_API_KEY"
Runs against your sandbox with a test key.

Response

The document.

ScriptDocumentResult

FieldTypeAlwaysMeaning
agentIdstring (uuid)yes
versionstringyesThe base version an apply must carry.
scriptScriptDocumentyes
contextScriptContextno

ScriptDocument

The agent's authored text. Every field is optional on write; only the fields given change.

FieldTypeAlwaysMeaning
instructionsstringno
personastringno
behaviorstringno
welcomeMessagestringno
chatPlaceholderstringno
tonestringno
skillsarray of stringnoSlugs the agent runs

ScriptContext

What an author needs before drafting.

FieldTypeAlwaysMeaning
agentobjectno
skillsarray of objectno
knowledgeBasesarray of objectno
formsarray of objectno
offersarray of objectno
toursarray of objectno
activeScriptobject or nullnoThe active agent script's prompts and modules, read-only here.

Errors

StatusWhen
401No key, or an unknown or revoked key. Code unauthorized.
403A valid key without the operation's scope (code insufficient-scope), or a plan without API access (code plan-api-off).
404No object with that id in this workspace. Code not-found.
429The key's bucket is empty. Code rate-limited; wait the Retry-After seconds.

Apply a script edit

PUT /agents/{id}/script

Scope: agents:write. Operation id: applyAgentScript.

Writes the fields given when baseVersion matches the document's current version; otherwise 409 stale with currentVersion, and the caller re-reads. Lint errors (severity error) refuse the write with 400 lint-failed and the problems. Nothing is published.

Parameters

NameInTypeMeaning
Idempotency-KeyheaderstringAny unique string, up to 200 characters, chosen by the caller. A retry with the same key and the same request replays the stored response (with the header Idempotent-Replayed set to true); the same key with a different request is refused. Keys are remembered for 24 hours.
idpathstringThe agent's UUID or public id.

Example request

curl "https://api.showpilot.com/v1/agents/2f7c1d4e-9b3a-4c6d-8e5f-0a1b2c3d4e5f/script" \
  -H "Authorization: Bearer $SHOWPILOT_API_KEY"
Runs against your sandbox with a test key.

Response

The document as written and its new version.

FieldTypeAlwaysMeaning
agentIdstring (uuid)yes
versionstringyes
scriptScriptDocumentyes
problemsarray of LintProblemyes

ScriptDocument

The agent's authored text. Every field is optional on write; only the fields given change.

FieldTypeAlwaysMeaning
instructionsstringno
personastringno
behaviorstringno
welcomeMessagestringno
chatPlaceholderstringno
tonestringno
skillsarray of stringnoSlugs the agent runs

LintProblem

FieldTypeAlwaysMeaning
pathstringyesThe field the problem is in.
codestringyesempty, too-long, vocab-demo, vocab-project, vocab-folio, unknown-skill, tool-missing.
messagestringyes
severityerror · warningyes

Errors

StatusWhen
400The edit has lint errors. Code lint-failed; problems lists them.
401No key, or an unknown or revoked key. Code unauthorized.
403A valid key without the operation's scope (code insufficient-scope), or a plan without API access (code plan-api-off).
404No object with that id in this workspace. Code not-found.
409The document changed since the baseVersion you read. Code stale; currentVersion at the top level says what to re-read.
429The key's bucket is empty. Code rate-limited; wait the Retry-After seconds.

Lint and diff a script edit, writing nothing

POST /agents/{id}/script/propose

Scope: agents:read. Operation id: proposeAgentScript.

The compiler step for a harness. Returns a line diff per changed field, the lint problems, and whether an apply would be accepted.

Parameters

NameInTypeMeaning
idpathstringThe agent's UUID or public id.

Example request

curl "https://api.showpilot.com/v1/agents/2f7c1d4e-9b3a-4c6d-8e5f-0a1b2c3d4e5f/script/propose" \
  -H "Authorization: Bearer $SHOWPILOT_API_KEY"
Runs against your sandbox with a test key.

Response

The proposal.

Proposal

What an apply would do, without doing it.

FieldTypeAlwaysMeaning
baseVersionobjectyesThe version to pass to apply.
diffobjectyesOne entry per changed field.
problemsarray of LintProblemyes
applicablebooleanyesFalse when any problem is an error.

LintProblem

FieldTypeAlwaysMeaning
pathstringyesThe field the problem is in.
codestringyesempty, too-long, vocab-demo, vocab-project, vocab-folio, unknown-skill, tool-missing.
messagestringyes
severityerror · warningyes

Errors

StatusWhen
400A parameter is malformed, such as a cursor this API did not issue, a limit under 1, or an unknown status. Code invalid-request.
401No key, or an unknown or revoked key. Code unauthorized.
403A valid key without the operation's scope (code insufficient-scope), or a plan without API access (code plan-api-off).
404No object with that id in this workspace. Code not-found.
429The key's bucket is empty. Code rate-limited; wait the Retry-After seconds.

Publish the agent's current draft as a new revision

POST /agents/{id}/publish

Scope: agents:write. Operation id: publishAgent.

The same write the dashboard's Publish button makes; visitors get the frozen revision from now on.

Parameters

NameInTypeMeaning
Idempotency-KeyheaderstringAny unique string, up to 200 characters, chosen by the caller. A retry with the same key and the same request replays the stored response (with the header Idempotent-Replayed set to true); the same key with a different request is refused. Keys are remembered for 24 hours.
idpathstringThe agent's UUID or public id.

Example request

curl "https://api.showpilot.com/v1/agents/2f7c1d4e-9b3a-4c6d-8e5f-0a1b2c3d4e5f/publish" \
  -H "Authorization: Bearer $SHOWPILOT_API_KEY"
Runs against your sandbox with a test key.

Response

Status 201.

The revision.

FieldTypeAlwaysMeaning
agentIdstring (uuid)yes
revisionIdstring (uuid)yes
publishedVersionintegeryes
publishedAtstring (date-time)yes

Errors

StatusWhen
401No key, or an unknown or revoked key. Code unauthorized.
403A valid key without the operation's scope (code insufficient-scope), or a plan without API access (code plan-api-off).
404No object with that id in this workspace. Code not-found.
409The write cannot apply. Code conflict when the object's state refuses it (a follow-up already closed); code idempotency-mismatch when the Idempotency-Key was already used for a different request.
429The key's bucket is empty. Code rate-limited; wait the Retry-After seconds.

On this page