Building Custom Multi-Agent Tools
We recommend using the pre-made multi-agent messaging tools for most use cases, but advanced users can write custom tools to support complex communication patterns.
You can also write your own agent communication tools by using the Letta API and writing a custom tool in Python. Since Letta runs as a service, you can make request to the server from a custom tool to send messages to other agents via API calls.
Here’s a simple example of a tool that sends a message to a specific agent:
Below is an example of a tool that triggers agents tagged with worker
to start their tasks: