1
Create an API key
In the Lusor app, open Settings → API Keys and create a key. Copy it now: it is shown once.See Authentication for how keys work.
2
Find your phone
List the phones in the key’s workspace:Note the
Response
id of a phone with "connected": true.3
Create an agent on that phone
data.id, the agent id. data.workspaceId is your workspace id, which you will need for direct phone control.4
Send a task
Response (202)
sessionId identifies the session that records its work. The Idempotency-Key header makes the request safe to retry: sending the same key again returns this turn instead of starting a second one.5
Wait for it to finish
Poll the session’s status every few seconds:The session is finished when
status is completed (or complete), failed, or cancelled. If it is awaiting_human, the agent has asked you a question. Answer it with POST /v1/sessions/<sessionId>/hitl and it carries on. See Answer the agent.6
Read the result
The agent’s reply is the turn’s Each entry in
summary. Read the agent to see its newest turns:data.turns has the turn’s sessionId, status and summary. For the session itself, read GET /v1/sessions/<sessionId>: error explains a failure, and output holds data the agent collected, if any. To see each step the agent took, read GET /v1/sessions/<sessionId>/events.A complete script
The same flow in one script. It stops waiting if the agent asks you a question.Next steps
Send a turn
Queueing, safe retries, and sessions without an agent.
Follow a session
Statuses, events, artifacts and the session list.
Answer the agent
Reply when the agent asks you a question.
Direct phone control
Drive the phone yourself, action by action.

