---
canonical_url: "https://docs.composio.dev/docs/deployment/byoc"
markdown_url: "https://docs.composio.dev/docs/deployment/byoc.md"
product: "platform"
version: null
last_updated: null
---

# Bring your own cloud (BYOC) (/docs/deployment/byoc)

Composio BYOC runs Composio in a cloud account you own. Composio deploys and operates it, and your team approves every release. Tool calls run in your account, your account stores the credentials and logs, and requests to provider APIs leave from your network.

BYOC is available to Enterprise customers on AWS, Google Cloud, and Azure. This page uses AWS service names, from the [AWS reference architecture](/docs/deployment/byoc-architecture). To plan a deployment, [contact Composio](https://composio.dev/contact?utm_source=docs).

## How a tool call runs [#how-a-tool-call-runs]

Your backend points its Composio SDK or MCP client at your deployment's private endpoint. Composio's services in your account find the user's connected account, decrypt its credential in memory, and call the provider's API. The result returns to your application the same way.

![Your application sends tool calls to a private endpoint in your cloud account. Composio's API, runtime, and workers run in the same account and look up encrypted credentials and data there. A release pipeline in the account updates the services. Three connections cross the account boundary: requests carrying the user's credential to provider APIs, background jobs to Temporal Cloud, and releases and status between the account and Composio.](/images/byoc/byoc-overview.svg)
*Tool calls and credentials stay in your cloud account. Three connections cross its boundary.*

## What runs in your account [#what-runs-in-your-account]

| Component               | What it does                                                                                                                                                                                                 |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| API and authentication  | Serves the Composio API and MCP, manages connected accounts, and runs OAuth flows.                                                                                                                           |
| Tool runtime            | Runs toolkit code and calls provider APIs.                                                                                                                                                                   |
| Workers                 | Run Triggers, credential keep-alive, and other background work.                                                                                                                                              |
| Tool catalog and search | Holds the toolkits pinned to your release and finds the right tool for each task. Search uses an LLM and an embedding model, and both can run in your cloud.                                                 |
| Database and cache      | Store projects, connected accounts, encrypted credentials, logs, and worker state.                                                                                                                           |
| Object storage          | Stores files and large results.                                                                                                                                                                              |
| Release pipeline        | Builds a preview that shows what each release will change, and applies the release after your approval. Your team creates the pipeline once, by installing the bootstrap stack from your onboarding package. |

## What's included [#whats-included]

BYOC includes the Composio API and SDKs, connected accounts, tool execution, sessions, MCP, and files. It also includes semantic tool search and Triggers. Tool search uses an LLM and an embedding model that you choose, and Triggers use Temporal Cloud.

These parts of Composio Cloud work differently in BYOC:

* BYOC doesn't deploy the Composio dashboard. You manage projects, API keys, and auth configs through the API.
* Composio-managed OAuth apps aren't available. You use your own OAuth app for each provider.
* Enterprise MCP Gateway and SSO deploy separately.
* BYOC doesn't include Workbench or self-service custom toolkits. Composio can build custom connectors under your agreement, and shares their code with you before each deployment.

## What leaves your account [#what-leaves-your-account]

BYOC isn't an air-gapped deployment. It makes these outbound connections:

| Destination               | What it receives                                                                                                         | When                                                     |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------- |
| Provider APIs             | Tool calls and OAuth token requests, carrying the user's credential                                                      | Always                                                   |
| Composio release registry | Requests for release images, plus the installed version and component health                                             | Always for images. You can turn off status reporting.    |
| Temporal Cloud            | Workflow inputs, results, and errors for background jobs. The inputs are mostly identifiers, schedules, and retry state. | When you use Triggers or scheduled credential keep-alive |
| Model providers           | Tool search queries                                                                                                      | Only if your search models run outside your account      |

Composio distributes releases through Replicated, a software distribution service, so image pulls and status reports go to Replicated's registry. Workers in your cluster connect out to a Temporal Cloud namespace that Composio provides for your deployment, and Temporal never connects into your network. Trigger data and credentials stay in your database and object storage. Logs, metrics, and traces go to the monitoring system you choose.

## Who does what [#who-does-what]

| Area           | Composio                                                                                    | Your team                                                 |
| -------------- | ------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
| Cloud account  | Uses only the roles you approve                                                             | Owns the account, its bill, and its organization policies |
| Infrastructure | Provisions and updates it through the release pipeline                                      | Installs the bootstrap stack and approves each release    |
| Network        | Deploys into the network you provide, or creates one                                        | Controls routing, egress rules, DNS, and certificates     |
| Operations     | Monitors health, responds to incidents, configures failover and backups, and tests restores | Sets availability and recovery requirements               |
| Support        | Requests a session when it needs access                                                     | Approves or declines each session                         |
| Provider apps  | Helps you configure them                                                                    | Creates OAuth apps and registers their redirect URIs      |

## How releases work [#how-releases-work]

When a new version is ready, Composio requests a specific release. The pipeline in your account builds a preview of the changes and waits. Your approver reviews the preview and approves or declines it. After approval, the pipeline applies infrastructure changes, runs database migrations, rolls out the services, and checks their health. If you decline, the pipeline stops and the installed release keeps running.

![Composio requests a release. Inside your cloud account, the pipeline builds a preview, your team approves it, and the pipeline applies the change and verifies the services. If you decline, the installed release keeps running.](/images/byoc/byoc-release-flow.svg)
*Composio can request a release, but only your approver can approve it.*

* The pipeline applies exactly the preview you approved, and rejects a release whose inputs changed after the preview.
* A release can't widen its own permissions or remove the approval step. Those changes require you to update the bootstrap stack.
* Each pipeline stage runs inside your VPC, under a role that your bootstrap stack creates.
* Each environment, such as staging or production, is a separate installation with its own pipeline.

## Security and access [#security-and-access]

### Composio holds no standing credentials [#composio-holds-no-standing-credentials]

Composio has no long-lived credentials for your account. It assumes two roles that your bootstrap stack creates. Each role trusts only Composio's services and requires an external ID unique to your installation. Every session gets temporary credentials.

| Role            | What it can do                                                                                                                                                                          | What it can't do                                                                                                                   |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| Requester       | Start the release pipeline and watch its progress, publish the release configuration, deliver the credential that pulls Composio's images, and read build logs and verification results | Approve a release, change the pipeline, start other builds, read your application secrets, assume other roles, or make IAM changes |
| Support request | Read your bootstrap stack's outputs, check the permissions of the deployment roles, and ask your approver for a support session                                                         | Approve a request, start a build, or connect to a session itself                                                                   |

The requester role's policy explicitly denies each of those actions. If you remove the requester role, Composio can no longer request releases, and the installed release keeps running.

### Support sessions [#support-sessions]

Support access is on by default, and every session needs your approval. You can turn it off when you install.

When an engineer needs access, they request a session for an incident. Your approver receives the request with the engineer's identity, the incident, the scope, and the duration. After approval, the session runs in a temporary container inside your VPC, with a Kubernetes token that expires. Composio engineers have no standing access to your cluster.

| Level                | Default                                   | What it allows                                                                                                                      |
| -------------------- | ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| Diagnostics          | Available, with approval for each session | Pod status, events, and logs in the Composio namespace. It can't read Kubernetes secrets or open a shell.                           |
| Operations           | Off                                       | Pod shells, port forwarding, and deleting individual pods so they restart. A shell can reach the credentials available to that pod. |
| Exact-pod escalation | Off                                       | A shell in one pod that you name in advance. It can reach that pod's credentials.                                                   |

Diagnostics sessions can read application logs, which can include tool request and response data. CloudWatch records each session's approval, engineer, and incident, plus a terminal transcript for shell sessions. CloudTrail and the EKS audit log record the session's AWS and Kubernetes activity. Diagnostic exports leave your account only with your approval.

### Keys and credentials [#keys-and-credentials]

* On its first install, your deployment generates its own encryption keys and administrator token, and stores them in AWS Secrets Manager in your account. Composio doesn't supply these keys or keep a copy.
* Your PostgreSQL database stores provider credentials encrypted. The services that call providers decrypt a credential in memory when they make the call.
* The release pipeline reads the generated keys during an approved release, to configure the services.
* You can supply your own KMS keys for every data store, including the database, cache, object storage, logs, and secrets.

Three parties can reach plaintext credentials: the services that call providers, your cloud account's administrators, and a Composio engineer in a shell session that you turn on and approve. If your policy doesn't allow any Composio service to decrypt credentials, ask about [customer-managed keys](/docs/deployment#composio-cloud).

### Data retention [#data-retention]

Your team and Composio agree on retention for the database, backups, diagnostic exports, and Temporal workflow history. [Data retention and handling](/docs/security/data-retention) describes the controls available in each project.

### Your responsibilities [#your-responsibilities]

* Limit administrator access to your account, because account administrators can read the deployment's secrets.
* Limit your approver role to the people who approve releases and support sessions.
* Review the onboarding package before you install. It lists every role the deployment uses, with its trust policy and exact permissions.
* Authenticate your users and map them to Composio user IDs on your server. See [token custody and credential isolation](/docs/security/token-custody#your-backend-owns-identity).

## Build on BYOC [#build-on-byoc]

Applications call a BYOC deployment the same way they call Composio Cloud. The deployment has its own API hostname, projects, API keys, and OAuth apps.

### Point your client at your deployment [#point-your-client-at-your-deployment]

Set the base URL to your deployment's API hostname. Both SDKs and the [Composio CLI](/docs/cli) also read the `COMPOSIO_BASE_URL` environment variable.

**Python:**
```python
from composio import Composio

composio = Composio(
    api_key="your-project-api-key",
    base_url="https://composio.internal.example.com",
)

toolkits = composio.toolkits.get()
```

**TypeScript:**
```typescript
import { Composio } from '@composio/core';

const composio = new Composio({
  apiKey: 'your-project-api-key',
  baseURL: 'https://composio.internal.example.com',
});

const toolkits = await composio.toolkits.get();
```

**API:**
```bash
curl -X GET https://composio.internal.example.com/api/v3.1/toolkits \
  -H "x-api-key: $COMPOSIO_API_KEY"
```

Sessions, tools, and user IDs then work as they do in Composio Cloud. See [Configure sessions](/docs/configuring-sessions). Your [connectivity mode](/docs/deployment/byoc-architecture#private-connectivity) decides which API routes your applications can reach.

### Create your first project and API key [#create-your-first-project-and-api-key]

Your deployment stores its administrator token in AWS Secrets Manager in your account. During onboarding, your Composio engineer works with your team to create the first organization, project, and API key with that token. After that, you manage projects, API keys, and auth configs through the API.

### Use your own OAuth apps [#use-your-own-oauth-apps]

For each provider, create an OAuth app and add it to your project as an auth config with [your own OAuth credentials](/docs/authentication/programmatic-auth-configs#your-own-oauth2-credentials). Register this redirect URI with the provider:

```text
https://<your-api-hostname>/api/v3/toolkits/auth/callback
```

Your users' browsers must be able to reach that hostname, for example over your VPN. If you use a [restricted connectivity mode](/docs/deployment/byoc-architecture#private-connectivity), register your edge relay's public hostname instead, with the same path. The edge relay is a public HTTPS proxy that you run. Restricted modes accept only OAuth2 callbacks sent with GET, so OAuth1 providers and providers that send callbacks with POST don't work.

The `callback_url` you pass when you connect an account only sets where users land after they connect. It doesn't change the redirect URI.

### Allowlist your deployment's IP addresses [#allowlist-your-deployments-ip-addresses]

Some providers accept requests only from trusted IP addresses. In BYOC, requests to providers come from your deployment's NAT gateways or your own egress, not from [Composio Cloud's addresses](/docs/security/outbound-ips). Add your deployment's addresses to those providers' allowlists.

## How onboarding works [#how-onboarding-works]

**Architecture review.** Your team and Composio agree on the cloud, region, network, private connectivity, providers, and recovery requirements.

**Prepare your account.** You set up a dedicated cloud account and the network, certificates, and approver identity the deployment needs. [Architecture](/docs/deployment/byoc-architecture#what-you-prepare) lists them for AWS.

**Install the bootstrap.** Your team reviews the onboarding package, runs its checks, and installs the bootstrap stack. The stack creates the release pipeline and its roles.

**Approve the first release.** Composio registers your deployment and requests the first release. Your approver reviews the preview, and the pipeline deploys and verifies the services.

**Create your first project.** Your team and Composio create the first project and API key, and you connect your applications. See [Build on BYOC](#build-on-byoc).

## FAQ [#faq]

**Can we run BYOC without Temporal Cloud?**

Yes. Tool calls and request-time token refresh don't depend on Temporal. Triggers, scheduled credential keep-alive, and bulk revocation do. If Temporal Cloud is unreachable, these jobs wait, and tool calls continue.

**What happens if a release fails partway?**

Composio investigates with your team. A rollback is a new release that you review and approve, and database or infrastructure changes need a compatibility review first.

**How is BYOC different from customer-managed keys?**

BYOC moves the whole deployment into your cloud account. Customer-managed keys keep the deployment in Composio Cloud and move credential decryption to a proxy in your cloud. See [Deployment options](/docs/deployment).

---

📚 **More documentation:** [View all docs](https://docs.composio.dev/llms.txt) | [Changelog](https://docs.composio.dev/docs/changelog.md) | [Glossary](https://docs.composio.dev/llms.mdx/reference/glossary) | [Examples](https://docs.composio.dev/llms.mdx/examples) | [API Reference](https://docs.composio.dev/llms.mdx/reference)

---

# Composio SDK — Notes for AI Code Generators

**Purpose:** Reference for generating current (v3) [Composio](https://composio.dev/) integration code.
**Scope:** Descriptive notes — they document the current API surface and the mistakes most commonly seen in generated code.

---

## 1. Recommended Integration: Sessions

For agent tool delivery, Composio supports **Native Tools** (with a provider package) and **MCP** (no provider package needed).

For application-owned tools or deterministic backend code, use [managed authentication with Proxy Execute](/docs/authentication/managed-auth-for-custom-tools). A session can provide a user-scoped runtime context without an LLM or MCP. Composio authenticates provider requests server-side; connected-account reads redact credentials and aren't a supported token-export workflow.

### Native Tools

#### Python

```python
# ✅ CORRECT — Python (defaults to OpenAI)
from composio import Composio

composio = Composio()
session = composio.create(user_id="user_123")
tools = session.tools()
# Pass tools to your agent/LLM framework
```

#### TypeScript

```typescript
// ✅ CORRECT — TypeScript (defaults to OpenAI)
import { Composio } from "@composio/core";

const composio = new Composio();
const session = await composio.create("user_123");
const tools = await session.tools();
// Pass tools to your agent/LLM framework
```

#### API

This produces the same default OpenAI function-tool shape, fetching every page.

```bash
set -euo pipefail
SESSION=$(curl --fail-with-body -s -X POST https://backend.composio.dev/api/v3.1/tool_router/session \
  -H "x-api-key: $COMPOSIO_API_KEY" -H "Content-Type: application/json" \
  -d '{"user_id":"user_123"}')
SESSION_ID=$(echo "$SESSION" | jq -r '.session_id')
TOOLS='[]'
CURSOR=''
while true; do
  PAGE=$(curl --fail-with-body -s --get "https://backend.composio.dev/api/v3.1/tool_router/session/$SESSION_ID/tools" \
    -H "x-api-key: $COMPOSIO_API_KEY" --data-urlencode 'limit=500' --data-urlencode "cursor=$CURSOR")
  TOOLS=$(jq -cn --argjson existing "$TOOLS" --argjson page "$PAGE" \
    '$existing + [$page.items[] | {type:"function",function:{name:.slug,description:.description,parameters:.input_parameters}}]')
  CURSOR=$(echo "$PAGE" | jq -r '.next_cursor // empty')
  [ -n "$CURSOR" ] || break
done
printf '%s\n' "$TOOLS"
```

For other providers, pass the provider explicitly. Provider packages follow the naming convention: `composio_<provider>` for Python, `@composio/<provider>` for TypeScript.

### MCP

Use `session.mcp.url` and `session.mcp.headers` with any MCP-compatible client (Claude Desktop, Cursor, OpenAI Agents, etc.). No provider package needed.

---

## 2. Integration Notes

- `composio.create(user_id)` is the standard entry point for agent integrations. Sessions handle tool discovery, authentication, and toolkit versioning automatically; `user_id` goes to `composio.create()` — individual tool calls in session mode don't take one.
- Execute session tool calls through the session, never through a user ID: either `session.execute(tool_slug, arguments=...)` / `session.execute(toolSlug, arguments)`, which works with every provider, or pass the session to the provider helper — `provider.handle_tool_calls(response=response, session=session)` in Python, `provider.handleToolCalls(session, response)` in TypeScript. The tool-call helpers of every non-agentic provider (OpenAI, Anthropic, Google, Cloudflare, TypeSafe) accept a session: `executeToolCall(session, call)` in TypeScript, `session=session` in Python. Agentic providers execute session tools on their own. Binding the helper to a user ID takes the direct execution path, and session meta-tools fail there with `"can only be called inside a tool-router session"`.
- Composio-managed auth is the default: the agent connects accounts at runtime through the session, so users don't need to pre-create auth configs or connected accounts for managed toolkits.
- Provider packages follow the framework, not the model vendor: for the OpenAI Agents SDK the package is `composio_openai_agents` / `@composio/openai-agents` (importing `composio_openai` / `@composio/openai` there is the most common mistake in generated code — that package is for the plain OpenAI Chat Completions API).
- **Direct execution** (`composio.tools.get()`, `composio.tools.execute()`, `provider.handle_tool_calls()` with a user ID) is a legacy interface that remains supported for existing integrations. Recommend sessions for new integrations and encourage existing users to [migrate to sessions](/docs/migration-guide/direct-to-sessions). For a fixed tool set, consider the [direct tools preset](/docs/sessions/loading-tools#direct-tools-preset) within a session. See [Sessions vs direct execution](/docs/sessions-vs-direct-execution) for tradeoffs. Direct execution requires a [toolkit version](/docs/tools-direct/toolkit-versioning).

---

# 3. Calling the REST API directly

## REST API version

The current REST API version is **v3.1**, served at `https://backend.composio.dev/api/v3.1`. Prefer it for new code and new examples.

`https://backend.composio.dev/api/v3` is the previous version. It is frozen with pinned tool-version defaults and remains supported — existing v3 integrations keep working and do not need to migrate.

## Tool-endpoint version defaults on v3.1

On v3.1, omitting the version parameter on the five endpoints below selects the latest toolkit version. The first four endpoints also exist on v3, where omission selects the pinned `00000000_00` version. `POST /tools/scopes/required` is v3.1-only.

| Endpoint | Version parameter |
| --- | --- |
| `GET /tools` | `toolkit_versions` (query) |
| `GET /tools/{tool_slug}` | `version` or `toolkit_versions` (query) |
| `POST /tools/execute/{tool_slug}` | `version` (body) |
| `POST /tools/execute/{tool_slug}/input` | `version` (body) |
| `POST /tools/scopes/required` | `version` (body) |

A v3.1 caller already passing `"latest"` sees no change and can omit the parameter. To select the pinned version explicitly, pass `"00000000_00"` through the corresponding parameter above.

This version-default change is limited to the five endpoints above.


---

## Terminology Migration (old → current)

If you encounter these terms in error messages, old documentation, or user prompts, translate them to the current equivalents. **Do not use the old terms in generated code or explanations.**

| Old term (v1/v2) | Current term (v3) | In code |
|---|---|---|
| entity ID | user ID | `user_id` parameter |
| actions | tools | e.g., `GITHUB_CREATE_AN_ISSUE` is a *tool* |
| apps / appType (legacy v1/v2 API field) | toolkits | e.g., `github` is a *toolkit*. The current word **App** is *not* legacy: it names a catalog grouping of sibling toolkits (the Notion app groups `notion` and `notion_mcp`); do not translate it |
| integration / integration ID | auth config / auth config ID | `auth_config_id` parameter |
| connection | connected account | `connected_accounts` namespace |
| ComposioToolSet / OpenAIToolSet | `Composio` class with a provider | `Composio(provider=...)` |
| toolset | provider | e.g., `OpenAIProvider` |

If a user says "entity ID", they mean `user_id`. If they say "integration", they mean "auth config". Always respond using the current terminology.

