Skip to Content
Perstack 0.0.1 is released πŸŽ‰
Making ExpertsOverview

Making Experts

Experts are defined in perstack.toml. This section covers how to define, test, and publish Experts.

The essentials

Every Expert needs just two things:

[experts."code-reviewer"] description = "Reviews code for issues and improvements" instruction = """ You are a code reviewer. Analyze code for: - Type safety and error handling - Security vulnerabilities - Performance issues Provide actionable feedback with examples. """
  • description β€” what it does (visible to delegators)
  • instruction β€” how it thinks (private domain knowledge)

That’s a complete, functional Expert. Skills and delegates are optional.

Why TOML: Enabling domain experts

This is the core of agent-first development: the people with domain knowledge should define the Experts.

In most teams, a few β€œprompt-capable” engineers become bottlenecks. They’re the only ones who can write and maintain agent prompts, while domain experts β€” who actually have the knowledge β€” can’t contribute directly.

Perstack breaks this bottleneck. Expert definitions are plain text that anyone can read and write:

  1. No technical formatting knowledge required β€” no indentation rules, no trailing commas, no escaping
  2. Comments for intent β€” domain experts explain their reasoning inline

That’s why we use TOML. The format serves the goal: domain experts own their Experts.

Multiple Experts in one file

Define related Experts together:

[experts."researcher"] description = "Gathers information from various sources" instruction = "..." [experts."writer"] description = "Creates polished content from research" instruction = "..." delegates = ["researcher"] [experts."editor"] description = "Reviews and refines written content" instruction = "..."

This pattern works well for:

  • Pipelines β€” Experts that work in sequence
  • Teams β€” Experts with complementary roles
  • Variants β€” Similar Experts with different specializations

Designing delegation

When one Expert delegates to another, only description is shared. The delegator never sees the delegate’s instruction.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ writer β”‚ β”‚ β”œβ”€β”€ sees: researcher.description β”‚ β”‚ └── decides: "I need research on X" β”‚ β”‚ β”‚ β”‚ researcher β”‚ β”‚ β”œβ”€β”€ receives: "research on X" β”‚ β”‚ └── uses: own instruction (private) β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

This means:

  • Write description for the delegator β€” what can I ask for? What will I get back?
  • Write instruction for the Expert itself β€” domain knowledge, procedures, constraints

In this section

Prerequisites

Before making Experts, understand the core concepts:

For running and integrating Experts, see Using Experts.