Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion trpc_agent_sdk/server/a2a/_agent_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def __init__(
*,
service_name: str,
agent: BaseAgent,
app_name: Optional[str] = None,
agent_card: Optional[AgentCard] = None,
session_service: Optional[BaseSessionService] = None,
memory_service: Optional[BaseMemoryService] = None,
Expand All @@ -77,6 +78,7 @@ def __init__(
self._agent = agent
self._agent_card = agent_card
self._service_name = service_name
self._app_name = app_name
self._session_service = session_service
self._memory_service = memory_service
self._executor_config = executor_config
Expand Down Expand Up @@ -110,8 +112,12 @@ async def _initialize(self) -> None:
logger.info("Initialized A2A Agent Service %s for %s", self._service_name, self._agent.name)

def _create_executor(self) -> TrpcA2aAgentExecutor:
app_name = self._app_name or self._service_name
runner = Runner(
app_name=self._service_name,
# Keep the historical service_name default for compatibility, while
# allowing callers to pass an explicit app_name when the Runner app
# identity differs from the A2A transport registration name.
app_name=app_name,
agent=self._agent,
session_service=self._session_service,
memory_service=self._memory_service,
Expand Down
Loading