@devries-cameron20 / composio Mirror · read-only / commits / 5aea2adb7
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, 08:30 UTC

docs: explain the two ways to require approval

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Mukund committed Oct 15, 2026 at 18:03 UTC 5aea2adb7da7497978fc4b23986b1c06ee6e786d
1 file changed +9 -4
docs/content/docs/approval-mode.mdx
+9 -4
@@ -14,7 +14,12 @@ Approval mode is experimental. It needs `composio` newer than 0.27.0 or `@compos
14
15 ## Requiring approval
16
17 -Require approval for every tool with a [tag](/docs/tool-tags):
17 +You configure which tools require approval when you create or update a session. There are two ways to choose them:
18 +
19 +- **By tag.** Every tool has a [tag](/docs/tool-tags) for the type of action it takes, such as `createHint` for tools that create something or `destructiveHint` for tools that delete something. Add tags to `tags.require_approval` to require approval for every tool with those tags, in every toolkit.
20 +- **Per toolkit.** Set approval for one toolkit's tools under `tools.<toolkit>`. This overrides the session-wide `tags` for that toolkit, so you can treat it differently from the rest of the session.
21 +
22 +This session requires approval for every tool that creates, updates or deletes something:
23
24 <Tabs groupId="language" items={['Python', 'TypeScript']} persist>
25 <Tab value="Python">
@@ -38,7 +43,7 @@ const session = await composio.create('user_123', {
43 </Tab>
44 </Tabs>
45
41 -Or set it per toolkit, which overrides `tags` for that toolkit:
46 +This session limits Gmail to two tools, and requires approval before sending an email. List the tools the agent can use in `enable` and the ones that need approval in `require_approval`. Always set `require_approval` when you list tools, even to `[]`. Otherwise the session-wide `tags.require_approval` still applies to them:
47
48 <Tabs groupId="language" items={['Python', 'TypeScript']} persist>
49 <Tab value="Python">
@@ -48,7 +53,7 @@ session = composio.create(
53 tools={
54 "gmail": {
55 "enable": ["GMAIL_FETCH_EMAILS", "GMAIL_SEND_EMAIL"],
51 - "require_approval": ["GMAIL_SEND_EMAIL"], # set even if empty
56 + "require_approval": ["GMAIL_SEND_EMAIL"],
57 },
58 },
59 )
@@ -64,7 +69,7 @@ const session = await composio.create('user_123', {
69 tools: {
70 gmail: {
71 enable: ['GMAIL_FETCH_EMAILS', 'GMAIL_SEND_EMAIL'],
67 - requireApproval: ['GMAIL_SEND_EMAIL'], // set even if empty
72 + requireApproval: ['GMAIL_SEND_EMAIL'],
73 },
74 },
75 });