Skip to main content

Create pending elicitation

POST /api/elicitation
Stores a pending approval request from the runtime.

Request body

{
  "executionId": "abc-123",
  "toolPath": "github.issues.create",
  "message": "Create issue \"Fix login bug\" in my-org/my-repo?",
  "args": { "owner": "my-org", "repo": "my-repo", "title": "Fix login bug" },
  "type": "approval"
}
Validated against ElicitationRequestSchema:
FieldTypeRequiredDefaultDescription
executionIdstringYesUnique execution ID
toolPathstringYesTool requesting approval
messagestringYesHuman-readable description of the action
argsobjectNoArguments to the tool
typestringNo"approval""approval" or "form"

Response (201)

{
  "stored": true,
  "executionId": "abc-123"
}

Poll elicitation status

GET /api/elicitation/:id
Check whether a pending elicitation has been resolved.
ParameterInRequiredDescription
idpathYesExecution ID
Response (200):
{
  "executionId": "abc-123",
  "status": "pending"
}
The poll endpoint returns a status string. Once resolved via the resolve endpoint below, the response shape changes to use the ElicitationResponseSchema which has an approved boolean field instead of a status string.

Resolve elicitation

POST /api/elicitation/:id/resolve
Approve or deny a pending elicitation.
ParameterInRequiredDescription
idpathYesExecution ID

Request body

{
  "approved": true,
  "data": {}
}
Validated against ElicitationResponseSchema:
FieldTypeRequiredDescription
approvedbooleanYesWhether to approve the action
dataobjectNoAdditional form data (for type: "form" elicitations)

Response (200)

{
  "executionId": "abc-123",
  "approved": true,
  "resolved": true
}