@devries-cameron20 / composio Mirror · read-only / commits / e8b22d64c
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(firewall): move before/after guidance below the examples

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

Mukund committed Oct 22, 2026 at 14:54 UTC e8b22d64c13db623f08b5503dbefa3f84d785540
1 file changed +2 -2
docs/content/docs/firewall.mdx
+2 -2
@@ -25,8 +25,6 @@ You can build custom prompt checks with **hooks**. A hook is attached to a sessi
25
26 To write a custom prompt check, use the `condition_check` hook. It lets you block a tool call or its result if it matches a condition you write in natural language.
27
28 -Use a `before_execute` hook to block something your agent is about to do, like emailing internal pricing to a customer. Use an `after_execute` hook to block something a tool returns before your agent reads it, like an email that contains a password or API key. Note that an `after_execute` hook can't undo the tool call, since the tool has already run.
29 -
28 Here's a `before_execute` hook that stops your agent from sharing internal pricing with customers:
29
30 <Tabs groupId="language" items={['Python', 'TypeScript']} persist>
@@ -174,6 +172,8 @@ const session = await composio.create('user_123', {
172
173 When Gmail returns an email with a password in it, your agent doesn't receive the email.
174
175 +Use a `before_execute` hook to block something your agent is about to do, like emailing internal pricing to a customer. Use an `after_execute` hook to block something a tool returns before your agent reads it, like an email that contains a password or API key. Note that an `after_execute` hook can't undo the tool call, since the tool has already run.
176 +
177 ### Writing a condition
178
179 It's important to write a condition as a description of the tool call or result you want blocked, not as an instruction for your agent to follow. A hook blocks a tool call or result when it matches the condition, and an instruction like "Don't share internal pricing with anyone outside acme.com" doesn't describe anything to match. Here are some good and bad ways to write a condition: