Skip to content

feat: Agent configuration form - Create and edit agents from UI (COM-18)#8

Merged
Kaiohz merged 3 commits into
BRIC-4/init-composable-uifrom
COM-18/agent-config-form
Apr 25, 2026
Merged

feat: Agent configuration form - Create and edit agents from UI (COM-18)#8
Kaiohz merged 3 commits into
BRIC-4/init-composable-uifrom
COM-18/agent-config-form

Conversation

@Kaiohz
Copy link
Copy Markdown
Contributor

@Kaiohz Kaiohz commented Apr 24, 2026

Summary

  • Add complete form-based agent configuration UI, allowing agents to be created and edited entirely from the interface (in addition to existing YAML upload)
  • Form serializes to YAML client-side and uploads via existing multipart API (no backend changes needed)
  • Zod validation schemas for all AgentConfig types with react-hook-form integration

Changes

New Components

  • AgentConfigForm: Full form with accordion sections (General, System Prompt, Tools & Middleware, Backend, HITL, Memory & Skills, MCP Servers, Subagents, Response Format)
  • StringListEditor: Reusable dynamic string list (tools, skills, memory, args)
  • KeyValueEditor: Reusable key-value map editor (headers, env, HITL rules)
  • McpServerEditor: Nested form for MCP servers with conditional STDIO/HTTP fields
  • SubAgentEditor: Nested form for subagents with tools/skills editors
  • shadcn/ui components: Dialog, Form, Input, Select, Switch, Tabs, Accordion, Textarea, ScrollArea, Button, Label, Separator, Badge

Modified Components

  • CreateAgentDialog: Added Tabs (Form / Upload YAML), form tab is default
  • AgentConfigViewer: Added Edit mode with pre-filled form + Export YAML download button
  • AgentsPage: Changed button text from "Create Agent (YAML)" to "Create Agent"

New Domain Layer

  • agentConfigSchema.ts: Zod validation schemas for AgentConfig, BackendConfig, HITLConfig, McpServerConfig, SubAgentConfig
  • yaml.ts: serializeAgentConfig(), parseAgentConfig(), agentConfigToYamlFile() utilities using js-yaml

Tests

  • 273/274 tests passing (1 pre-existing chat API failure unrelated to this PR)
  • New test files: agentConfigSchema.test.ts, yaml.test.ts, AgentConfigForm.test.tsx, StringListEditor.test.tsx, KeyValueEditor.test.tsx, McpServerEditor.test.tsx, SubAgentEditor.test.tsx
  • Updated existing tests: CreateAgentDialog.test.tsx, AgentConfigViewer.test.tsx, AgentsPage.test.tsx

Dependencies

  • Added js-yaml + @types/js-yaml for YAML serialization

Jira

COM-18

Kaiohz added 3 commits April 24, 2026 21:23
…om UI

- AgentConfigForm: full form with sections (General, System Prompt, Tools & Middleware,
  Backend, HITL, Memory & Skills, MCP Servers, Subagents, Response Format)
- Zod validation schemas for AgentConfig and sub-types
- YAML serialization/deserialization (js-yaml) for client-side form-to-API bridge
- CreateAgentDialog: Tabs (Form / Upload YAML) for creating agents
- AgentConfigViewer: Edit mode + Export YAML button
- Reusable editors: StringListEditor, KeyValueEditor, McpServerEditor, SubAgentEditor
- shadcn/ui components generated (Dialog, Form, Tabs, Accordion, etc.)
- AgentsPage: button change from 'Create Agent (YAML)' to 'Create Agent'
- 273/274 tests passing (1 pre-existing chat API failure)
- Trivy: 0 new vulnerabilities

COM-18
@Kaiohz Kaiohz merged commit 27d20e8 into BRIC-4/init-composable-ui Apr 25, 2026
1 check passed
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