-
Couldn't load subscription status.
- Fork 2.1k
Labels
services[Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc[Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc
Milestone
Description
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_experimental
def to_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:
"""Create a runner for the agent."""
return Runner(
app_name=agent.name or "adk_agent",
agent=agent,
# Use minimal services - in a real implementation these could be configured
artifact_service=InMemoryArtifactService(),
session_service=InMemorySessionService(),
memory_service=InMemoryMemoryService(),
credential_service=InMemoryCredentialService(),
)javiromay-plexus and ZachTB123
Metadata
Metadata
Assignees
Labels
services[Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc[Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc