Skip to content

Add agent-cost-guardrails - #48

Open
sapph1re wants to merge 3 commits into
PierrunoYT:masterfrom
sapph1re:add-agent-cost-guardrails
Open

Add agent-cost-guardrails#48
sapph1re wants to merge 3 commits into
PierrunoYT:masterfrom
sapph1re:add-agent-cost-guardrails

Conversation

@sapph1re

@sapph1re sapph1re commented Jul 30, 2026

Copy link
Copy Markdown

Adds agent-cost-guardrails — framework-native budget limits and circuit breakers for CrewAI, AutoGen, and LangGraph agents. Enforces per-run token caps and cost thresholds without manual monitoring. Alphabetically placed between agentbox and agent-deck.

Summary by CodeRabbit

  • Documentation
    • Added the agent-cost-guardrails tool entry.
    • Documented Python budget tracking and circuit-breaker support for CrewAI, AutoGen/AG2, and LangGraph.
    • Clarified pre-call token estimation and post-response token-cost recording.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 381d5ebc-0b87-4c52-a822-8578f83b87a1

📥 Commits

Reviewing files that changed from the base of the PR and between 079eac5 and bf3beb6.

📒 Files selected for processing (1)
  • README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • README.md

📝 Walkthrough

Walkthrough

The README adds an agent-cost-guardrails entry. The entry describes framework adapters, pre-call token checks, and post-response cost recording.

Changes

Tool listing

Layer / File(s) Summary
Update agent-cost-guardrails entry
README.md
Describes CrewAI, AutoGen/AG2, and LangGraph adapters, pre-call token estimation, and post-response token-cost recording.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the added agent-cost-guardrails entry.
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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Line 57: Update the agent-cost-guardrails README description to replace
“per-run token caps” with wording that accurately states support for per-call
token limits and rate limits; do not claim cumulative per-run token limits
unless the implementation and documentation support them.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a3cc5fef-8d30-4a46-933e-0ffcadd04b9b

📥 Commits

Reviewing files that changed from the base of the PR and between 528ee6f and 05afb60.

📒 Files selected for processing (1)
  • README.md

Comment thread README.md Outdated

@PierrunoYT PierrunoYT left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the submission. The library qualifies, but “framework-native” overstates the relationship: these are third-party adapters. The cumulative budget is also process-local middleware, not a provider-side spending cap, and pre-call enforcement depends on token estimates.

Suggested replacement:

agent-cost-guardrails - Python budget tracking and circuit-breaker middleware with adapters for CrewAI, AutoGen/AG2, and LangGraph; checks estimated tokens before calls and records actual token cost after responses.

@sapph1re

sapph1re commented Aug 4, 2026

Copy link
Copy Markdown
Author

Thanks for the detailed feedback! Updated the description to use your suggested wording:

Python budget tracking and circuit-breaker middleware with adapters for CrewAI, AutoGen/AG2, and LangGraph; checks estimated tokens before calls and records actual token cost after responses.

Committed in bf3beb6.

@sapph1re

Copy link
Copy Markdown
Author

Just a gentle ping — the description has been updated in bf3beb6 to use your suggested wording. Happy to make any further adjustments if needed!

@sapph1re

Copy link
Copy Markdown
Author

Friendly bump — the description was updated in bf3beb6 on 2026-08-04 to match your suggested wording exactly. CodeRabbit's latest pass shows no actionable comments. Let me know if there's anything else needed!

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.

2 participants