Skip to content

Support a2a for smolagents #829

@femto

Description

@femto

Hello I followed the a2a tutorial at https://mozilla-ai.github.io/any-agent/cookbook/serve_a2a/
the server can't persist and seemed to exit quit quickly

time = await AnyAgent.create_async(
        "smolagents",  # See all options in https://mozilla-ai.github.io/any-agent/
        
        agent_config
    )
    time_handle = await time.serve_async(A2AServingConfig(port=0))

    server_port = time_handle.port

it outputs

Server is ready at http://localhost:58354
ERROR:    Traceback (most recent call last):
  File "/Users/femtozheng/python-project/any-agent/venv/lib/python3.12/site-packages/starlette/routing.py", line 701, in lifespan
    await receive()
  File "/Users/femtozheng/python-project/any-agent/venv/lib/python3.12/site-packages/uvicorn/lifespan/on.py", line 137, in receive
    return await self.receive_queue.get()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/femtozheng/.pyenv/versions/3.12.3/lib/python3.12/asyncio/queues.py", line 158, in get
    await getter
asyncio.exceptions.CancelledError

Metadata

Metadata

Assignees

No one assigned

    Labels

    A2ARelated to Agent 2 Agent Protocol

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions