| title |
Agent |
| description |
Agent Schema Reference |
| category |
ai |
| zodFile |
agent |
**Source:** `packages/spec/src/ai/agent.zod.ts`
| Property |
Type |
Required |
Description |
| name |
string |
✅ |
Agent unique identifier |
| label |
string |
✅ |
Agent display name |
| avatar |
string |
optional |
|
| role |
string |
✅ |
The persona/role (e.g. "Senior Support Engineer") |
| instructions |
string |
✅ |
System Prompt / Prime Directives |
| model |
object |
optional |
|
| tools |
object[] |
optional |
Available tools |
| knowledge |
object |
optional |
RAG access |
| active |
boolean |
optional |
|
| access |
string[] |
optional |
Who can chat with this agent |
import { AgentSchema } from '@objectstack/spec/ai';
import type { Agent } from '@objectstack/spec/ai';
// Validate data
const result = AgentSchema.parse(data);
// Type-safe usage
const myAgent: Agent = {
name: 'name',
label: 'example',
role: 'example',
// ... other required fields
};