a2a/templates.py

crewAI · lib/crewai/src/crewai/a2a/templates.py · python · MIT
ai, tag:embed-classified

Set of string templates for agent‑to‑agent protocol messages and status reporting.

# Source: https://github.com/crewAIInc/crewAI | License: MIT | Copyright 2025 crewAI, Inc
# Provided via justclaw.it.com; keep this notice with the code.
"""String templates for A2A (Agent-to-Agent) protocol messaging and status."""

from string import Template
from typing import Final


AVAILABLE_AGENTS_TEMPLATE: Final[Template] = Template(
    "\n<AVAILABLE_A2A_AGENTS>\n    $available_a2a_agents\n</AVAILABLE_A2A_AGENTS>\n"
)
PREVIOUS_A2A_CONVERSATION_TEMPLATE: Final[Template] = Template(
    "\n<PREVIOUS_A2A_CONVERSATION>\n"
    "    $previous_a2a_conversation"
    "\n</PREVIOUS_A2A_CONVERSATION>\n"
)
CONVERSATION_TURN_INFO_TEMPLATE: Final[Template] = Template(
    "\n<CONVERSATION_PROGRESS>\n"
    '    turn="$turn_count"\n'
    '    max_turns="$max_turns"\n'
    "    $warning"
    "\n</

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key