Skip to content

Add Guardrails tab to Agent Detail (UI for max_turns_task / max_turns_chat) #967

Closed

Description

@dolho

Summary

GUARD-001 ships a backend endpoint (GET/PUT /api/agents/{name}/guardrails) for per-agent guardrails — currently max_turns_chat and max_turns_task (range 1–500, defaults 50). There is no UI for it: a grep of src/frontend/src/ for guardrails or max_turns returns zero hits, so owners can only set the value via curl, the FastAPI /docs page, or the MCP API.

This blocks operators who want to raise max_turns_task for long-running cron jobs (the most common need) from doing so without opening a terminal.

Acceptance Criteria

  • New "Guardrails" tab on AgentDetail.vue (owner-only — hide for non-owners)
  • Form bound to GET/PUT /api/agents/{name}/guardrails
  • Inputs: max_turns_chat, max_turns_task (number, 1–500). Show platform defaults as placeholder when unset.
  • Save triggers a toast indicating "container restart required" — match the same pattern used by Read-Only / Resource limit toggles
  • Light + dark themes
  • No regression to the panel-width-stability fix from Agent Detail: Chat tab content width jumps when switching to/from any other tab #954

Technical Notes

  • Backend endpoint: src/backend/routers/agent_config.py:611 (GET) / :627 (PUT)
  • Whitelisted keys + ranges: src/backend/routers/agent_config.py:554-557
  • Sibling tab pattern: copy structure of e.g. the Folders or Permissions tab in AgentDetail.vue:73 and the per-tab content blocks below it
  • Reuse p-6 wrapper so the tab participates in the panel-width stability set
  • Pinia: add a guardrails slice to stores/agents.js (or a new stores/guardrails.js — same domain-per-store rule as the rest)

Out of scope

  • Adding new guardrail keys (separate work — only wire the existing two)
  • A platform-default-guardrails admin screen (system_settings-level fallback)

Activity

  1. added
    priority-p3
    type-feature
    on May 28, 2026
  2. added
    complexity-medium
    status-incubating
    on Jun 12, 2026
  3. vybe commented on Jun 15, 2026

    @vybe
    Contributor

    Grooming triage: verified shipped — GuardrailsPanel.vue exists and is wired into AgentDetail.vue:186 as Settings section #1 (GUARD-001 UI, #967). Closing as done.

  4. removed
    status-incubating
    on Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity-mediumpriority-p3theme-ui-uxtype-feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions