Repository navigation
feat(budgets): the assistant and agents answer where budgets stand - #645
Merged
Merged
Conversation
A read-only budgets tool, in the assistant (its own Costs and budgets group) and over MCP: what each namespace the person can read spent this period against its budget, with what's left and ok, near or over; for admins also all of Lens against the overall budget and every other budget. Built on the meter and status the Costs page uses (budgets.overview), with a one-line summary for the assistant's step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C8MJetfTHJzsWLEWwsh4kj
4 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Adeel · project thread
Description
Before: "where do my budgets stand?" had no answer in chat or over MCP. Budgets showed only in the top-bar meter and on the Costs page.
After: a read-only
budgetstool, both in the assistant (its own "Costs and budgets" group) and over MCP. It lists each namespace the person can read with what it spent this period against its budget, what's left, and whether it's ok, near or over. Admins also see all of Lens against the overall budget, plus every other budget. The assistant's step reads like "Read budgets: all of Lens: $2.30 of $5 this month (ok); near or over: Digest".How:
budgets.overviewbuilds on the same meter and status the Costs page uses.budgets.saidwrites the one-line summary.Motivation and Context
Feature list Planned: "The assistant answers where budgets stand".
Types of changes
Checklist:
test_budgets.py::test_agents_ask_where_budgets_stand(assistant tool and MCP; a namespace member sees only their namespaces; an admin sees all of Lens).changelog.d/budgets-tool.md.Done questions (AGENTS.md)
budgets, assistantbudgets).budgets.meterandbudgets.status.Local checks:
pytest tests/api/test_budgets.py tests/api/test_mcp.py tests/api/test_chat_tools.py(35 passed), ruff, mypy,ci/check_requirements.py.Generated by Claude Code