# 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. |
