get_agent_response
Get a Layer agent's answer to a message sent with send_agent_message, waiting up to
`wait_seconds` for the turn to finish.
While the status is queued or working, call again: a question or a plan is back in seconds, a
build in 15 to 45 minutes. Tell the user what the agent is doing from `progress` and `reply`.
Answer a question in `reply` yourself when the user's request settles it; otherwise ask the
user. A priced plan in `pending_plan` is the user's decision: never approve it for them.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
session_idrequired | string (uuid) | — | The session the turn belongs to. |
turn_id | string1–∞ chars | — | The turn_id send_agent_message returned. Omit for the session's running or latest turn. |
wait_seconds | integer0–25 | 25 | Seconds to wait for the agent to finish before returning its current state. 0 returns at once. |