{"record":{"id":"9fb059fadee590a8","repo":"langchain-ai/deepagents","slug":"audio-is-not-currently-supported","errorCode":null,"errorMessage":"Audio is not currently supported.","messagePattern":"Audio is not currently supported\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"libs/acp/deepagents_acp/utils.py","lineNumber":42,"sourceCode":"def convert_image_block_to_content_blocks(block: ImageContentBlock) -> list[dict[str, object]]:\n    \"\"\"Convert an ACP image block to LangChain content blocks.\"\"\"\n    # Primary case: inline base64 data (data is already a base64 string)\n    if block.data:\n        data_uri = f\"data:{block.mime_type};base64,{block.data}\"\n        return [{\"type\": \"image_url\", \"image_url\": {\"url\": data_uri}}]\n\n    # No data available\n    return [{\"type\": \"text\", \"text\": \"[Image: no data available]\"}]\n\n\ndef convert_audio_block_to_content_blocks(block: AudioContentBlock) -> list[dict[str, str]]:\n    \"\"\"Convert an ACP audio block to LangChain content blocks.\n\n    Raises:\n        NotImplementedError: Audio content is not yet supported.\n    \"\"\"\n    msg = \"Audio is not currently supported.\"\n    raise NotImplementedError(msg)\n\n\ndef convert_resource_block_to_content_blocks(\n    block: ResourceContentBlock,\n    *,\n    root_dir: str,\n) -> list[dict[str, str]]:\n    \"\"\"Convert an ACP resource block to LangChain content blocks.\"\"\"\n    file_prefix = \"file://\"\n    resource_text = f\"[Resource: {block.name}\"\n    if block.uri:\n        # Truncate root_dir from path while preserving file:// prefix\n        uri = block.uri\n        has_file_prefix = uri.startswith(file_prefix)\n        path = uri[len(file_prefix) :] if has_file_prefix else uri\n\n        # Remove root_dir prefix to get path relative to agent's working directory\n        if path.startswith(root_dir):","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/langchain-ai/deepagents/blob/a1af029e6e73cb17c36bff823d227747b28e91e1/libs/acp/deepagents_acp/utils.py#L24-L60","documentation":"`convert_audio_block_to_content_blocks` in libs/acp/deepagents_acp/utils.py unconditionally raises NotImplementedError: audio prompt blocks cannot yet be translated to LangChain content blocks. The ACP bridge supports text, image, resource, and embedded-resource blocks but not audio.","triggerScenarios":"Sending a `prompt()` request whose content list contains an `AudioContentBlock` (ACP `audio` block with `AudioContentBlockData`) — conversion is attempted in server.py:983-984.","commonSituations":"An ACP client that records or forwards voice input; a protocol client configured to attach microphone audio; automated tests or proxies forwarding arbitrary block types to the agent.","solutions":["Remove the audio block from the prompt content before calling `prompt()`; send a text transcription instead","Transcribe the audio client-side (e.g. with a speech-to-text model) and pass the text as a TextContentBlock","If you control the client, filter unsupported block types before sending","Track library updates for audio support before retrying audio blocks"],"exampleFix":"# before\nprompt_blocks = [AudioContentBlock(...), text_block]\n# after\nprompt_blocks = [TextContentBlock(type=\"text\", text=transcribe(audio))]","handlingStrategy":"type-guard","validationCode":"if any(isinstance(b, AudioContentBlock) for b in prompt_blocks):\n    raise ValueError(\"ACP transport does not support audio blocks; transcribe to text first\")","typeGuard":"def is_supported_block(block: object) -> bool:\n    return not isinstance(block, AudioContentBlock)","tryCatchPattern":"try:\n    resp = await conn.prompt(blocks, session_id)\nexcept NotImplementedError as exc:\n    if \"Audio is not currently supported\" in str(exc):\n        blocks = [b for b in blocks if not isinstance(b, AudioContentBlock)]\n        resp = await conn.prompt(blocks, session_id)\n    else:\n        raise","preventionTips":["Filter AudioContentBlock out of prompt content before sending over ACP","Transcribe audio to text client-side and send a TextContentBlock instead","Keep client block construction limited to text/image/resource types","Re-check supported block types when upgrading the acp package"],"tags":["acp","audio","not-implemented","content-blocks"],"backgroundTag":"unsupported-content-type","analyzedSha":"a1af029e6e73cb17c36bff823d227747b28e91e1","analyzedAt":"2026-08-29T11:43:24.718Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}