Skip to content

Protect-an-agent setup, workspace as code, rule tests, OpenAI Agents + TypeScript SDKs - #75

Merged
architsharm merged 1 commit into
mainfrom
claude/tier3-ease-of-use
Oct 8, 2026
Merged

architsharm merged 1 commit into
mainfrom
claude/tier3-ease-of-use

Conversation

@architsharm

Copy link
Copy Markdown
Owner

Stacked on #74. Merge #74 first, then retarget this PR to main (gh pr edit <this> --base main) before merging, or it lands in #74's branch instead of main.

What changes for a customer

  • Protect an agent (Agents → an agent → Protect): protections with Low/Medium/High sensitivity, blocked words, topics to avoid / only-answer-about, the message users see, a replay of that agent's last 7 days, then a live test. Shows what already applies to every agent; an agent can be made stricter, never weaker.
  • Workspace as code (Policies → Code, or agentfox policy export / agentfox policy apply): one YAML file with every policy, custom rule and detector switch. Apply shows the plan first, never deletes, and simulates anything moving to enforce (needs the production role).
  • Rule tests (rule → Tests): save messages a rule must catch or must leave alone; the Tune preview re-checks them before Apply ("No longer catches …").
  • Integrations: OpenAI Agents SDK adapter (agentfox.frameworks.openai_agents: input, output and tool guardrails) and a TypeScript SDK (sdk/typescript, not yet published to npm).

Design

ADR docs/adr/0003-agent-layers-workspace-file-rule-tests.md. Agent setup is an agent-level policy layer; generated packs publish through one helper (platform/policy/publish.py); the workspace file and rule tests reuse versions, simulation and eval cases rather than new stores. protection.save and workspace.apply are audited privileged operations.

Tests

Full backend suite 3448 passed / 3 skipped; ruff, format, import-linter clean; dashboard typecheck + 67 vitest; TS SDK tests pass. Each flow was clicked through in the browser on a seeded demo.

Notes

  • uv.lock refreshed for the new openai-agents extra (not in all).
  • No migrations: agent layers are policies; rule tests are eval cases.

🤖 Generated with Claude Code

…+ TypeScript SDKs

- Protect an agent: guided setup (protections and sensitivity, words and
  topics, blocked message, 7-day replay, live test). Stored as an agent-level
  policy layer `agent.<slug>` composed `extend`, so an agent can be stricter
  than the workspace but never weaker.
- Workspace as code: export every bound policy, custom rule and detector
  switch as one YAML file; plan and apply it from Policies -> Code or
  `agentfox policy export/apply`. Never deletes; enforcing still needs a
  recorded simulation and the production role.
- Rule tests: save messages a rule must or must not catch; every proposed
  change on the Tune tab re-checks them before Apply.
- publish_in_current_mode: one helper for generated packs (custom, agent
  layers, workspace apply).
- OpenAI Agents SDK adapter (input/output/tool guardrails) and a
  dependency-free TypeScript SDK (sdk/typescript).
- ADR 0003; uv.lock refreshed for the openai-agents extra; wheels rebuilt.

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

vercel Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
guardrails-api Ready Ready Preview Oct 8, 2026 6:35pm UTC
guardrails-dashboard Ready Ready Preview Oct 8, 2026 6:35pm UTC
guardrails-redteam-lang Ready Ready Preview Oct 8, 2026 6:35pm UTC

@architsharm
architsharm changed the base branch from claude/agent-fox-ux-redesign-b53bd5 to main October 8, 2026 23:41
@architsharm
architsharm merged commit b2500e4 into main Oct 8, 2026
10 checks passed

This branch was successfully deployed

3 active deployments
Preview – guardrails-redteam-lang — b2184d25 Deployed Oct 8, 2026 by vercel[bot]
Preview – guardrails-api — b2184d25 Deployed Oct 8, 2026 by vercel[bot]
Preview – guardrails-dashboard — b2184d25 Deployed Oct 8, 2026 by vercel[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