AI & agents
When to use each of the 6 ai & agents blocks, with a live example of every one.
The ai & agents blocks: what each one is for, how to choose between neighbours, and a live starter example you can edit — converted at build time from the authoring skill your agent reads. Every example body is YAML; in a real doc the fence language is the block type (for example sequence … ). Schemas are strict — unknown fields are rejected. The full field contract for any block — every field, enum, and terse one-line form, generated from the schema — is npx chiltepin block <type>. See the block catalog for every block rendered on one page.
Shape: Structure & emphasis — four fixed frames for one LLM agent: the
loop (agentloop), one real episode (trace), the contract (prompt), and
the window budget (context).
Answers: What does the loop do? What can it call? What is the model
told? What fills the window? What did a real run look like?
They compose — the AI / agent recipe in reference/recipes.md stacks all
four.
Not this family: the architecture around the agent (services, queues,
vector stores) → block (architecture.md; kind: llm / agent gets the
violet card); one turn's message timing between services → sequence
(flows.md).
AI & agents
agentloop — the canonical agent-loop diagram
Environment left, agent card centre, tools stacked right, a memory cylinder
below. Answers: what does one loop turn do, and what can the agent call?
The four numbered arrows are fixed (prompt → tool call → result → response).
List only tools the agent can call; the render shows 5 and folds the rest.
The memory cylinder draws only when memory: is present.
agentloop for the loop itself; block for the deployment around it.
chiltepin checktrace — an agent / session execution transcript
A vertical transcript: one card per turn with a role chip (user, assistant,
tool, system). Answers: what did one real episode do, step by step?
Quote args and result: JSON braces and colons are YAML syntax. Block
scalars (|) keep line breaks.
trace, not sequence, to follow one conversation; sequence for the
timing between services.
chiltepin checkprompt — prompt anatomy with variable highlighting
Stacked segment cards with role kickers; every {{variable}} highlights as
a chip. Answers: what is the model told, and where does each value come from?
Quote any text that contains {{ }}: bare braces are YAML flow syntax.
List each variable in vars so the legend explains it.
prompt, not code, for templates and system prompts; code for programs.
chiltepin checkcontext — context-window token budget
One horizontal bar sized against window, segments left to right, free space
dim. Answers: what fills the window, and how much is left?
A sum past window draws red past a dashed boundary with an "over budget"
chip. Use it to show the failure case on purpose.
context for token budgets; a waterfall chart for latency and cost.
chiltepin checkneuralnet — layered network
One column per layer with units, kind (input / conv / pool / dense /
attention / output …) and activation; dense mesh between layers, an
ellipsis when a layer is wider than maxUnits. Answers: what is the model's
shape? List the layers a reader would name, not every repeated block: fold
"12 × transformer block" into one attention layer with a note.
neuralnet for the architecture; flow (variant: dag) for the training
pipeline; chart line for loss curves.
chiltepin checkmodelcard — model card
Identity, intended use and out-of-scope, training data, metrics per split,
limitations, ethics. Answers: what is this model, and what may it be used
for? The endpoint card for a model: one per deployed model version.
modelcard, not spec, for a model; benchmark to compare candidates.
chiltepin check