Skip to main content
Terminus is designed to be extensible. You can fork the codebase and create specialized agents with unique capabilities.

Agent Architecture

Agents are defined in the src/agents directory. Each agent implements a standard interface that defines its persona, capabilities, and tools.

Directory Structure

terminus-agents/
├── src/
│   ├── agents/           # Agent definitions
│   │   ├── travel-planner.ts
│   │   ├── crypto-advisor.ts
│   │   └── ...
│   ├── llm/              # Provider adapters (Grok/OpenAI/Claude/Gemini/Ollama)
│   └── tools/            # Shared tools (Web search, calculation, etc.)

Creating a New Agent

To create a new agent, add a new file in src/agents/ (e.g., my-custom-agent.ts).
import { AgentConfig } from '../types';

export const MyCustomAgent: AgentConfig = {
  id: 'my-custom-agent',
  name: 'My Custom Agent',
  description: 'An agent that does something specific.',
  systemPrompt: 'You are a helpful assistant specialized in...',
  capabilities: ['reasoning', 'web-search'],
  // Define tools this agent can use
  tools: ['search_web', 'calculate']
};

Testing Locally

  1. Build your changes:
    npm run build
    
  2. Run in development mode:
    npx terminus-agent init --profile local
    npx terminus-agent run
    
  3. Interact via the CLI or Local Control Plane to verify behavior.

Deployment

Once your agent is ready:
  1. Push your changes to your git repository.
  2. Deploy your agent node on a server (VPS, AWS, DigitalOcean).
  3. Run npx terminus-agent run using pm2 or Docker for 24/7 uptime.
# Example using PM2
pm2 start npm --name "terminus-agent" -- run start