Skip to content

API Reference parrot.integrations.telegram.crew.coordinator

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.integrations.telegram.crew.coordinator

View source

CoordinatorBot — manages the pinned registry message in a crew supergroup.

The CoordinatorBot is a non-agent bot that maintains a pinned message showing which agents are online, busy, or offline. It provides real-time visibility of the crew's collective state.

Alias AgentCard

Re-exported from parrot.integrations.telegram.crew.agent_card.AgentCard.

Class CoordinatorBot

Non-agent bot that manages the pinned registry message.

Parameter Type Default Description
token str Telegram Bot API token for the coordinator bot.
group_id int Telegram supergroup chat ID.
registry CrewRegistry The CrewRegistry tracking active agents.
username str '' Telegram username of the coordinator bot.
bot Optional[Bot] None

Method CoordinatorBot.start

Initialize the coordinator bot and send the initial pinned registry message.

start() -> None

Method CoordinatorBot.stop

Gracefully shut down the coordinator bot.

stop() -> None

Method CoordinatorBot.on_agent_join

Handle an agent joining the crew.

Registers the agent in the registry and updates the pinned message.

on_agent_join(card: AgentCard) -> None

Parameter Type Default Description
card AgentCard The AgentCard of the joining agent.

Method CoordinatorBot.on_agent_leave

Handle an agent leaving the crew.

Unregisters the agent and updates the pinned message.

on_agent_leave(username: str) -> None

Parameter Type Default Description
username str Telegram username of the leaving agent.

Method CoordinatorBot.on_agent_status_change

Handle an agent status change.

Updates the agent's status in the registry and edits the pinned message.

on_agent_status_change(username: str, status: str, task: Optional[str] = None) -> None

Parameter Type Default Description
username str Telegram username of the agent.
status str New status (ready, busy, offline).
task Optional[str] None Description of current task (when busy).

Method CoordinatorBot.update_registry

Render and edit the pinned registry message.

Serializes concurrent edit attempts with an asyncio.Lock. Silently ignores Telegram "message not modified" errors.

update_registry() -> None

Alias CrewRegistry

Re-exported from parrot.integrations.telegram.crew.registry.CrewRegistry.

Attribute logger

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally