-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathagent.form.ts
More file actions
64 lines (62 loc) · 2.89 KB
/
Copy pathagent.form.ts
File metadata and controls
64 lines (62 loc) · 2.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
import { defineForm } from '../ui/view.zod';
/**
* Agent Metadata Form
*
* Form layout for creating/editing AI agent metadata definitions.
*/
export const agentForm = defineForm({
schemaId: 'agent',
type: 'simple',
sections: [
{
name: 'identity',
label: 'Identity',
description: 'How users see and reference this agent.',
columns: 2,
fields: [
{ field: 'name', required: true, colSpan: 1, helpText: 'Unique identifier (snake_case)' },
{ field: 'label', required: true, colSpan: 1, helpText: 'Display name (e.g., "Sales Assistant")' },
{ field: 'role', required: true, colSpan: 2, helpText: 'Agent persona (e.g., "Customer Support Specialist")' },
{ field: 'avatar', colSpan: 1, helpText: 'Avatar image URL' },
{ field: 'active', colSpan: 1, helpText: 'Enable/disable this agent' },
],
},
{
name: 'ai_configuration',
label: 'AI Configuration',
description: 'Model selection, instructions, planning, and memory.',
fields: [
{ field: 'instructions', required: true, widget: 'textarea', helpText: 'System prompt — tell the agent how to behave and what it can do' },
{ field: 'model', type: 'composite', helpText: 'AI model configuration (provider, model name, temperature, etc.)' },
{ field: 'planning', type: 'composite', helpText: 'Autonomous reasoning configuration (strategy, max iterations, replan)' },
{ field: 'memory', type: 'composite', helpText: 'Memory management (short-term, long-term, reflection)' },
{ field: 'lifecycle', type: 'composite', helpText: 'State machine defining conversation flow' },
],
},
{
name: 'capabilities',
label: 'Capabilities',
description: 'Skills, tools, and knowledge sources the agent can use.',
fields: [
{ field: 'skills', widget: 'string-tags', helpText: 'Skill names (Agent→Skill→Tool architecture)' },
{ field: 'tools', type: 'repeater', helpText: 'Direct tool references (legacy mode)' },
{ field: 'knowledge', type: 'composite', helpText: 'RAG knowledge access configuration' },
],
},
{
name: 'access',
label: 'Access & Security',
description: 'Who can use this agent and what safeguards apply.',
collapsible: true,
collapsed: true,
fields: [
{ field: 'visibility', helpText: 'Scope: global, organization, or private' },
{ field: 'access', widget: 'string-tags', helpText: 'User IDs or role names who can chat with this agent' },
{ field: 'permissions', widget: 'string-tags', helpText: 'Required permissions to use this agent' },
{ field: 'tenantId', helpText: 'Restrict to specific organization ID' },
{ field: 'guardrails', type: 'composite', helpText: 'Safety rules and content policies' },
],
},
],
});