message_create
Send a message to one or many agent inboxes at once. It persists the message, routes it by target rules, and confirms delivery with recipients and delivered_count.
Instructions
Persist a message and fan it out to recipient inboxes; emit message.created. The response confirms delivery (recipients + delivered_count). Full docs: okto-nexus://reference/tool-docs/messages.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | Message body (inline text). For large content, attach an artifact and keep body a short pointer. | |
| target | No | Routing target as a raw JSON object (optional; omit = broadcast to present agents). strategy one of: direct {"strategy":"direct","agent_id":"<id>"}; capability {"strategy":"capability","capability":"<cap>"}; role {"strategy":"role","role":"<role>"}; tag {"strategy":"tag","selector":{"<key>":["<value>",...]}} (flat: AND across keys, OR within values) or rich [{"key":"<k>","operator":"In|NotIn|Exists|DoesNotExist","values":["<v>",...]}] (ANDed; CAUTION: NotIn/DoesNotExist also match agents MISSING the key); broadcast {"strategy":"broadcast"}; mixed {"strategy":"mixed","rules":[<sub-target>,...]}. Hierarchy/catalog rules, examples, edge-cases: okto-nexus://reference/target-grammar. | |
| subject | Yes | Short message subject/title (one line). | |
| trace_id | No | Trajectory trace_id to stamp on this message (optional; non-empty string, max 128 chars). Needs the feature_trace flag ON, else accepted and ignored; omitted = inherit the reply parent's trace, or generate one. | |
| artifacts | No | List of artifact_id strings to attach (optional; at most 20, no exact duplicates; reference large content instead of inlining it in body). | |
| channel_id | No | Channel_id to post into (optional; omit = no channel). Organizational label only; does NOT decide recipients (the target does). | |
| project_root | Yes | Absolute path to the project (defines the workspace scope). | |
| from_agent_id | Yes | Your agent_id (the sender); recorded as the author - recipients reply by targeting it. | |
| session_secret | No | session_secret from session_open for from_session_id (optional in open mode but VALIDATED if supplied; REQUIRED in strict mode). | |
| from_session_id | No | Your session_id from session_open (optional in trust_mode=open; REQUIRED with session_secret in trust_mode=strict). | |
| parent_message_id | No | Message_id this is a reply to, to thread the conversation (optional). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||