这是indexloc提供的服务,不要输入任何密码
Skip to content

[Bug]: AttributeError on JSON-RPC message/send call in A2A SDK v0.3.5 #1061

@GeunCheolOh

Description

@GeunCheolOh

What happened?

AttributeError occurs when making a message/send call via JSON-RPC in A2A SDK v0.3.5.

Steps to Reproduce

  1. Implementedan AgentExecutor according to the A2A standard
class MyAgentExecutor(AgentExecutor):
    async def execute(self, context: RequestContext, event_queue: EventQueue) -> None:
        # Agent logic here
        pass

    async def cancel(self, context: RequestContext, event_queue: EventQueue) -> None:
        # Cancel logic here  
        pass
  1. Configured the server with A2AFastAPIApplication like below
executor = MyAgentExecutor()
task_store = InMemoryTaskStore()
queue_manager = InMemoryQueueManager()

request_handler = DefaultRequestHandler(
    agent_executor=executor,
    task_store=task_store,
    queue_manager=queue_manager
)

jsonrpc_handler = JSONRPCHandler(
    agent_card=agent_card,
    request_handler=request_handler
)

app = A2AFastAPIApplication(
    agent_card=agent_card,
    http_handler=jsonrpc_handler
)
  1. and then
    AttributeError: 'MessageSendParams' object has no attribute 'params'

The JSON-RPC call should succeed and return an appropriate response but it didn't.
There were no problem with A2AFastAPIApplication tho.

Relevant log output

File "/.../a2a/server/request_handlers/jsonrpc_handler.py", line 106, in on_message_send
    task_or_message = await self.request_handler.on_message_send(
File "/.../a2a/server/request_handlers/jsonrpc_handler.py", line 107, in on_message_send
    request.params, context
    ^^^^^^^^^^^^^^
AttributeError: 'MessageSendParams' object has no attribute 'params'

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