SDK ReferencePython SDK

SessionContextImpl

Markdown

Properties

NameTypeDescription
user_idstrThe user ID for the current session.

Methods

execute()

Execute any tool from within a custom tool. Routes to sibling local tools in-process when available, otherwise delegates to the backend API. Returns the same response model as session.execute().

def execute(tool_slug: str, arguments: Dict[str, Any]) -> SessionExecuteResponse

Parameters

NameType
tool_slugstr
argumentsDict[str, Any]

Returns

SessionExecuteResponse


proxy_execute()

Proxy API calls through Composio's auth layer. Returns the same response model as session.proxy_execute().

def proxy_execute(toolkit: str, endpoint: str, method: Literal['GET', 'POST', 'PUT', 'DELETE', 'PATCH'], body: Any = ..., parameters: List[Dict[str, Any | None]] = ...) -> SessionProxyExecuteResponse

Parameters

NameType
toolkitstr
endpointstr
methodLiteral['GET', 'POST', 'PUT', 'DELETE', 'PATCH']
body?Any
parameters?List[Dict[str, Any | None]]

Returns

SessionProxyExecuteResponse


View source