Get Started

Instructions

Standing rules that are always applied. An instruction is prepended to an agent's system prompt on every run. Define it once and attach it to as many agent blueprints as you like — change the rule in one place and every agent follows it.

Reach for an Instruction when the text should always apply. If it should only apply when relevant (or it needs tools), use a Skill instead. If you want to render a template, use a Prompt.

Create an instruction

Instructions are platform-scoped — you create them once on your Theazo platform, then attach them to agent blueprints.

import { Theazo } from 'theazo'

const theazo = new Theazo({ apiKey: process.env.THEAZO_API_KEY })

const instruction = await theazo.instructions.create({
  name: 'Support tone',
  body: 'Always respond in a warm, concise, professional tone. Never make promises about refunds.',
  priority: 10, // lower runs first when several are attached
})
FieldTypeRequiredDescription
namestringyesHuman label, unique within (platform, kind).
descriptionstringLabel; for skills this is the runtime gate (required there).
enabledbooleanDefault true.
bodystringyesMarkdown/plaintext prepended to the system prompt.
priorityintegerLower runs first when several attach. Default 0.

Attach it to an agent

Attach an instruction to an agent blueprint. Every agent created from that blueprint picks it up.

await theazo.agents.attach(agentDefinitionId, {
  customizationId: instruction.id,
})

// List everything attached to a blueprint (grouped by kind)
const attachments = await theazo.agents.attachments(agentDefinitionId)

// Detach later
await theazo.agents.detach(agentDefinitionId, instruction.id)

How it runs

At run time, every enabled instruction attached to the agent's blueprint is prepended to the system prompt, ordered by priority (lowest first). Disabled instructions stay attached but are skipped. Set enabled: false to turn one off without detaching it.

SDK methods

theazo.instructions.create(opts)InstructionCreate an instruction.
theazo.instructions.list()Instruction[]List all instructions on the platform.
theazo.instructions.get(id)InstructionFetch one by id.
theazo.instructions.update(id, opts)InstructionUpdate fields (name, body, priority, enabled).
theazo.instructions.delete(id)voidDelete. Blocked (409) if still attached — detach first.

See also: Skills, Prompts, Hooks.

Was this page helpful?