Skip to content

Layer Model

Minions organizes types into six conceptual layers. Each layer is just a collection of standard MinionTypes — use the ones you need, ignore the rest.

The six layers stack conceptually from identity at the bottom to runtime at the top:

┌─────────────────────────────────────────────────┐
│ ⚡ EXECUTION LAYER │
│ Tasks, Workflows, Triggers │
├─────────────────────────────────────────────────┤
│ 🧪 EVALUATION LAYER │
│ Test Cases, Benchmarks, Scores │
├─────────────────────────────────────────────────┤
│ 📋 INTERFACE LAYER │
│ Prompt Templates, Personas, Contracts │
├─────────────────────────────────────────────────┤
│ 💭 MEMORY LAYER │
│ Thoughts, Decisions, Observations │
├─────────────────────────────────────────────────┤
│ 👥 ORGANIZATION LAYER │
│ Teams, Collections, Hierarchies │
├─────────────────────────────────────────────────┤
│ 🤖 DEFINITION LAYER │
│ Agents, Skills, Tools, Personality │
└─────────────────────────────────────────────────┘
LayerPurposeBuilt-in TypeExample Types
DefinitionWhat a thing isagentAgent, Skill, Tool, Personality
OrganizationHow things groupteamTeam, Collection, Folder
MemoryWhat a thing knowsthoughtThought, Memory, Decision
InterfaceHow a thing presentsprompt-templatePrompt Template, Persona
EvaluationHow a thing is measuredtest-caseTest Case, Benchmark, Score
ExecutionWhat a thing doestaskTask, Workflow, Trigger

Layers connect via typed relations. Here’s how a fully-realized agent connects across layers:

┌──────────────┐
│ Daily Task │ ⚡ Execution
└──────┬───────┘
│ triggers
┌──────▼───────┐
│ Quality Test │ 🧪 Evaluation
└──────┬───────┘
│ references
┌──────▼───────┐
│ Prompt │ 📋 Interface
│ Template │
└──────┬───────┘
│ references
┌──────▼───────┐
│ Thought │ 💭 Memory
└──────┬───────┘
│ part_of
┌──────────┐ ┌──────▼───────┐
│ Team │◄───│ Agent │ 🤖 Definition
│ │ │ │
└──────────┘ └──────────────┘
👥 Org parent_of ↕

The identity of your agent — its role, model, configuration.

Built-in type: agent — defines an AI agent with fields for role, model, system prompt, temperature, and tools.

Agent (🤖)
├── role: "researcher"
├── model: "gpt-4"
├── systemPrompt: "You are a research assistant..."
├── temperature: 0.3
└── tools: ["web-search", "summarize"]

How agents group together. Teams define execution strategy (sequential, parallel, round-robin).

Built-in type: team — groups agents with a strategy field.

Content Team (👥)
├── members: [writer, editor, seo]
├── strategy: "sequential"
├── Writer (🤖) ──follows──▶ Editor (🤖) ──follows──▶ SEO (🤖)
│ Sequential execution pipeline

What your agent knows, remembers, or has observed. Agents can create thoughts, record decisions, and reference past experiences.

Built-in type: thought — a recorded observation with content and confidence.

Agent Memory (💭)
├── "Use active voice" (confidence: 0.95)
├── "Prefer peer-reviewed sources" (confidence: 0.90)
└── "User prefers summaries under 500 words" (confidence: 0.80)

How your agent presents itself. Prompt templates define reusable prompts with variables.

Built-in type: prompt-template — a template with variable interpolation.

Prompt Template (📋)
├── template: "Research {{topic}} for {{audience}}..."
├── variables: [topic, audience, format]
└── outputFormat: "markdown"

How you measure your agent’s performance. Test cases define inputs, expected outputs, and assertions.

Built-in type: test-case — input/output pairs with assertions.

Test Case (🧪)
├── input: { topic: "AI agents", count: 3 }
├── assertions: { containsCitations: true, minPapers: 3 }
└── timeout: 30000ms

What your agent does at runtime. Tasks track execution status, timing, and errors.

Built-in type: task — tracks execution with status, timing, and error fields.

Task (⚡)
├── input: { ... }
├── executionStatus: "completed"
├── startedAt: "2024-01-15T10:00:00Z"
├── completedAt: "2024-01-15T10:05:00Z"
└── output: { ... }

An agent can start as a single flat minion and grow across any layer:

Research Agent
┌──────────────────────────────────┐
│ 🤖 Agent (Definition) │
│ role: "researcher" │
│ model: "gpt-4" │
└──────────┬───────────────────────┘
│ parent_of
┌────────────────────┼────────────────────┐
│ │ │
┌────────▼─────┐ ┌─────────▼──────┐ ┌────────▼──────┐
│ 💭 Thought │ │ 📋 Prompt │ │ 🧪 Test Case │
│ Style Guide │ │ Summary Tmpl │ │ Quality Check │
│ (Memory) │ │ (Interface) │ │ (Evaluation) │
└──────────────┘ └────────────────┘ └───────────────┘

No migration required — just add minions and relations. Each layer is optional; use exactly the ones your agent needs.