agents_ask
Send a message to an AI agent and get its response. The agent runs with its configured prompt, tools, and knowledge. Use this to test agents or have them process a task. Returns: {status: 'replied'|'silent', response_text, messages[], full_reply, model_used, tokens_*, send_mode, execution_mode, t...
This record as markdown: /tools/io-github-saloprj-dialogbrain/agents-ask.md
What agents_ask does on Dialogbrain
AI agents invoke agents_ask to trigger actions in Dialogbrain. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.
| Parameter | Type | Required | Description |
|---|---|---|---|
message | string | Yes | Message/goal to send to the agent |
agent_id | integer | Yes | ID of the AI agent to ask |
send_mode | string | — | Send mode for the agent run: 'draft' = create drafts, 'auto' = send directly. Defaults to the agent's configured default_send_mode. Does NOT change execution_mo |
background | boolean | — | Run detached from this MCP connection. Returns immediately with status='started'; the run survives client timeouts and disconnects (up to 15 min). Poll agents.t |
Parameters from the server's own tool schema.
Why agents_ask is rated High
This tool triggers an AI agent to execute arbitrary tasks using its configured tools and knowledge. The agent may invoke other tools (as evidenced by 'tool_calls[]' in the response), meaning the blast radius depends on what tools the agent has access to — potentially including destructive or financial operations.
From the tool's definition Send a message to an AI agent and get its response. The agent runs with its configured prompt, tools, and knowledge.
Attacks that exploit this kind of access
The rule that runs agents_ask safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Dialogbrain, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For agents_ask, this is the rule to start with:
agents_ask stays usable, but rate-capped: a runaway agent can't fire it dozens of times a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Dialogbrain, apply this rule, and every agents_ask call is checked against it from then on.
Questions about agents_ask
Send a message to an AI agent and get its response. The agent runs with its configured prompt, tools, and knowledge. Use this to test agents or have them process a task. Returns: {status: 'replied'|'silent', response_text, messages[], full_reply, model_used, tokens_*, send_mode, execution_mode, tool_calls[]}. tool_calls[] is the per-tool trace in call order — each {tool, success, error, duration_ms} — so you can see which tool the agent ran and why it failed (e.g. a workbench script error) directly from this response, no trace lookup needed. messages[] carries each messages.send invocation the agent made (text, subject, reply_to_message_id, timestamp, message_id, attachments=[{file_id,name,mime}]). full_reply concatenates text only — attachment-only sends show up in messages but not full_reply. status='silent' iff both response_text is empty AND messages is empty. Execution may take 10-60s depending on agent complexity. For runs that may exceed ~2 minutes (heavy multi-step agents), pass background=true: the call returns immediately with status='started' and the run continues server-side, detached from this connection — poll agents.traces_list / agents.trace_get for the outcome and agents.list_drafts for produced drafts. It is categorised as a Execute tool in the Dialogbrain MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
agents_ask accepts 4 parameters: message, agent_id, send_mode, background. Required: message, agent_id. The full parameter table on this page comes from the server's own tool schema.
Register the Dialogbrain MCP server in PolicyLayer and add a rule for agents_ask: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Dialogbrain. Nothing to install.
agents_ask is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the agents_ask rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for agents_ask. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
agents_ask is provided by the Dialogbrain MCP server (https://api.dialogbrain.com/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Dialogbrain, and thousands of servers like it.
Across the catalogue