Repository navigation
Closed
Description
Context
Synthetic routing is not usable as a product feature until administrators can configure it safely and users can recognize virtual selections and their physical execution attempts. Existing planner selectors can consume the extended instance catalog, but the Coding Agents page, playground, CLI, task details, and documentation need explicit support.
This issue depends on the configuration API and runtime router from the preceding issues.
Requirements
Web UI
- Add a
Synthetic Poolsview to the administrator-only Coding Agents page. - Allow creating, editing, enabling, disabling, and deleting synthetic agents and virtual models.
- For every virtual model, allow selecting:
- strategy (
Round robinorUsage based); - direct agent/model members;
- enabled state;
- priority from 0 through 100;
- optional session and weekly maximum percentages.
- strategy (
- Member pickers must list only direct agents and their supported models; synthetic agents must never appear as members.
- Explain strict priority-tier behavior and the priority-zero fallback pattern in the form.
- Warn when usage caps require unavailable or stale alias-specific Agent Tank data.
- Show backend validation messages next to the relevant nested field when possible.
- Include synthetic choices in the playground and send their synthetic configuration ID to the chat endpoint.
- Display both the virtual identity and selected physical identity in playground responses and task details.
- Use a neutral pool/layers icon rather than pretending a synthetic pool belongs to one provider.
- Respect demo/read-only mode.
CLI
- Add typed API helpers for listing and saving synthetic configurations.
- Add
propr agent pool list,propr agent pool apply, andpropr agent pool deletecommands. applymust accept a JSON file or-for stdin so nested multi-model configurations remain unambiguous and scriptable.- Support
--jsonoutput and preserve the backend's validation error message.
Observability
- Keep task-list model columns concise by showing the virtual model.
- In task details and LLM logs, show the physical agent/model and attempt number for synthetic calls.
- Show failover attempts as separate task-history entries without creating separate tasks.
- Mark a pool as degraded when no member is currently eligible, but do not mark unrelated direct agents unhealthy.
Documentation
- Define synthetic agent, synthetic model, pool member, priority tier, usage cap, and failover.
- Document round-robin and usage-based examples.
- Document the priority-100 primary plus priority-0 fallback recipe.
- Explain context-aware early selection and why a smaller-context fallback can be skipped.
- Explain that capped members require fresh alias-specific usage data while uncapped pools do not require Agent Tank.
- Document failure retry behavior and workspace preservation.
Acceptance Criteria
- An administrator can create a two-account same-provider round-robin pool entirely through the Web UI.
- An administrator can create a cross-provider primary/fallback pool with an 80% weekly cap on the primary.
- The UI prevents selecting another synthetic pool as a member.
- Saving displays validation failures without losing unsaved form state.
- Planner, repository, and review model selectors show synthetic virtual models from the instance catalog.
- Playground requests to a synthetic model return the virtual identity plus the physical member used.
- CLI JSON exported by
pool listcan be passed unchanged topool apply. - Task details show failover attempts and the eventual successful physical member.
- Demo mode disables all pool mutations.
- UI unit tests, CLI command tests, API client tests, documentation builds, and TypeScript checks pass.
Created by ProPR AI Planner
Activity
propr-dev commentedon Aug 29, 2026
Suggested Implementation:
Implementation Approach
Reuse the existing Coding Agents surface and instance catalog rather than creating a separate top-level product area. Synthetic agents are first-class routing choices but not credential-bearing Docker agents, so the UI presents them as a sibling view and uses distinct pool-specific forms.
The CLI uses full JSON documents for writes. A dense flag syntax was considered but rejected because nested virtual models, repeated members, priorities, and two independent caps would be difficult to parse and unsafe to edit in shell history.
The task list retains the concise virtual identity, while details expose physical attempts. Replacing the virtual identity everywhere with the physical model was rejected because labels, branches, configured defaults, and task grouping must remain stable even when routing changes between calls.
File:
propr-ui/src/api/syntheticAgentsApi.ts(new file)Why this file: A dedicated typed client keeps the nested pool contract out of the already broad
configApi.tsand can be reused by the Coding Agents page and tests.Files:
propr-ui/src/pages/SettingsPage/SyntheticAgentsSection.tsxandSyntheticAgentModal.tsx(new files)Why these files: The list and nested editor have different responsibilities. The section owns loading, saving, deletion, read-only behavior, and status cards; the modal owns draft state and validation without mutating saved data until submission.
Implement the modal with these controlled sections:
Only the highest currently eligible priority tier is used.Priority 0 is suitable for fallback members.Usage caps require fresh usage for this direct alias.Use immutable nested updates. Generate UUIDs once when a synthetic agent or member is added; do not regenerate IDs during edits because runtime cursor fairness is keyed by configuration ID.
For member options, derive rows only from the direct
AgentConfig[]already loaded by the page:When the modal submits, replace or append the draft configuration in the full array and call
saveSyntheticAgents. Keep the modal open and preserve its draft if the request fails.File:
propr-ui/src/pages/AiAgentsPage.tsxWhy this file: This page already combines direct agent configuration and the playground. Add a
Direct Agents/Synthetic Poolssegmented control to its configuration pane and load both resources in parallel.Files:
propr-ui/src/api/agentChatApi.tsand backend agent-chat routeWhy these files: The playground currently assumes every query ID belongs to a direct agent. It must distinguish synthetic configuration IDs and return both requested and selected identities.
In the backend chat handler, resolve direct IDs through the existing path and synthetic IDs through
createSyntheticCallSession. UserunSyntheticCallso playground behavior matches production failover. Return the synthetic alias/model inagentAliasandmodel, and populate the physical fields from the successful lease.File:
propr-ui/src/components/AgentChat/ChatPanel.tsxWhy this file: Playground chips and response cards need a pool-specific presentation without treating the pool as Claude, Codex, or another provider.
Extend the option type with
agentKind. Build options from both direct and synthetic inputs, passagentKindinChatQuery, and renderLayers3for synthetic options. Add this response subline when physical fields exist:Files: task-detail API types,
ContextStrip.tsx, andTaskStatusTable.tsxWhy these files: The virtual identity belongs in the main model chip, while physical attempts belong in diagnostic detail and history.
Add optional routing metadata to task-history types. In
ContextStrip, show a secondaryRouted to agent:modelchip when the terminal successful history entry contains physical routing metadata. InTaskStatusTable, label attempt entries asSynthetic attempt N — agent:modeland show failed attempt messages without marking the whole task failed while another retry is running.Do not add physical routing to branch links or task-list grouping.
File:
packages/cli/src/api/syntheticAgents.ts(new file)Why this file: CLI consumers need the same typed full-document API as the Web UI.
File:
packages/cli/src/commands/agentPoolCommands.ts(new file)Why this file: Pool commands are conceptually part of agent administration but warrant an isolated command builder and tests.
Implement a Commander subcommand named
poolwith:list: print the full saved configuration using existingprintOutputbehavior.apply --file <path|->: read JSON usingreadJsonInput; accept either a raw array or{ "synthetic_agents": [...] }; send the complete document to the API.delete <alias>: load the current document, remove the exact alias, fail if absent, and save the new document.For
apply, require explicit--file; do not accept the JSON as a positional shell argument because credentials are not present but nested configuration can still be corrupted by quoting.Add reasoning comments around full-array replacement explaining that it matches the backend configuration contract and, like direct-agent saves, can overwrite concurrent edits until a per-pool PATCH endpoint exists.
Files:
packages/cli/src/api/index.ts,packages/cli/src/commands/index.ts, andpackages/cli/src/commands/agentCommands.tsWhy these files: These barrels and the existing agent command are the CLI's public and user-facing assembly points.
Re-export the new API functions and types. Mount
createAgentPoolCommand()beneath the existingagentcommand so help renders:Update completion metadata and the top-level help's Agents line to include
pool.Documentation files
Why these files: Synthetic routing changes model identity, quota behavior, and failure handling across several user workflows.
Update:
docs/docs/features/agents-and-models.md: add a complete Synthetic Agents and Models section with same-provider round-robin, cross-provider usage-based, and primary/fallback JSON examples.docs/docs/architecture/coding-agent-integration.md: show virtual routing, early physical selection, and the retry loop before worker finalization.docs/docs/operations/agent-tank.md: distinguish provider-level display data from alias-specific snapshots eligible for routing caps; state that uncapped round-robin works without Agent Tank.docs/docs/features/planning.md: explain early physical selection for context-sensitive stages.docs/docs/tutorials/usage.md: document selecting synthetic labels and interpreting task detail routing.docs/docs/concepts/glossary.md: define synthetic agent, synthetic model, pool member, usage cap, and failover.docs/docs/features/web-ui.md: document the Synthetic Pools view under Coding Agents.The primary/fallback example should use priority 100 with an 80% cap and priority 0 without a cap. Explain that priority is a tier, not a probability.
Test files
Why these files: Nested editors and whole-document CLI writes are prone to regression even when core selection remains correct.
Add:
agentKind: 'synthetic'and renders physical routing.propr-dev commentedon Aug 30, 2026
🤖 AI processing has started for this issue using codex agent with gpt-5.6-sol model.
I'll analyze the problem and work on a solution. This may take a few minutes.
Processing Details:
codexgpt-5.6-sol1992/gpt-5.6-sol-add-web-ui-cli-playground-20260830-0822-lb41990-epic-synthetic-pool-eusissue-1992-20260830-0822-gpt-5.6-sol-lb4🔍 Track Task Execution
fix(ai): Resolve issue #1992 - Add Web UI, CLI, playground, observabi…
fix(ai): Resolve issue #1992 - Add Web UI, CLI, playground, observabi…