Skip to content

Custom Agent Types

Alessio Rocchi edited this page Jan 27, 2026 · 1 revision

Custom Agent Types

Create specialized agent types for your workflows.


Registering Custom Agents

import { registerAgent } from '@blackms/aistack';

registerAgent({
  type: 'my-custom-agent',
  name: 'My Custom Agent',
  description: 'Specialized agent for X',
  systemPrompt: `You are a specialized agent that...

Key responsibilities:
- Responsibility 1
- Responsibility 2

Approach:
1. Step 1
2. Step 2`,
  capabilities: [
    'custom-capability-1',
    'custom-capability-2'
  ]
});

Using Custom Agents

// Spawn custom agent
const agent = spawnAgent('my-custom-agent', {
  name: 'my-instance'
});

// Use like any other agent
const task = await memory.createTask('my-custom-agent', 'Do custom work');
await memory.assignTask(task.id, agent.id);

Examples

Domain-Specific Agent

registerAgent({
  type: 'financial-analyst',
  name: 'Financial Analyst',
  description: 'Analyze financial data and reports',
  systemPrompt: `You are a financial analyst specializing in...`,
  capabilities: ['financial-analysis', 'report-generation']
});

Integration Agent

registerAgent({
  type: 'slack-bot',
  name: 'Slack Integration Agent',
  description: 'Manage Slack interactions',
  systemPrompt: `You are a Slack bot that...`,
  capabilities: ['slack-messages', 'slack-commands']
});

Related:

Clone this wiki locally