Skip to main content

Building Blocks

Building blocks are reusable prompt components that can be shared across multiple agents. They help maintain consistency, reduce duplication, and make updates easier—when you need to change something, you update it in one place and every agent using that block gets the update automatically.

What are Building Blocks?

A building block is a piece of prompt text that you can reference in any agent's system or user prompt. When the agent runs, the building block reference is replaced with its actual content. This means you can write common instructions, policies, or guidelines once and reuse them across your entire organization.

For example, you might create a building block containing your company's standard customer service guidelines, then reference it in every customer-facing agent. When those guidelines change, you update the single building block rather than editing dozens of agents individually.

Creating a Building Block

To create a new building block, open the Building Blocks sidebar in the template editor and click New Building Block. Give your block a descriptive name that makes it easy to find later, add a description explaining what the block contains and when to use it, then write the actual prompt content.

Using Building Blocks

When you create a building block, the system generates a unique reference ID. To use a block in your prompts, simply click on it in the sidebar—the reference is inserted automatically. These references look like {{@...}} and you never need to type or remember them manually.

Here's what a prompt using building blocks might look like:

You are a customer support agent.

{{@block_abc123}}

When responding to customers:
{{@block_def456}}

{{@block_ghi789}}

Each reference gets replaced with the actual block content when the agent runs.

Nesting Building Blocks

Building blocks can reference other building blocks, allowing you to create hierarchies of reusable content. This is useful when you have modular content that builds on other content—for example, a "full response guidelines" block that includes separate blocks for tone, formatting, and compliance requirements.

To nest blocks, simply insert one block's reference inside another block's content. The system supports nesting up to 25 levels deep and automatically detects circular references to prevent infinite loops.

Best Practices

The most useful building blocks are focused on a single purpose. Rather than creating one massive block containing all your company policies, response formats, and guidelines lumped together, create separate blocks for each concern. This makes them easier to maintain and lets you mix and match them as needed across different agents.

Good documentation makes blocks easier to use. Take advantage of the description field to explain what the block contains, when it should be used, and whether it depends on other blocks. Your future self—and your teammates—will thank you when they're trying to figure out which block to use six months from now.

Managing Building Blocks

Before making changes to a building block, you'll often want to know which agents are using it. Click the View Usage action on any block to see a list of all agents that reference it. This helps you understand the impact of any updates you're about to make.

When you update a building block, every agent using it automatically gets the new content. The changes take effect on new conversations—existing conversations continue with whatever content they started with, so you don't have to worry about mid-conversation surprises.

If you have blocks that are no longer needed, you can archive them to keep your main list clean. Archived blocks don't appear in the sidebar but aren't deleted—you can restore them later if you need them again.

Error Handling

If you reference a block that no longer exists—perhaps it was deleted or archived—you'll see a warning in the editor. Check whether the block still exists and restore it if needed, or remove the reference from your prompt.

When blocks reference each other in a loop (A references B, which references A), the system detects this circular reference and reports it. You'll need to restructure your blocks to break the cycle before your agent can run properly.