Skip to main content
POST
Hand a browser session to an agent

Authorizations

Authorization
string
header
required

Organization API key, generated in studio.sidenet.ai. Backend only — never in a browser.

Path Parameters

id
string
required

The browser session id.

Example:

"bs_3f9a1c0e5b7d2a4c6e8f0b1d"

Body

application/json
thread_id
string
required

The conversation the run happens on (created by its first turn if new).

prompt
string
required

What the person asks the agent to do on the page.

agent_id
string
copilot_id
string

The network to route through; one of agent_id / copilot_id is required.

Response

The session, with control: "agent"

id
string

The session id. Sidenet's own: it is what every route here takes.

status
enum<string>

waiting_person: the agent waits for a person (a take-over, a pause, a code or a sign-in it asked for). waiting_approval: something it wants to send waits for a yes. The last three are ended sessions.

Available options:
live,
waiting_person,
waiting_approval,
done,
stopped,
failed
control
enum<string>

Who may act on the page now.

Available options:
person,
agent
drivers
object[]

Who works in the session.

thread_id
string | null

The conversation the session works for; null for a session a person opened with no agent.

run_id
string | null

The request of the agent turn using it (its id in the requests list).

host
string | null

The website of the active tab.

saved_login
object | null

The saved login the session is signed in with, if any.

tabs
object[]
steps
object[]

The agent's steps, oldest first (the last 200).

needs_person
enum<string> | null

What the agent asked a person for.

Available options:
code,
captcha,
sign_in,
null
pending_submit
object | null

What waits for a yes before it is sent.

end
object | null
metadata
object

Kept and returned as given at creation.

started_at
string<date-time>
ended_at
string<date-time> | null
updated_at
string<date-time>