Avery.Software — Native Execution Runtime
RuntimeUse casesPricingHelpBlog
← Back to helpconcept · agents

How does the planner pick a template for my agent?

2 min

When you describe an agent in plain English, the planner first tries to match your requirement to a pre-built template — match-and-fill is far more reliable than building from scratch. The fallback is the free-form planner; both end up at the same canvas.

Avery ships with ~80 pre-built agent templates that capture the structural patterns of common automations: file extraction, scheduled digests, ticket routers, RAG Q&A, lead capture, build-failure alerts, etc. Each template is a fully-wired skeleton (nodes + edges) with `${slot}` markers for the bits that vary per user (recipient email, target URL, label list).

## What happens when you describe an agent

1. Template match (one tiny AI call). Your requirement is shown to the SLM along with every template's id + summary + 3-5 example phrasings. The SLM picks the best match (or 'none' to fall through).

2. Slot fill (mostly free). Each slot has a strategy: • literal slots (emails, phones, URLs, paths, channels, label lists, schedule cadences) come from a regex extractor — no AI call, 100% reliable. • slm slots (custom prompt text, system messages, query strings) get one tiny AI call each with a focused hint. • default slots use the template author's hand-tuned constant.

3. Done. The template's structure is known-correct, so the self-correcting refinement loop is SKIPPED — your agent is ready in 15-20 seconds (vs 60-130s for a free-form build).

## What if no template matches?

Fall through to the free-form planner: the existing extract-steps → pick-kind → fill-config → assemble pipeline runs, then the refinement loop polishes the output. This handles novel requirements not yet covered by a template.

## How to know which path ran

The Overview tab's badge tells you. Templated runs show 'Generated from template: <id>' in the audit trail. Free-form runs show the 'Verified ✓ in N passes' badge from the refinement loop.

## Can I publish my own template?

Yes — local first, then global. Build an agent in the canvas, click 'Save as template' to capture it under `~/.nxr/local-templates/` for personal reuse. Users with publisher access can also push to the global Forge marketplace, mirroring the plugin distribution model. (UI for this lands in Phase 2 — currently it's a developer-only path via the JSON file.)


Live recipes need the desktop

This article is a static preview. The in-app Help sidecar inside Avery NXR can fire each step against your live project — install the desktop to use it interactively.

Download desktop →