Skip to content

API reference

Every endpoint of the Agent API, its authentication and its errors.

Applies to EngineCloud
View as Markdown
On this page
  1. Tasks
  2. Start a task
  3. Get a task
  4. Follow a task
  5. Cancel
  6. Questions and approvals
  7. Answer a question
  8. Pending approvals
  9. Decide
  10. You
  11. Your level and preferences
  12. What the agent remembers
  13. Errors

Base address: https://agent.api.sypnia.com/v1. Authentication: Authorization: Bearer <token>, a Sypnia token. Scopes: agent:tasks; agent:approve only with a person’s own session.

Tasks

Start a task
POST /v1/tasks Cloud
{ repository, request, case?, budget: { credits } }. Returns the task and its estimate.
Authentication
agent:tasks
Get a task
GET /v1/tasks/{id} Cloud
State, steps, questions, approvals, branch, pull request, cost.
Authentication
agent:tasks
Follow a task
GET /v1/tasks/{id}/events Cloud
Server-sent events: step, question, approval, budget, done, stopped.
Authentication
agent:tasks
Cancel
POST /v1/tasks/{id}/cancel Cloud
Stops the task; the branch is kept.
Authentication
agent:tasks

Questions and approvals

Answer a question
POST /v1/questions/{id}/answer Cloud
{ choice } or { text }.
Authentication
agent:tasks
Pending approvals
GET /v1/approvals Cloud
Yours, and your team’s if you approve for it.
Authentication
agent:approve
Decide
POST /v1/approvals/{id} Cloud
{ decision: "approve" | "deny", note? }. Requires a person’s session.
Authentication
agent:approve

You

Your level and preferences
GET /v1/profile Cloud
Authentication
agent:tasks
What the agent remembers
GET /v1/memory Cloud
?scope=person|project&project=…; DELETE /v1/memory/{id} forgets one note.
Authentication
agent:tasks

Errors

StatusCodeWhen
402insufficient_creditsthe budget is larger than your credits, after the 7 days of grace (When credits run out)
403needs_personan approval sent with a token that is not a person’s session
409task_finishedthe task already ended
422invalid_requesta missing repository, request or budget
429rate_limitedtoo many requests
  1. Tasks
  2. Start a task
  3. Get a task
  4. Follow a task
  5. Cancel
  6. Questions and approvals
  7. Answer a question
  8. Pending approvals
  9. Decide
  10. You
  11. Your level and preferences
  12. What the agent remembers
  13. Errors

    Search pages, sections and terms