Skip to main content

Overview

The Agents in BlinkOps enable teams to build automation-ready AI agents tailored to their unique roles, environments, and organizational policies. Following the best practices in this guide will help ensure your agents behave consistently, securely, and predictably while delivering reliable outcomes at scale. This guide provides practical recommendations for designing production-ready AI agents in BlinkOps. It covers every stage of agent development, including
  1. Agent Instructions – Crafting Roles & Constraints
  2. Abilities (Tools) & Handling Large Outputs
  3. Knowledge Base (RAG) vs. Direct Context Injection
  4. Agent Role vs. Agent Task
Whether you are building a new agent or improving an existing one, these best practices will help you create agents that are scalable, maintainable, and optimized for real-world security automation.

1. Agent Instructions – Crafting Roles & Constraints

Ensure that agentic prompts are written as modular code blocks rather than prose, guaranteeing predictable runtime execution and seamless integration into larger Blink playbooks.

1.2 Agent Roles- The Core Guardrails for Prompts

Rule 1: Use Structured XML Tags for Section Boundaries Models powering advanced agentic security thrive on structural syntax. Avoid mixing behavioral rules with role definitions or leaving instructions floating as loose paragraphs. Wrap every logical block in named XML tags. This creates clear semantic boundaries and prevents instruction bleeding. Example: Use the schema below for custom agents built in Blink.

Rule 2: Shape the Reasoning with a <behavior> Block A <behavior> block is what separates an agent that technically answers correctly from one that consistently reasons the right way in high-pressure security situations. Use it to explicitly define the agent’s tone, evidence threshold, output verbosity, and how it handles ambiguity or gaps in data.
  • Do not just say “be accurate.” Define the evidence-driven threshold.
  • Enforce negative constraints explicitly (e.g., forbidding speculation on attribution without specific indicators).
Example:

Rule 3: Implement a <quality_bar> as Part of the Agent Constraints The <quality_bar> is a self-verification checklist that the agent evaluates before finalizing its output payload. It can catch missing tool calls and formatting errors before they ever reach an end user.
  • Write items as binary pass/fail conditions.
  • Mirror constraints: if a tool call or rule is mandatory elsewhere in the prompt, it must have a matching verification item in the quality bar.
  • Placement: Always place the <quality_bar> tag at the end of the “Constraints” field so it executes last.
Example:

Rule 4: Use Booleans or Star Scales for Structuring LLM Decisions When an agent is responsible for risk scoring, alert classification, or tier ranking, never rely on the LLM to do “mental math” (e.g., multiplying numbers or calculating formulas) or natural “vibe” checks. LLMs cannot guarantee implicit mathematical logic. Instead, force the LLM to evaluate specific, deterministic criteria using Booleans (True/False) or a strictly defined 1–5 Star Scale. Any final score composition, math, or complex branching logic should be handled downstream in Blink Automation steps or Python code. Recommended: The Boolean Checklist Approach The most reliable way to score with an LLM is to ask for a series of True/False assessments, then calculate the final score outside the LLM. Example:
Pass these boolean outputs into a Blink Automation or Python step to calculate the final tier (e.g., if 3 or more are TRUE, escalate to Critical). Alternative: The Explicit 1–5 Star Scale If you cannot use booleans, use a 1–5 scale where every single tier is explicitly and rigidly defined. Do not let the LLM guess what a “3” means. Example:

1.2 Agent Task: Inputs & Runtime Constraints

Rule 5: Inject Dynamic Context via <additional_constraints> When an execution requires dynamic validation data that changes on every run (e.g., dynamic allowed closing reasons, authorized asset lists, user risk scores), do not hardcode them into the global prompt. Use the runtime dynamic constraints field. The injected content must mirror the XML structure to seamlessly bind with the base prompt logic: Example:

1.3 Agent Task: Output Schemas

