{"record":{"id":"d4c8a7f54ae78d05","repo":"FoundationAgents/OpenManus","slug":"streaming-is-not-supported-by-manus-yet","errorCode":null,"errorMessage":"Streaming is not supported by Manus yet.","messagePattern":"Streaming is not supported by Manus yet\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"protocol/a2a/app/agent.py","lineNumber":23,"sourceCode":"from app.agent.manus import Manus\n\n\nclass ResponseFormat(BaseModel):\n    \"\"\"Respond to the user in this format.\"\"\"\n\n    status: Literal[\"input_required\", \"completed\", \"error\"] = \"input_required\"\n    message: str\n\n\nclass A2AManus(Manus):\n    async def invoke(self, query, sessionId) -> str:\n        config = {\"configurable\": {\"thread_id\": sessionId}}\n        response = await self.run(query)\n        return self.get_agent_response(config, response)\n\n    async def stream(self, query: str) -> AsyncIterable[Dict[str, Any]]:\n        \"\"\"Streaming is not supported by Manus.\"\"\"\n        raise NotImplementedError(\"Streaming is not supported by Manus yet.\")\n\n    def get_agent_response(self, config, agent_response):\n        return {\n            \"is_task_complete\": True,\n            \"require_user_input\": False,\n            \"content\": agent_response,\n        }\n\n    SUPPORTED_CONTENT_TYPES: ClassVar[List[str]] = [\"text\", \"text/plain\"]\n","sourceCodeStart":5,"sourceCodeEnd":33,"githubUrl":"https://github.com/FoundationAgents/OpenManus/blob/52a13f2a57d8c7f6737eefb02ccf569594d44273/protocol/a2a/app/agent.py#L5-L33","documentation":"Raised by A2AManus.stream() because the Manus agent only implements non-streaming invocation. The A2A protocol surface expects an async iterable of events for streaming requests, but this implementation deliberately raises NotImplementedError to signal that capability is absent.","triggerScenarios":"An A2A client sends a message/stream (SSE streaming) request instead of a non-streaming message request to the Manus agent endpoint; or code calls agent.stream(query) directly. The invoke() path works; only the streaming path fails.","commonSituations":"A2A clients that default to streaming; protocol gateways or test harnesses that probe both streaming and non-streaming modes; upgrading a client to use streaming without checking server capabilities (the agent card should be consulted).","solutions":["Use the non-streaming invoke path: send a plain message/send request instead of message/stream.","Check the agent card / server capabilities before connecting and disable streaming for this agent.","In your own executor, catch NotImplementedError from stream() and fall back to invoke(), emitting a single final event.","If streaming is required, implement stream() to yield at least one event (e.g. wrap the invoke result)."],"exampleFix":"# before\nasync for event in agent.stream(query):  # raises NotImplementedError\n    print(event)\n# after\nresult = await agent.invoke(query, session_id)  # non-streaming path is supported\nprint(result)","handlingStrategy":"fallback","validationCode":"capabilities = await fetch_agent_card(url)  # check streaming support before connecting\nuse_streaming = getattr(capabilities, 'streaming', False)","typeGuard":"def supports_streaming(agent) -> bool:\n    try:\n        return agent.stream is not None and not getattr(agent.stream, '_is_not_implemented', False)\n    except AttributeError:\n        return False","tryCatchPattern":"try:\n    async for event in agent.stream(query):\n        handle(event)\nexcept NotImplementedError:\n    result = await agent.invoke(query, session_id)  # fall back to non-streaming\n    handle(result)","preventionTips":["Consult the agent card capabilities before enabling streaming on the client.","Default to message/send for agents whose streaming support is unverified.","Wrap streaming calls in a NotImplementedError fallback so one agent's limitation does not break the pipeline."],"tags":["a2a","streaming","not-implemented","agent-protocol"],"backgroundTag":null,"analyzedSha":"52a13f2a57d8c7f6737eefb02ccf569594d44273","analyzedAt":"2026-08-15T02:33:49.993Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}