Home/Docs/Agents & Workflows

Agents & Workflows

Zubo supports custom sub-agents, multi-agent delegation, structured workflows, and agent teams. This allows you to create specialized agents for specific tasks and orchestrate them together into powerful, composable pipelines that go far beyond what a single agent can accomplish on its own.

The Default Agent

By default, Zubo operates as a single agent that handles all messages across every connected channel using a unified session identified as "owner." This default agent has access to all registered tools — both built-in tools and any user-installed skills — and its personality and behavior are defined by the system prompt stored at ~/.zubo/workspace/SYSTEM.md.

For many use cases, the default agent is all you need. It can search the web, manage your calendar, write code, read and write memory, and use any skill you install. Custom agents become valuable when you want to restrict tool access, provide specialized instructions, or build multi-step workflows.

Custom System Prompt

The system prompt defines your agent's personality, rules, and background knowledge. There are two ways to customize it:

Here is an example SYSTEM.md that defines a personalized assistant:

# System Prompt

You are Zubo, a personal AI assistant for Thomas.

## Personality
- Friendly but concise. Avoid unnecessary filler.
- Use a professional tone for work topics, casual for personal.
- When unsure, ask clarifying questions rather than guessing.

## Rules
- Always check memory before answering personal questions.
- Never share API keys, passwords, or sensitive data in chat.
- Prefer short answers unless the user asks for detail.

## Context
- Thomas is a software engineer working on a Rust project called "relay."
- His timezone is America/New_York.
- He prefers metric units and Markdown formatting.

The system prompt is loaded fresh on every message, so changes take effect immediately without restarting Zubo.

Creating Custom Agents

Custom agents are defined as directories inside ~/.zubo/workspace/agents/. Each directory contains a single AGENT.md file that specifies the agent's name, description, system prompt, and allowed tools.

Here is an example AGENT.md for a research specialist:

# research_agent
A specialized agent for web research and summarization.

## System Prompt
You are a research specialist. Focus on finding accurate, up-to-date
information from reliable sources. Always cite your sources and provide
concise summaries. When researching a topic, search from multiple angles
to ensure comprehensive coverage.

## Tools
- web_search
- url_fetch
- memory_write

There are three ways to create a custom agent:

Agents have restricted tool access — they can only use the tools explicitly listed in their ## Tools section. This is a key security and reliability feature: a research agent does not need access to your calendar, and a writing agent does not need access to the shell.

Agent Fields

FieldRequiredDescription
Name (H1)YesLowercase with underscores, e.g. research_agent. Used as the agent identifier.
DescriptionYesFree-text between the H1 heading and the first H2. Describes what the agent does.
System PromptYesContent under the ## System Prompt heading. Defines the agent's behavior and personality.
ToolsYesBullet list under the ## Tools heading. Each item is the name of a registered tool or skill.

Sub-Agent Delegation

The main agent can delegate tasks to sub-agents using the built-in delegate tool. When a task is delegated, the sub-agent runs with its own system prompt and restricted tool set, processes the task, and returns a result to the main agent.

Key rules for delegation:

Here is an example of how delegation works in practice:

User: "Research the latest AI news and summarize it"

Zubo (main agent):
  [Decides this is a research task, delegates to research_agent]

  research_agent:
    [Uses web_search to find recent AI articles]
    [Uses url_fetch to read the top 3 articles]
    [Uses memory_write to save key findings]
    Returns: "Here's a summary of today's AI news:
    1. OpenAI announced GPT-5 with improved reasoning...
    2. Google DeepMind published new results on...
    3. Meta released an open-source model that..."

Zubo (main agent):
  "Based on the research, here's what's happening in AI today:
   [Formats and presents the research_agent's findings]"

The user sees only the final response from the main agent. The delegation is transparent unless you inspect the logs in the dashboard.

Workflows

Workflows let you chain multiple agents together in a structured, multi-step pipeline. Each step defines a task, the agent that should handle it, and its dependencies on other steps. Zubo executes steps in dependency order using topological sorting, and independent steps run in parallel.

Workflows are defined as WORKFLOW.md files inside ~/.zubo/workspace/workflows/. Here is an example:

# content_pipeline
A workflow that researches, writes, and reviews content.

## Agents
- research_agent
- writer_agent
- reviewer_agent

## Steps
### research
- agent: research_agent
- task: Research the topic: $input

### write
- agent: writer_agent
- task: Write an article based on this research: $research
- dependsOn: research

### review
- agent: reviewer_agent
- task: Review and improve this article: $write
- dependsOn: write

In this example, the research step runs first. Once it completes, its output is passed to the write step via the $research variable. After writing is complete, the review step receives the article via $write and produces the final output.

Running a Workflow

There are two ways to trigger a workflow:

Variables

Workflows use a simple variable system to pass data between steps:

Execution Details

Workflow Step Fields

FieldRequiredDescription
Step name (H3)YesUnique step identifier, used as a variable name for downstream steps.
agentNoThe agent to delegate this step to. If omitted, the main agent handles the step.
taskYesNatural language description of what this step should accomplish. Supports variable interpolation.
dependsOnNoName of a step (or comma-separated list of steps) that must complete before this step can start.
outputNoCustom variable name for this step's output. Defaults to the step name.

Agent Teams

Teams provide a way to group related agents and associate them with a default workflow. They are defined as TEAM.md files inside ~/.zubo/workspace/teams/.

# content_team
A team for content creation workflows.

## Agents
- research_agent
- writer_agent
- reviewer_agent

## Default Workflow
content_pipeline

Teams serve as an organizational layer:

When you tell Zubo "use the content team to write about AI trends," it automatically activates the team's default workflow with your input.

Best Practices