Rule 6: Define Output Schemas as Annotated JSON Examples To guarantee predictable hand-offs to downstream tables, dashboards, and automated case management systems, the output format must be zero-ambiguity JSON. Important notes:
  • Do not use type names (like "string", "int", or "float") or descriptive ranges (like "0-100") inside your example values. The schema builder interprets your values literally — if you write "float", the system will expect a literal text string of "float". Instead, use actual, valid sample data to dictate the type.
  • Don’t stress too much about strict string-to-number validation for downstream steps. Blink includes built-in type coercion: if the LLM outputs a number wrapped as a string (like "36.5" or "0"), Blink will automatically convert it to a true number when passing it into the next automation input.
Key guidelines:
  • Strings: Provide a realistic sample text string (e.g., "Suspicious activity detected").
  • Numbers: Provide a literal valid number (e.g., 1 for integers, 3.5 for floats).
  • Enums: Use an explicit, human-readable instruction followed by comma/pipe-separated values (|) to strictly define allowed choices.
  • Include reference to parameters.
Example:

1.4 Modular Prompting with Agent Skills [UPCOMING]

When an agent is augmented with Skills, the core prompt layout must change. If you hardcode tool-specific instructions into the main prompt while dynamically attaching and detaching skills, the agent’s context will become misaligned, leading to execution failures or ignored tools. The Architectural Shift: Monolithic vs. Skill-Based
  • Old Way (Monolithic): The agent prompt contains the role, the behavior, and detailed instructions for every tool it might use.
  • New Way (Skill-Based): The agent prompt contains only the operational kernel (core identity, reasoning standards, and a coordination routing framework). The specific context, constraints, and execution parameters for a capability live inside the Skill definition itself.
Strip Specific Tool References from the Core Prompt Do not mention specific tools or data formats (e.g., “Use the CrowdStrike containment ability”) in the main <role> or <behavior> blocks. Instead, instruct the agent to leverage its active skills catalog dynamically. */}

2. Abilities (Tools) & Handling Large Outputs

Design agent workflows and tool interfaces that execute deterministically, never crash the LLM context window with massive data payloads, and optimize the “Machine-to-Human” hand-off.

2.1 Designing Agent Abilities

When building Blink workflows that expose as “Abilities” (tools) to an agent, you must ensure the agent understands exactly when, why, and how to call them. When an agent evaluates whether to run a workflow, it only receives the Name and Description of the workflow — it does not see the full underlying YAML or configuration. Because of this limited visibility, your metadata must provide absolute clarity for the agent’s routing logic. Important notes:
  • Provide sufficient context: Ensure the name and description explicitly state what the workflow does, what it requires, and when it should be used so the agent can accurately decide if it’s the correct tool for the job.
  • Call out side-effects: If a workflow performs a disruptive or state-changing action (e.g., blocking an IP, disabling a user account, or sending an external notification), you must explicitly state this side-effect in the name or description. This prevents the agent from accidentally triggering high-impact actions during passive analysis.
If an agent’s success depends on running a specific tool, regardless of how the user’s input looks, do not leave it up to the agent’s discretion. Explicitly enforce it by its exact execution name inside a <mandatory_abilities> block, and mirror it as a binary pass/fail condition in your <quality_bar>. Example:
Important Guardrail: While the <mandatory_abilities> block heavily biases the agent to use the tool, LLM orchestration is never 100% guaranteed to trigger it. If your workflow requires absolute, deterministic execution of a tool every single time, do not rely on the agent to make the call. Instead, hardcode that tool execution directly as a native step inside your Blink workflow before or after the agent runs.

2.2 Handling Large Outputs & Context Window Mitigation

The biggest architectural failure mode in agentic SecOps is letting a tool dump a 50MB firewall log, a massive JSON cloud trail, or a giant vulnerability scan straight into the agent’s context window. This causes token saturation, skyrockets costs, destroys processing speed, and induces model hallucinations. Here are the two mandatory engineering design patterns to handle heavy data processing: Pattern A: Deterministic/Agentic Pre-Filtering Pattern: Never pass raw, unfiltered dumps downstream. Force the tool or an intermediate code block to apply the tightest filter possible before the data hits the agent.
  1. Deterministic filtering:
    • Use optimized platform utilities (JQ or explicit API server-side filtering parameters) to extract only relevant keys or anomalous rows.
    • Always prioritize inputs that fit natural human reasoning over raw system formats. For example, design the tool to accept a human-readable timestamp (e.g., "2026-06-29" or "2 hours ago") rather than a raw Epoch timestamp (e.g., 1782741741). While an LLM can sometimes convert time, it is highly prone to hallucination and mathematical errors when dealing with unix timestamps. It is always better to design the ability to accept clean, readable strings, and handle the necessary technical conversions (like translating text to Epoch) in the very first step of your underlying workflow.
  2. Agent-guided filtering:
    • Turn on ability compaction — it simplifies lengthy or detailed results from the ability, allowing the agent to focus on the most important information. In addition, provide compaction instructions to help the agent decide what’s important in this ability’s results.
    • Let a fast, cheap model parse a subset of lines to isolate the exact timestamps or signatures required before passing the clean block to the core reasoning agent.
Pattern B: Agent-Generated Workflows (Offloaded Execution) Agent-generated workflows are a powerful feature that lets agents move beyond their preconfigured ability list. Instead of relying only on pre-built workflows, the agent can dynamically choose to generate and execute its own Blink workflows, bound to Python and JQ code along with its active abilities as subflows on the fly. By offloading heavy data processing to Blink’s secure, isolated execution engine, the agent can handle massive datasets without cluttering its context window or wasting tokens. Essentially, agents can build their own specialized tools right when they need them. Use cases:
  1. Advanced Math & Analytics (“No Mental Arithmetic”)
    • The problem: When tasked with complex calculations (e.g., Quarter-over-Quarter growth, financial forecasting, or statistical analysis), LLMs often struggle with precision or hallucinate numbers when doing math “in their head.”
    • The solution: The agent extracts the raw data and dynamically generates a Python script to perform the exact calculation. It treats the LLM as the strategist and the Python engine as the calculator, ensuring 100% mathematical accuracy.
  2. High-Volume Data Filtering & Extraction (“Context Slimming”)
    • The problem: A tool returns a massive payload — like thousands of raw log lines or an entire database dump — but the agent only needs a fraction of it. Passing all that data into the agent’s context window blows through tokens and increases cognitive load.
    • The solution: The agent writes a precise JQ query or Python script to filter, slice, and extract only the relevant data points before they hit the context window, keeping the agent lean and fast.
  3. Multi-Source Data Cross-Checking (“Hard Joins”)
    • The problem: Correlating disparate data sets (e.g., joining an IT incident log with office badge-in times and asset owner databases) requires tracking complex relationships that easily overwhelm an LLM’s memory.
    • The solution: Instead of trying to “hold the data in its head,” the agent builds a custom script to programmatically merge and cross-reference the data sources, outputting only the final, correlated insight.
  4. Bulk Execution & Loop Unrolling (“Overcoming Rate Limits”)
    • The problem: An agent has a static ability to perform a single action (e.g., Send Slack Reminder), but it needs to perform that action 100 times. Running 100 consecutive tool calls will hit platform limits, time out, or drain tokens.
    • The solution: The agent adapts by writing a new, bulk-ready ability on the fly (e.g., Send Bulk Slack Reminders). It takes the full list of 100 users as a single input, executes the loop securely in the background, and resolves the task in a single tool call.
  5. High-Volume Templating & Generation (“Heavy Lifting Delegation”)
    • The problem: The user needs a large, heavily structured output where only a small part is dynamic (e.g., a massive HTML email template or a structured JSON payload where only a few variables change). Making the LLM generate the entire static block is a waste of tokens.
    • The solution: The agent crafts the core dynamic content, then writes a quick automation script to inject that content into the larger static template. The agent only “thinks” about the meaningful parts, while the engine handles the boilerplate.

3. Knowledge Base (RAG) vs. Direct Context Injection

Determine whether supporting operational data belongs in a Vector Database (RAG) or injected directly into the active context window.

3.1 The Core Dilemma: Search vs. Certainty

An LLM cannot act on what it cannot see. Automation engineers often assume that uploading a massive 50-page Incident Response (IR) manual into an agent’s Knowledge Base (VectorDB) means the agent “knows” the manual. This is a critical misconception. A VectorDB relies on semantic top-k retrieval (chunking text and pulling the closest matches). It does not guarantee the model reads the entire document, nor does it guarantee it retrieves the correct block of step-by-step instructions when a high-severity alert fires.

3.2 When to Use a Knowledge Base (VectorDB)

A Knowledge Base is designed for supporting information, reference material, and historical lookups. It is not a substitute for the agent’s core operating manual. Ideal use cases:
  • Massive corp data / historical logs: Large repositories of past threat intelligence reports, internal asset vulnerability contexts, or extensive corporate network architecture documentation.
  • Payloads > 15–20KB: High-volume data that would completely bloat the prompt, degrade model performance, and spike runtime token costs if included on every single execution.
If a dataset qualifies for the Knowledge Base, the data must be cleanly structured and curated.
  • Good practice: Well-formatted Markdown is excellent for this.
  • Bad practice: Low-effort “dumps,” such as copy-pasting raw text straight from a website alongside a bunch of unrelated navigation garbage, ads, or footers, will severely degrade embedding quality. Take the time to strip out the noise so the agent only processes highly relevant text.

3.3 When to Avoid a KB: The Case for Direct Context Injection

If the payload size of your instructions, guidelines, or operational rules is less than a few kilobytes (KB), skip the knowledge base entirely. Inject it directly into the prompt context via the <role>, <behavior>, or <additional_constraints> fields. Direct context is mandatory for:
  • The core playbook/manual: The exact, sequential steps an agent must follow during an active incident (e.g., Phishing Triage Guidelines).
  • Deterministic execution: Any instruction where missing a single step or constraint means an operational failure. Direct context guarantees the model processes the rule on every single run.
  • High-context tools: When an LLM evaluates a specific alert and asks itself, “How do I respond to this phishing attempt?”, a KB search might retrieve irrelevant historical phishing files. Direct context instead enforces immediate execution of your designated block_sender tool logic.

3.5 Quick-Reference Framework: VectorDB vs. Direct Context


4. Agent Role vs. Agent Task

Establish a clean separation of concerns between an agent’s compile-time identity (Role) and its runtime execution orders (Task). This helps reduce the odds of prompt drift and enables agent reusability.

4.1 The Separation of Concerns: Static Identity vs. Dynamic Execution

A frequent architectural mistake when deploying agents in Blink is blending who the agent is with what the agent is doing right now. When you hardcode case-specific instructions into the core prompt, you destroy the agent’s reusability and force your team to build a new agent for every single workflow permutation. To build a scalable platform, you must enforce a strict boundary:
  • The Agent Role (the identity): This is the compile-time configuration. It defines the agent’s domain expertise, behavioral constraints, reasoning frameworks, and tool boundaries. It is permanent, generic to the domain, and wrapped in standard XML tags (<role>, <behavior>).
  • The Agent Task (the mission): This is the runtime instantiation. It defines the specific ticket, alert, data artifact, or objective the agent must process during this specific execution cycle. It is transient, injected dynamically.
When constructing the automation pipeline, the core prompt remains pristine and untouched. The specific workflow context is passed dynamically at runtime using the input parameters.
  1. The core agent configuration (the Role) — The prompt template defines the persona and how it processes tasks, using a generalized placeholder to ingest the runtime mission (see Agent Roles for more information).
  2. The runtime injection (the Task)
Example: When a high-severity AWS GuardDuty alert triggers a Blink workflow, the playbook injects the specific case details and the unique atomic goal into the execution block: