Overview
Instructions are the most important part of an Agent. They define how the Agent behaves, what it should do, and how it should approach the task. You can write them manually or use Write with AI to generate a starting point. In general, specificity improves results. Clear goals, step-by-step guidance, relevant context, and explicit references to tools or documents all help the Agent perform more reliably.Key Concepts
Purpose
Start by clearly describing what the Agent is meant to do.Step-by-Step Guidance
Break the workflow into numbered steps. This makes the Agent’s process easier to follow and improves consistency.References to the Right Context
You can point the Agent to specific Documents, Integrations, Tools, or other Agents. For example, you might ask it to review a specific document in one step, check HubSpot in another, or call another Agent as part of the workflow. To insert these references, type the@ character in the instructions field or click the insert icon.
To add a subagent, select an Agent from that menu. See Delegating to subagents below for details.
Variables for Reusable Workflows
Use{{ }} to define variables the user fills in when running the Agent, such as {{Customer}} or {{Deal}}. This is useful for reusable workflows like a Customer Health Agent, where the Agent can run against any company based on the input provided.
Delegating to subagents
An Agent can hand off a focused task to another Agent, called a subagent. The subagent runs on its own, with its own instructions, knowledge, and tools, and returns a summary of what it found or did. This keeps the main Agent’s workflow simple and lets you reuse specialists you have already built.Add a subagent
In the instructions field, type@ (or click the insert icon) and select an Agent. The Agents you select are the ones this Agent is allowed to delegate to. Reference the subagent in the step where it should run.
When to delegate
- Reuse a specialist: Build one Agent that does a job well, such as deep CRM research or competitor analysis, and call it from higher-level Agents instead of duplicating the logic.
- Split independent work: Break a large task into focused subtasks the Agent can run separately, such as researching several accounts.
- Keep context focused: Push noisy retrieval into a subagent and get back only the summary, so the main Agent stays focused on the final output.
Write clear delegation steps
A subagent does not see the full conversation or the parent Agent’s context, so give it a self-contained task.- State exactly what to find or produce, and what to return.
- Keep each delegated task focused and independent so it can run on its own.
- Delegate to a few focused Agents rather than chaining many; deep chains of subagents are slower and harder to follow.
Best Practices
Be Clear and Specific
Be Clear and Specific
Provide specific objectives and detailed instructions. Longer prompts with relevant context outperform short queries.
Provide Context
Provide Context
Supply sufficient background information. Modern AI models can process complex information effectively.
Structure Logically
Structure Logically
Follow a logical order: role assignment, tone setting, background information, detailed task description with rules.
Include Examples
Include Examples
Show, don’t just tell. Examples of desired outputs work better than descriptions of what you want.
Define a Persona
Define a Persona
Always define a persona to set the tone of the response. This guides how the model communicates.
Address Edge Cases
Address Edge Cases
Provide instructions for handling unusual situations. Focus on base cases first, then add edge case handling.
Test and Iterate
Test and Iterate
Evaluate prompts under various scenarios and refine based on results. Prompt engineering is an iterative process.
Example Instruction Structure
Create Instructions with AI
Ask the LLM in Realm to create instructions for you:1
Open Chat
Start a new chat session.
2
Select an LLM
Choose Claude, Gemini, or GPT.
3
Describe Your Task
Explain what you want the Agent to accomplish.
4
Get a Prompt
The AI will generate an optimized prompt for you.
Modern LLMs excel at creating effective prompts for themselves or other models, often producing better results than manually crafted prompts.
Common Mistakes to Avoid
Next Steps
Knowledge Selection
Configure what knowledge your Agent can access
Tools & Actions
Enable your Agent to take actions in external systems

