a2a_pack.deepagents
DeepAgents integration backed by an A2A workspace.
DeepAgents defaults to an in-graph StateBackend. That is useful for scratch
state, but it is the wrong default for hosted A2A agents because files the
model writes disappear into LangGraph state instead of landing in the caller's
MinIO/FUSE workspace. This backend makes the invocation workspace the source
of truth for DeepAgents' built-in file tools and, when a sandbox is attached,
routes execute through the same workspace-mounted sandbox runtime.
EditResult (class)
EditResult(error: 'str | None' = None, path: 'str | None' = None, occurrences: 'int | None' = None) -> NoneEditResult(error: 'str | None' = None, path: 'str | None' = None, occurrences: 'int | None' = None)
__init__ (method)
__init__(self, error: 'str | None' = None, path: 'str | None' = None, occurrences: 'int | None' = None) -> NoneInitialize self. See help(type(self)) for accurate signature.
ExecuteResponse (class)
ExecuteResponse(output: 'str', exit_code: 'int' = 0, truncated: 'bool' = False) -> NoneExecuteResponse(output: 'str', exit_code: 'int' = 0, truncated: 'bool' = False)
__init__ (method)
__init__(self, output: 'str', exit_code: 'int' = 0, truncated: 'bool' = False) -> NoneInitialize self. See help(type(self)) for accurate signature.
FileDownloadResponse (class)
FileDownloadResponse(path: 'str', content: 'bytes | None' = None, error: 'str | None' = None) -> NoneFileDownloadResponse(path: 'str', content: 'bytes | None' = None, error: 'str | None' = None)
__init__ (method)
__init__(self, path: 'str', content: 'bytes | None' = None, error: 'str | None' = None) -> NoneInitialize self. See help(type(self)) for accurate signature.
FileUploadResponse (class)
FileUploadResponse(path: 'str', error: 'str | None' = None) -> NoneFileUploadResponse(path: 'str', error: 'str | None' = None)
__init__ (method)
__init__(self, path: 'str', error: 'str | None' = None) -> NoneInitialize self. See help(type(self)) for accurate signature.
GlobResult (class)
GlobResult(error: 'str | None' = None, matches: 'list[dict[str, Any]] | None' = None) -> NoneGlobResult(error: 'str | None' = None, matches: 'list[dict[str, Any]] | None' = None)
__init__ (method)
__init__(self, error: 'str | None' = None, matches: 'list[dict[str, Any]] | None' = None) -> NoneInitialize self. See help(type(self)) for accurate signature.
GrepResult (class)
GrepResult(error: 'str | None' = None, matches: 'list[dict[str, Any]] | None' = None) -> NoneGrepResult(error: 'str | None' = None, matches: 'list[dict[str, Any]] | None' = None)
__init__ (method)
__init__(self, error: 'str | None' = None, matches: 'list[dict[str, Any]] | None' = None) -> NoneInitialize self. See help(type(self)) for accurate signature.
LsResult (class)
LsResult(error: 'str | None' = None, entries: 'list[dict[str, Any]] | None' = None) -> NoneLsResult(error: 'str | None' = None, entries: 'list[dict[str, Any]] | None' = None)
__init__ (method)
__init__(self, error: 'str | None' = None, entries: 'list[dict[str, Any]] | None' = None) -> NoneInitialize self. See help(type(self)) for accurate signature.
ReadResult (class)
ReadResult(error: 'str | None' = None, file_data: 'dict[str, Any] | None' = None) -> NoneReadResult(error: 'str | None' = None, file_data: 'dict[str, Any] | None' = None)
__init__ (method)
__init__(self, error: 'str | None' = None, file_data: 'dict[str, Any] | None' = None) -> NoneInitialize self. See help(type(self)) for accurate signature.
WorkspaceBackend (class)
WorkspaceBackend(workspace: 'WorkspaceClient', *, sandbox: 'SandboxClient | None' = None, default_image: 'str' = 'python:3.11-slim') -> 'None'Workspace-backed file/runtime backend for agent frameworks.
The first adapter target is DeepAgents' BackendProtocol, but the
authority is A2A's workspace/sandbox contract, not DeepAgents state.
__init__ (method)
__init__(self, workspace: 'WorkspaceClient', *, sandbox: 'SandboxClient | None' = None, default_image: 'str' = 'python:3.11-slim') -> 'None'Initialize self. See help(type(self)) for accurate signature.
aexecute (method)
aexecute(self, command: 'str', *, timeout: 'int | None' = None) -> 'Any'(no docstring)
download_files (method)
download_files(self, paths: 'list[str]') -> 'list[Any]'(no docstring)
edit (method)
edit(self, file_path: 'str', old_string: 'str', new_string: 'str', replace_all: 'bool' = False) -> 'Any'(no docstring)
execute (method)
execute(self, command: 'str', *, timeout: 'int | None' = None) -> 'Any'(no docstring)
glob (method)
glob(self, pattern: 'str', path: 'str' = '/') -> 'Any'(no docstring)
grep (method)
grep(self, pattern: 'str', path: 'str | None' = None, glob: 'str | None' = None) -> 'Any'(no docstring)
ls (method)
ls(self, path: 'str') -> 'Any'(no docstring)
read (method)
read(self, file_path: 'str', offset: 'int' = 0, limit: 'int' = 2000) -> 'Any'(no docstring)
upload_files (method)
upload_files(self, files: 'list[tuple[str, bytes]]') -> 'list[Any]'(no docstring)
write (method)
write(self, file_path: 'str', content: 'str') -> 'Any'(no docstring)
WorkspaceDeepAgentsBackend (class)
WorkspaceDeepAgentsBackend(workspace: 'WorkspaceClient', *, sandbox: 'SandboxClient | None' = None, default_image: 'str' = 'python:3.11-slim') -> 'None'Workspace-backed file/runtime backend for agent frameworks.
The first adapter target is DeepAgents' BackendProtocol, but the
authority is A2A's workspace/sandbox contract, not DeepAgents state.
__init__ (method)
__init__(self, workspace: 'WorkspaceClient', *, sandbox: 'SandboxClient | None' = None, default_image: 'str' = 'python:3.11-slim') -> 'None'Initialize self. See help(type(self)) for accurate signature.
aexecute (method)
aexecute(self, command: 'str', *, timeout: 'int | None' = None) -> 'Any'(no docstring)
download_files (method)
download_files(self, paths: 'list[str]') -> 'list[Any]'(no docstring)
edit (method)
edit(self, file_path: 'str', old_string: 'str', new_string: 'str', replace_all: 'bool' = False) -> 'Any'(no docstring)
execute (method)
execute(self, command: 'str', *, timeout: 'int | None' = None) -> 'Any'(no docstring)
glob (method)
glob(self, pattern: 'str', path: 'str' = '/') -> 'Any'(no docstring)
grep (method)
grep(self, pattern: 'str', path: 'str | None' = None, glob: 'str | None' = None) -> 'Any'(no docstring)
ls (method)
ls(self, path: 'str') -> 'Any'(no docstring)
read (method)
read(self, file_path: 'str', offset: 'int' = 0, limit: 'int' = 2000) -> 'Any'(no docstring)
upload_files (method)
upload_files(self, files: 'list[tuple[str, bytes]]') -> 'list[Any]'(no docstring)
write (method)
write(self, file_path: 'str', content: 'str') -> 'Any'(no docstring)
WriteResult (class)
WriteResult(error: 'str | None' = None, path: 'str | None' = None) -> NoneWriteResult(error: 'str | None' = None, path: 'str | None' = None)
__init__ (method)
__init__(self, error: 'str | None' = None, path: 'str | None' = None) -> NoneInitialize self. See help(type(self)) for accurate signature.
Source: apps/a2a/a2a_pack/deepagents.py