Skip to content

[Bug]: Fast API and a2a-python integration issue #470

@baaron42

Description

@baaron42

What happened?

Hi,

I noticed that when I create a skill such as:

class SomeAgent(A2AServer):

    @skill(name="someskill", description="Some skill")
    def dosomething(self, task: str = None):
          return {"successful":True,"message":"Generating trivia"}

Then add the a new router to the app:

router = APIRouter()
agent_instance.setup_routes(router)
app.include_router(router, prefix="/a2a/trivia")

That the signatures of the method do not match for the methods such as tasks_send in a2a_server.py.

As a result, I am forced to override the signatures such that all methods now have the expected parameter that Fast API sends.

async def tasks_send(request: Request):

I am using the following versions:

fastapi==0.116.1
python-a2a==0.5.10

Thank you,
Aaron

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions