Run an agent now
const url = 'https://api.asklucy.eu/v1/agents/example/runs';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"input":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.asklucy.eu/v1/agents/example/runs \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "input": "example" }'A manual run with the current version. It starts at once, or queues
behind the run in progress (one run per agent at a time; 429
…/errors/agent-queue-full past 20 queued). Follow it with
getAgentRun, or live on its answer’s events
(…/conversations/{conversation_id}/messages/{message_id}/events)
once it is running. A run that can’t start (quota used up, the
agent was disabled meanwhile) ends failed with the reason in
error.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Any unique string (a UUID works). Retries with the same key return the first result.
Request Body
Section titled “Request Body”object
Anything for this run (any JSON, at most 16 KB).
Example generated
{ "input": "example"}Responses
Section titled “Responses”Accepted
object
The agent’s version this run used.
The trigger that started it; null for manual runs.
Who started it, a user ID (manual) or the trg_ ID.
Whom the agent acts as.
owner: its creator, with exactly their access (their memory, their Microsoft 365, their quotas). Its runs are their conversations: they can read and continue them as themselves.service: itself (its ID is its principal). It reaches only what it was given: its knowledge files and the tools below, never anyone’s Microsoft 365. Only org_admins create and see service agents; their runs are read-only.
queued waits for the agent’s run in progress; skipped: a
schedule fired while a run was still going, so this time didn’t
run.
The trigger’s fixed input, or a manual run’s input. Null for none.
A webhook run’s request body (JSON, or a string). Data, never instructions. Null otherwise.
object
Tool calls.
Why it failed or was skipped. Codes: those of Message.error
(internal, timeout, interrupted, rate_limited,
unavailable), and time_limit (max_minutes reached),
quota_exceeded, agent_disabled (it was disabled or deleted
while queued), not_allowed (its identity may no longer use
agents), busy (skipped: a run was still going),
conversation_deleted (its conversation was deleted while it
ran).
object
The run’s conversation, once it is running. Owner runs are the owner’s conversations; service runs are read-only, for org_admins.
The answer that is the run (follow its events while running).
The result’s delivery to the trigger’s callback_url, when it has one.
object
failed after 24 hours of retries.
Example
{ "id": "run_2Wc8LmQz5RtYp1Xv7NsK", "trigger_type": "webhook", "identity": "owner", "status": "queued", "callback": { "status": "pending" }}The request is invalid; errors lists what’s wrong.
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.
Missing, expired or invalid token.
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.
The token is valid but lacks the role this needs.
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.
No such object in your organization.
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.
The object isn’t in a state that allows this (e.g. Lucy is already answering).
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.
Rate limit (problem type …/errors/rate-limited, retry after
Retry-After) or quota used up (…/errors/quota-exceeded, with
quota saying which limit and when it resets).
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.
Seconds to wait before retrying.