Skip to content

Leia Templates & Subagents

Leia ships with everything needed to design and deploy production-shaped agents: ready-made business templates, the subagents that build and operate them, and the schemas they are built against.

Leia bundles 6 business-vertical templates. Each is a complete astromesh/v1 Agent manifest with a default model of Ollama llama3.1:8b and built-in guardrails (PII redaction plus an output max_length). Browse them with /leia templates, or use them as the starting point for /leia create.

TemplateChannelPatternPurpose
customer-supportWhatsAppreactFAQ, troubleshooting, complaint resolution, escalation
restaurant-bookingWhatsAppplan_and_executeReservations, menu, dietary, cancellations
ecommerce-assistantWhatsAppreactProduct search, pricing, order tracking, returns (never processes payments)
appointment-schedulerWhatsAppplan_and_executeBooking, rescheduling, cancellations
lead-qualifierWhatsAppreactSales qualification via BANT, routes qualified leads
onboarding-guideWebreactEmployee orientation, policies, IT setup, benefits FAQ (PII redaction)
  • customer-support — handles FAQs, troubleshooting, and complaint resolution over WhatsApp, escalating when it hits its limits.
  • restaurant-booking — manages reservations, menu and dietary questions, and cancellations with a plan-and-execute flow.
  • ecommerce-assistant — product search, pricing, order tracking, and returns. It never processes payments.
  • appointment-scheduler — books, reschedules, and cancels appointments.
  • lead-qualifier — qualifies sales leads using BANT and routes qualified ones onward.
  • onboarding-guide — a web-channel agent for new-hire orientation: policies, IT setup, and benefits FAQ, with PII redaction.

Behind the commands, Leia dispatches 5 specialized subagents. Natural language routes to the right one automatically.

SubagentModelRole
leia-interpreterSonnetParses natural language into structured intent + entities; routes to the right flow
leia-architectOpusDesigns the agent: reads schemas/templates, detects the model provider (Ollama auto-detect + cloud fallback), picks an orchestration pattern, and generates a complete astromesh/v1 Agent YAML with real system prompts
leia-operatorSonnetExecutes cluster ops via curl (REST) + kubectl: deploy, delete, status, logs, metrics, health, tenants, bootstrap, teardown
leia-testerSonnetTests agents: interactive proxy chat, or --auto runs predefined scenarios scored on relevance, tone, accuracy, channel compliance, and boundary respect
leia-doctorSonnetDiagnoses issues step-by-step, stops on the first failure, and gives a root cause plus fix

leia-doctor walks a fixed chain and stops at the first failing step, so you get a precise root cause instead of a wall of errors:

API reachable → auth → tenant → agent CR → node pod → node health → model → webhook

Leia ships reference schemas that the architect reads when designing agents — and that you can consult when hand-writing manifests:

  • astromesh/v1 agent spec — the full Agent manifest schema (identity, model, prompts, orchestration, tools, memory, guardrails, permissions).
  • orchestration-patterns — a guide to the available patterns (see below).
  • whatsapp-config — the WhatsApp channel configuration and its environment variables: WHATSAPP_VERIFY_TOKEN, WHATSAPP_ACCESS_TOKEN, WHATSAPP_PHONE_NUMBER_ID, WHATSAPP_APP_SECRET. See the WhatsApp setup guide for end-to-end configuration.
  • nexus-api — the Nexus REST API reference the operator calls.

The templates use react and plan_and_execute, but the bundled patterns guide covers the full set:

PatternWhen it fits
reactReason-and-act loops — good for FAQ, search, and troubleshooting agents.
plan_and_executeMulti-step tasks with a plan up front — bookings, scheduling, cancellations.
parallel_fan_outIndependent subtasks run concurrently and merged.
pipelineSequential stages where each feeds the next.
supervisorA coordinator delegating to specialist agents.
swarmDecentralized collaboration among peer agents.

When leia-architect designs an agent, it runs ollama list and prefers a local model if one is available, falling back to a cloud model otherwise. Set defaults.model-provider: auto in your config to let Leia choose automatically.