Sends a message to all team members except the sender and optionally excluded agents, delivering via transport and triggering wakeup notifications.
# Source: https://github.com/win4r/ClawTeam-OpenClaw | License: MIT | Copyright 2025 HKUDS
# Provided via justclaw.it.com; keep this notice with the code.
def broadcast(
self,
from_agent: str,
content: str,
msg_type: MessageType = MessageType.broadcast,
key: str | None = None,
exclude: list[str] | None = None,
) -> list[TeamMessage]:
from clawteam.team.manager import TeamManager
exclude_set = set(exclude or [])
exclude_set.add(from_agent)
# Build a mapping from inbox directory name to logical agent name
# so we can correctly exclude the sender even when inbox names
# use user-prefixed format (e.g. "alice_worker").
exclude_inboxes: set[str] = set()
for name in exclude_set
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key