Send a prompt to the session's agent
Changed onGives the agent something to do. Starts a run if none is going, and adds a turn to the conversation if one is.
This returns as soon as the agent has accepted the prompt, not when it has finished — a run takes as long as the work takes. Follow it with getSession and read agent.status, or let the SDK's waitUntilDone do that for you.
Acceptance is not the same as success. A 202 means the agent took the prompt; a 409 means it refused, which happens when the run it belonged to has ended. Recreate the session in that case rather than retrying the message.
The agent can change anything in the project and is charged for AI usage doing it, which is why this needs the agent:message scope rather than a project write.
Request
- Base URLhttps://davinci-app.com
- AuthHTTP bearer
Request body
Response
The agent accepted the prompt. The run is now in progress.
Changes
- info
the
response property const valuefalsewas added for the status - info
the
response property const valuefalsewas added for the status - info
the
response property const valuefalsewas added for the status - info
the
response property const valuefalsewas added for the status - info
the
response property const valuefalsewas added for the status - info
the
response property const valuefalsewas added for the status - info
the
response property const valuefalsewas added for the status
- info
- info
endpoint added
- info