@devries-cameron20 / composio Mirror · read-only
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 06:00 UTC

next
md 65 lines 3.54 KB
Rendered Raw
1 ## Replace example user IDs with stable application user IDs
2
3 Create sessions and connected accounts with a stable identifier from the
4 application database, such as a UUID or primary key. Do not use an email
5 address that can change, and never use `default` in production. Composio uses
6 the user ID to isolate connections and tool calls, so each application user
7 must resolve to the same Composio user ID across sessions.
8
9 - [Authentication and user IDs](https://docs.composio.dev/docs/authentication)
10 - [How Composio sessions work](https://docs.composio.dev/docs/how-composio-works)
11
12 ## Isolate environments with separate Composio projects when needed
13
14 A Composio project scopes its API keys, connected accounts, auth configs, and
15 webhooks. Use separate projects for development, staging, and production when
16 those resources must not overlap. Use the API key for the intended project in
17 each deployment, and create environment-specific auth configs when the OAuth
18 apps, scopes, or provider credentials differ.
19
20 - [Composio glossary: Project](https://docs.composio.dev/reference/glossary#project)
21 - [Configure authentication](https://docs.composio.dev/docs/tools-direct/authenticating-tools)
22
23 ## Use managed auth in production, and your own OAuth app when you need dedicated limits
24
25 Composio-managed OAuth apps work in production. Because the OAuth app is shared,
26 you may run into shared provider rate limits as your usage grows. For higher
27 volume, we recommend a custom auth config with your own OAuth app. It also gives
28 you your application's OAuth brand, custom scopes, a dedicated provider quota,
29 different polling requirements, and custom instances.
30 Both options keep connected-account credential storage and refresh in Composio.
31 Pass the resulting auth config ID to the session; creating the config alone
32 does not make the session use it.
33
34 - [Managed vs custom auth](https://docs.composio.dev/docs/authentication/custom-app-vs-managed-app)
35 - [Controlling OAuth scopes](https://docs.composio.dev/docs/authentication/controlling-scopes)
36
37 ## Restrict the production session to the capabilities the agent needs
38
39 Set toolkit, tool, and behavior-tag filters when creating the session. For a
40 sensitive or deterministic workflow, prefer an explicit allowlist of exact
41 tool slugs. For a broader read-only agent, filter on `readOnlyHint` and disable
42 `destructiveHint`, then inspect the resulting tool set before rollout.
43
44 - [Configure session tool access](https://docs.composio.dev/docs/configuring-sessions)
45 - [Create read-only and restricted sessions](../session-tool-policies/public.md)
46
47 ## Reuse a stored session until the user or configuration changes
48
49 Store the session ID and restore it with `composio.use(session_id)` instead of
50 creating a new session for every turn. Create a new session for a different
51 user or a materially different setup, such as a new tool policy or auth-config
52 mapping. A session preserves its scoped runtime state, but it is not the
53 language model's conversation memory.
54
55 - [Reuse a session](https://docs.composio.dev/docs/how-composio-works#how-sessions-behave)
56
57 ## Test production trigger handling through the real webhook path
58
59 The local `subscribe()` stream is useful for inspecting events, but it bypasses
60 the production webhook handler and signature verification. Before rollout,
61 forward events to the real local handler or use a tunnel, verify the signed
62 payload with `parse()`, and then register the production HTTPS webhook URL for
63 the production project.
64
65 - [Receive trigger events locally and in production](https://docs.composio.dev/docs/setting-up-triggers/subscribing-to-events)