Skip to content

docs: add Pramagent tool policy hook example#6496

Open
sriram7737 wants to merge 1 commit into
crewAIInc:mainfrom
sriram7737:sriram7737/docs/pramagent-tool-policy
Open

docs: add Pramagent tool policy hook example#6496
sriram7737 wants to merge 1 commit into
crewAIInc:mainfrom
sriram7737:sriram7737/docs/pramagent-tool-policy

Conversation

@sriram7737

@sriram7737 sriram7737 commented Jul 9, 2026

Copy link
Copy Markdown

Adds a Pramagent example to the Tool Call Hooks guide.

Why:

  • demonstrates how to call an external policy layer from a before_tool_call hook
  • shows deterministic tool authorization before CrewAI executes a side-effecting tool
  • keeps the example optional and limited to docs, with no runtime dependency added to CrewAI

Validation:

  • git diff --check

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 77c921ec-6c0c-45a7-8786-b068bc3c7e45

📥 Commits

Reviewing files that changed from the base of the PR and between 289686a and 3bc41fd.

📒 Files selected for processing (1)
  • docs/edge/en/learn/tool-hooks.mdx

📝 Walkthrough

Walkthrough

This PR updates the tool-hooks documentation by inserting a new "External Policy Layer with Pramagent" subsection under Common Use Cases, demonstrating a before_tool_call hook that validates and can block tool calls. Subsequent subsections are renumbered accordingly; no code or exported entities are affected.

Changes

Tool Hooks Documentation Update

Layer / File(s) Summary
New Pramagent policy example
docs/edge/en/learn/tool-hooks.mdx
Adds item 3, "External Policy Layer with Pramagent," showing a before_tool_call hook that validates tool name/arguments via Pramagent and blocks execution by returning False when the verdict is not allow.
Renumbered subsequent subsections
docs/edge/en/learn/tool-hooks.mdx
Renumbers Result Sanitization, Tool Usage Analytics, Rate Limiting, Caching Tool Results, and Debug Logging from items 4-8 to 5-9, keeping their existing example code unchanged.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding a Pramagent tool policy hook example to docs.
Description check ✅ Passed The description matches the changeset and explains the Pramagent hook example and its documentation-only scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sriram7737 sriram7737 marked this pull request as ready for review July 9, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant