SkillKit.Tools.SendMessage (SkillKit v0.1.0)

Copy Markdown View Source

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 to SkillKit.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.

Functions

agent_definition()

Returns the agent definition from AGENT.md, or nil if not present.

input_schema()

Tool input schema. Override to declare parameters; defaults to an empty object. Called from the generated definition/0.