Tool for sending a message to a pre-bound target agent.
The target is configured by whoever registers this tool into a tool
scope (sub-loop, subagent, or future phonebook skill). The LLM only
supplies the content. There is no LLM-supplied to: parameter — that
is by design, so the same tool module can serve every messaging
context with no special-casing.
Context
Expects the following keys in %ToolExecution{}.context:
:target—%SkillKit.AgentRef{}of the agent to message. The tool delegates toSkillKit.send_message/2, which casts a%UserMessage{}to that agent's mailbox.
Behavior
Returns {:ok, "Message sent."} on successful cast. Returns
{:error, "Target agent is not running."} if the target's mailbox
process cannot be located.
Summary
Functions
Returns the agent definition from AGENT.md, or nil if not present.
Tool input schema. Override to declare parameters; defaults to an
empty object. Called from the generated definition/0.