Repository navigation
Open
Labels
area:chat-uxChat UI/agent runtime behavior visible to usersChat UI/agent runtime behavior visible to userseffort:SSmall: single file/component, hours not daysSmall: single file/component, hours not dayspolishAdmin/UI surfacing or refinement of existing capability, not new functionalityAdmin/UI surfacing or refinement of existing capability, not new functionalitypriority:P3Deferred/speculative — explicitly not scheduled yetDeferred/speculative — explicitly not scheduled yettype:improvementMakes an existing capability better/safer/more completeMakes an existing capability better/safer/more complete
Description
Context
docs/CONFIG_AUDIT_2026-09-04.md found that backend/app/agents/chat_agent.py:16 hardcodes MAX_TOOL_CALL_ROUNDS = 5 — capping how many tool-call round-trips (e.g. repeated search_knowledge_base calls) one chat turn can make before the agent is forced to answer. This is a classic operational ceiling (cost/latency vs. thoroughness tradeoff), in the same spirit as the already-DB-backed rate-limit capacity fields, but isn't itself configurable.
Scope
- Add nullable
SystemSettingscolumnchat_max_tool_call_rounds(int,ge=1), env-default fallback. - New or extended resolver (likely a small addition to an existing resolver, or its own
resolve_chat_agent_configif none fits — followdocs/BACKEND_SERVICES.md). - Wire into
chat_agent.py, replacing the module constant. - Add to the Settings UI (likely a new small "Chat Agent" section, or folded into an existing one if a natural fit emerges during implementation) with a tooltip.
- Audit-log on change.
Definition of Done
-
chat_max_tool_call_roundsnullable column + Alembic migration. - Resolver function, unit-tested.
- Wired into
chat_agent.py. - Settings UI field + tooltip.
- Audit logging on change.
- RBAC call-out per
AGENTS.mdTDD Discipline step 0: admin feature. - Standard merge gate from
AGENTS.md's Definition of Done applies in full.
Metadata
Metadata
Assignees
Labels
area:chat-uxChat UI/agent runtime behavior visible to usersChat UI/agent runtime behavior visible to userseffort:SSmall: single file/component, hours not daysSmall: single file/component, hours not dayspolishAdmin/UI surfacing or refinement of existing capability, not new functionalityAdmin/UI surfacing or refinement of existing capability, not new functionalitypriority:P3Deferred/speculative — explicitly not scheduled yetDeferred/speculative — explicitly not scheduled yettype:improvementMakes an existing capability better/safer/more completeMakes an existing capability better/safer/more complete
Activity