feat(ai): Enforce agent governance policy, step budgets, and dry runs#191
Open
nfebe wants to merge 1 commit into
Open
feat(ai): Enforce agent governance policy, step budgets, and dry runs#191nfebe wants to merge 1 commit into
nfebe wants to merge 1 commit into
Conversation
An agent's frontmatter can now declare governance the runtime enforces deterministically, before any tool runs: auto-approved tools execute without pausing, require-approval tools always pause even when read only, and denied tools are never advertised to the model at all. The default is unchanged: a state-changing tool pauses for per-call approval. The policy is re-read from the file each turn, so the file stays the source of truth mid-run. Agents can also raise their per-turn tool budget within a hard ceiling, and a run can be started as a dry run: every state change is declined and reported instead of executed, with nothing pausing.
Code Review SummaryThis PR introduces a well-designed governance system for AI agents, allowing fine-grained control over tool execution, budgets, and safety through dry runs. 🚀 Key Improvements
💡 Minor Suggestions
|
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.
Slice one of docs/AGENTS.md, and the code behind the positioning shipped in flatrun/website#12: governance is now deterministic runtime enforcement, not copy. Frontmatter policy declares what runs freely (auto_approve), what always asks (require_approval, even read-only), and what the model never sees (deny); precedence is deny, require_approval, auto_approve, and the unchanged default is that state changes pause for per-call approval. Policy is re-read from the file each turn, so the file stays the source of truth mid-run.
Agents can raise their per-turn tool budget within a hard ceiling, and a run can start as a dry run: state changes are declined and reported instead of executed.