SDK ReferenceTypeScript SDK

SessionContextImpl

Usage

Access this class through the composio.sessionContextImpl property:

const composio = new Composio({ apiKey: 'your-api-key' });
const result = await composio.sessionContextImpl.list();

Properties

NameTypeDescription
signalAbortSignalPer-execution AbortSignal. Never set on the base instance; executeCustomTool
grafts it onto a per-call Object.create child so concurrent executions
sharing this context don't observe each other's signal. Declared here (rather
than read via a cast) so the contract is explicit.
userIdstringThe user ID for this 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 shape as session.execute().

async execute(toolSlug: string, arguments_: Record<string, unknown>): Promise<ToolRouterSessionExecuteResponse>

Parameters

NameType
toolSlugstring
arguments_Record<string, unknown>

Returns

Promise<ToolRouterSessionExecuteResponse>


proxyExecute()

Proxy API calls through Composio's auth layer. The backend resolves the connected account from the toolkit within the session.

async proxyExecute(params: SessionProxyExecuteParams): Promise<ToolRouterSessionProxyExecuteResponse>

Parameters

NameType
paramsSessionProxyExecuteParams

Returns

Promise<ToolRouterSessionProxyExecuteResponse>