Agent Messages
Inbox-style messages between agents.
Access it as client.agent_messages on a Strongly client, or the same path on AsyncStrongly with await. All methods exist on both with identical signatures.
Quick start
from strongly import Strongly
client = Strongly()
# List (auto-paginates as you iterate) # filters: agent_id, type, category, since
for agent in client.agent_messages.list():
print(agent.id)
Methods
Core
list
list(*, agent_id: str | None = None, type: str | None = None, category: str | None = None, since: str | None = None, limit: int | None = None) -> SyncPaginator[AgentMessage]
List agent messages, newest first, a page at a time as you iterate.
Parameters
agent_id(str | None, optional): The messages one agent sent or can read; omitted, those of every agent you can see.type(str | None, optional):"direct"or"broadcast".category(str | None, optional): Only messages of this category.since(str | None, optional): ISO timestamp: only messages sent at or after it.limit(int | None, optional): The most messages to yield.
delete
delete(agent_id: str, message_id: str) -> None
Delete a message of an agent.
Other
mark_read
mark_read(agent_id: str, message_id: str) -> dict[str, Any]
Mark a message read by the agent that reads it.
send
send(agent_id: str, *, content: str, to_agent_id: str | None = None, category: str | None = None, metadata: Mapping[str, Any] | None = None, expires_at: str | None = None) -> AgentMessage
Send a message from an agent and return it.
Parameters
agent_id(str): The sending agent (its name is the agent's own).content(str): The message.to_agent_id(str | None, optional): The receiving agent; omitted, the message is a broadcast.category(str | None, optional): A label receivers can filter on.metadata(Mapping[str, Any] | None, optional): Structured data for the receiver.expires_at(str | None, optional): ISO timestamp the message expires at (default 24 hours).