Skip to content

docs: add attribute-based controls example - #43

Open
jasmine-ab-tea wants to merge 5 commits into
mainfrom
docs/country-controls-example
Open

jasmine-ab-tea wants to merge 5 commits into
mainfrom
docs/country-controls-example

Conversation

@jasmine-ab-tea

@jasmine-ab-tea jasmine-ab-tea commented Nov 5, 2026 •

Copy link
Copy Markdown

Ticket: SAO-17024

Summary

This PR adds the docs page for the attribute-based controls example in agentcontrol/agent-control#302. The page teaches a general pattern, a rule that applies only for some values of a request attribute, with the country (jurisdiction) as the worked example.

  • New page examples/attribute-based-controls.mdx. It covers:
    • Sending the jurisdiction in step.context (recommended): Python SDK and raw POST /api/v1/evaluation.
    • Sending the jurisdiction as a @control() argument, for tool steps only.
    • Authoring the policy as one control per value (here, per country) or as one composite control, with a comparison table.
    • Copying an x-ai-jurisdiction request header into step.context.jurisdiction.
    • Baseline controls (every country) next to attribute-based controls.
    • The missing-jurisdiction behavior, with a strict-default control.
  • A card in examples/overview.mdx under "Use case examples".
  • A nav entry in both "Use case examples" groups in docs.json.
  • sdk/python-sdk.mdx: document the step_type and tools parameters of @control(). The new page uses step_type.

Test plan

  • docs.json parses as valid JSON.
  • The raw HTTP evaluation body on the page returns is_safe: false against a local server with the example controls.
  • markdownlint, Vale, link checks and the Mintlify check: run in CI. They were not run locally (npm registry auth and no local Vale).

The source link points at examples/attribute_controls on main. It resolves after agentcontrol/agent-control#302 merges, so merge that PR first.

Related PRs

Repo PR Purpose Status
agentcontrol/agent-control #302 Example scripts and README in review
agentcontrol/docs-agent-control this PR Docs page examples/attribute-based-controls in review
agentcontrol/agent-control #303 Fix red ci on main (galileo-core 4.6 HttpSpan mypy error), needed for this PR's ci in review

🤖 Generated with Claude Code

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

mintlify Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
agentcontrol 🟢 Ready View Preview Nov 5, 2026, 10:39 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Card links check

✅ No broken Card links found. Checked external links in 0.6s

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

✅ Markdown Lint Passed

All markdown files meet the linting standards! 🎉

- Warn that the decorator path needs step_types ["tool"] and the
  input.jurisdiction selector.
- Show the strict default as a full control, and say it must stay in
  sync with the country controls.
- Document step_type and tools in the @control() SDK reference.
- Describe the PASS/FAIL output of the example scripts.

Co-Authored-By: Claude <noreply@anthropic.com>
- New section on baseline vs country controls, with a baseline control.
- Explain copying an x-ai-jurisdiction header into step.context.
- Add the baseline scenarios to the scenario table.

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove the list indent inside <Warning> (MD007).
- State that evaluation stops after the first deny match.
- Narrow the header sentence: headers are not mapped into the step.
- Add the no-jurisdiction + IBAN scenario.

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

@jasmine-ab-tea jasmine-ab-tea left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

🤖 This review was generated by the Astra agent (claude-opus-5-5). It may contain mistakes.

Verdict: approve — Commit f5dc283 fixes all round-2 items. They match agent-control PR #302 head f7e4d1b, and every CI check passes.

Addressed before this review

  • An over-indented list inside the decorator-path <Warning> failed Markdown Lint Check (MD007 at examples/country-controls.mdx:94-95). Fixed in f5dc283. Markdown Lint Check now passes.

Co-Authored-By: Claude <noreply@anthropic.com>
@jasmine-ab-tea jasmine-ab-tea changed the title docs: add country-specific controls example docs: add attribute-based controls example Nov 5, 2026

This branch was successfully deployed

1 active deployment
staging — 6452d7f6 Deployed Nov 5, 2026 by mintlify[bot]
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