Constructor
constructor()
Creates a new instance of the Composio SDK. The constructor initializes the SDK with the provided configuration options, sets up the API client, and initializes all core models (tools, toolkits, etc.).
Returns
Composio
Example
Properties
Methods
createSession() (deprecated)
Creates a new instance of the Composio SDK with custom request options while preserving the existing configuration. This method is particularly useful when you need to:- Add custom headers for specific requests
- Track request contexts with unique identifiers
- Override default request behavior for a subset of operations
Returns
Composio — A new Composio instance with the custom request options applied.
Example
flush()
Flush any pending telemetry and wait for it to complete. In Node.js-compatible environments, telemetry is automatically flushed on process exit. However, in environments like Cloudflare Workers that don’t support process exit events, you should call this method manually to ensure all telemetry is sent.Promise<void> — A promise that resolves when all pending telemetry has been sent.
Example
getClient()
Get the Composio SDK client.ComposioClient — The Composio API client.
getConfig()
Get the configuration SDK is initialized with. Returns a frozen shallow clone — the SDK has already snapshotted configuration values such asdangerouslyAllowAutoUploadDownloadFiles, fileUploadDirs, and fileDownloadDir into its internal models, so mutating the live config object would silently no-op. Freezing makes that contract visible at the call site instead of letting the mutation appear successful.
Readonly<ComposioConfig> — The frozen configuration the SDK is initialized with.