Skip to Content
ReferenceToolsagent_prompt

agent_prompt

Sends a prompt to an AI agent program on the machine and returns its answer and a session id to continue. Long runs return a task to follow.

Arguments

Over MCP every tool also takes machine: the machine’s name or id, optional when only one machine is online.

NameTypeRequiredMeaning
agentstringnoCatalog id from agent_list. Absent: the machine’s default agent.
cwdstringnoFolder the agent works in. Absent: the agent’s own folder on the machine, the same for every prompt, so a session continues there.
promptstringyesWhat to ask, at most 16 KiB. The agent reads it as an instruction.
sessionstringnoA session from an earlier answer, to continue that conversation.
tier"text_only" | "read_only"noAsk for less than the machine allows; never more.
wait_secsintegernoSeconds to wait for the answer (default 50, at most 240). A run still going then keeps going: follow it with task_output on task.

Result

NameTypeRequiredMeaning
agentstringyesThe agent that answered.
errorstringnoWhy there is no answer, when state is failed.
sessionstringnoPass it back as session to continue.
state"running" | "done" | "failed" | "stopped" | "paused"yes
taskintegeryesThe run’s task: task_output reads it, agent_cancel stops it.
textstringnoThe agent’s final answer.
tier"text_only" | "read_only"yesThe tier the run had.

Examples

{ "name": "agent_prompt", "arguments": { "machine": "<machine>", "prompt": "<prompt>" } }

Limits

The call times out after 260 s (timed_out). Available since version 0.1.13. A refused or failed call returns one of the error codes.