You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The to_a2a() function should allow for configuration of artifact_service, session_service, memory_service and credential_service, right now is hard coded in the runner creation, so it is impossible to use proper services.
@a2a_experimentaldefto_a2a(
agent: BaseAgent,
*,
host: str="localhost",
port: int=8000,
protocol: str="http",
agent_card: Optional[Union[AgentCard, str]] =None,
) ->Starlette:
"""Convert an ADK agent to a A2A Starlette application. Args: # Set up ADK logging to ensure logs are visible when using uvicorn directly setup_adk_logger(logging.INFO) async def create_runner() -> Runner: """Createarunnerfortheagent."""
return Runner(
app_name=agent.name or "adk_agent",
agent=agent,
# Use minimal services - in a real implementation these could be configuredartifact_service=InMemoryArtifactService(),
session_service=InMemorySessionService(),
memory_service=InMemoryMemoryService(),
credential_service=InMemoryCredentialService(),
)