Leo for agents
Versioned HTTP and JSON at https://www.leo.co.ke/api/agent/v1.
Base
https://www.leo.co.ke/api/agent/v1Example
curl -H "Authorization: Bearer $LEO_TOKEN" https://www.leo.co.ke/api/agent/v1/meSend an Idempotency-Key header (or idempotency_key in the body) on every write you might retry. The same key with the same body returns the first result and the header Idempotent-Replayed: true. The same key with a different body is IDEMPOTENCY_CONFLICT and writes nothing. An identical create sent without a key within ten minutes is also treated as a retry.
Lists return next, a timestamp cursor, when there may be more. Pass it back as before to get the next page.
| Window | Limit |
|---|---|
| All requests | 300 a minute |
| Reads | 240 a minute |
| Writes | 60 a minute |
| Context packages | 30 a minute |
| Run reports | 120 a minute |
| Per day | 20,000 |
Limits are per credential and the same on every plan. A refused request answers 429 with Retry-After.
| Method and path | What it does | Scopes |
|---|---|---|
| GET /api/agent/v1/me | Who am I in Leo | any credential |
| GET /api/agent/v1/workspaces | List the workspaces this connection may use | any credential |
| GET /api/agent/v1/workspace | Workspace overview | workspace.read |
| GET /api/agent/v1/context | Get the context package | context.read |
| GET /api/agent/v1/search | Search Leo | context.read |
| GET /api/agent/v1/fetch | Fetch a Leo record | context.read |
| GET /api/agent/v1/projects | List projects | work.read |
| GET /api/agent/v1/projects/:project_id | Get a project | work.read |
| POST /api/agent/v1/projects | Create a project | work.write |
| PATCH /api/agent/v1/projects/:project_id | Update a project | work.write |
| POST /api/agent/v1/projects/:project_id/decisions | Record a project decision | context.write |
| POST /api/agent/v1/context/entries | Record context | context.write |
| POST /api/agent/v1/projects/:project_id/references | Add a project reference | context.write |
| GET /api/agent/v1/tasks | List tasks | work.read |
| GET /api/agent/v1/tasks/:task_id | Get a task | work.read |
| POST /api/agent/v1/tasks | Create a task | work.write |
| PATCH /api/agent/v1/tasks/:task_id | Update a task | work.write |
| POST /api/agent/v1/tasks/:task_id/complete | Complete a task | work.write |
| POST /api/agent/v1/tasks/:task_id/approvals | Ask a person to approve a task | work.write |
| POST /api/agent/v1/tasks/:task_id/runs | Start work on a task | work.execute |
| POST /api/agent/v1/runs/:run_id/events | Report progress on a run | work.execute |
| POST /api/agent/v1/runs/:run_id/finish | Finish a run | work.execute |
| POST /api/agent/v1/tasks/:task_id/handoffs | Hand work on | work.execute |
| GET /api/agent/v1/runs/:run_id | Get a run | work.read |
| GET /api/agent/v1/tasks/:task_id/runs | List runs on a task | work.read |
| GET /api/agent/v1/artifacts | List artifacts | library.read |
| GET /api/agent/v1/artifacts/:artifact_id | Get an artifact | library.read |
| POST /api/agent/v1/artifacts/uploads | Get an address to upload a file to | library.write |
| POST /api/agent/v1/artifacts | Publish an artifact | library.write |
| GET /api/agent/v1/companies | Find companies | crm.read |
| GET /api/agent/v1/companies/:company_id | Get a company | crm.read |
| POST /api/agent/v1/companies | Create a company | crm.write |
| PATCH /api/agent/v1/companies/:company_id | Update a company | crm.write |
| GET /api/agent/v1/contacts | Find contacts | crm.read |
| GET /api/agent/v1/contacts/:contact_id | Get a contact | crm.read |
| POST /api/agent/v1/contacts | Create a contact | crm.write |
| PATCH /api/agent/v1/contacts/:contact_id | Update a contact | crm.write |
| GET /api/agent/v1/deals | List deals | crm.read |
| GET /api/agent/v1/deals/:deal_id | Get a deal | crm.read |
| POST /api/agent/v1/deals | Create a deal | crm.write |
| PATCH /api/agent/v1/deals/:deal_id | Update a deal | crm.write |
| POST /api/agent/v1/interactions | Record an interaction or research | crm.write |
| GET /api/agent/v1/studio/projects | List Studio projects | studio.read |
| GET /api/agent/v1/studio/assets | List Studio renders | studio.read |
| GET /api/agent/v1/studio/models | List Studio models | studio.read |
| GET /api/agent/v1/studio/brand | Read the brand guidelines | studio.read |
| POST /api/agent/v1/studio/generations/quote | Price an image or video | studio.read |
| POST /api/agent/v1/studio/generations | Make an image or video | studio.generate |
| GET /api/agent/v1/studio/generations/:asset_id | Check one render | studio.read |
| GET /api/agent/v1/studio/voices | List Leo Audio voices | studio.read |
| POST /api/agent/v1/studio/audio/quote | Price a voice, music or sound effect | studio.read |
| POST /api/agent/v1/studio/audio | Make a voice, music or sound effect | studio.generate |
| GET /api/agent/v1/meetings | List meetings | meetings.read |
| GET /api/agent/v1/meetings/:meeting_id | Read a meeting | meetings.read |
| GET /api/agent/v1/devices | List the person's computers | workspace.read |
| GET /api/agent/v1/history | Read what happened on a project or task | work.read |