Skip to main content

Agent Builder

The Agent Builder lets you create custom AI agents with precise control over what they do, how they reason, and what constraints they operate within. Every agent is defined by a declarative specification that covers four areas: Identity, Capabilities, Behavior, and Guard Rails.

Navigate to AI > Agent Builder to open the visual editor, or define agents programmatically using YAML specifications.


Agent Specification

Identity

Identity defines who the agent is and what it aims to accomplish.

FieldDescriptionExample
NameHuman-readable agent name.revenue-analyst
VersionSemantic version string.1.2.0
DescriptionSummary of the agent's purpose.Analyzes quarterly revenue trends and generates executive summaries.
GoalsList of objectives the agent pursues.["Compute quarterly revenue by region", "Identify top growth segments"]
Success CriteriaMeasurable conditions for a successful run.["Output contains revenue_by_region table", "Report generated in under 60s"]
identity:
name: revenue-analyst
version: 1.2.0
description: Analyzes quarterly revenue trends and generates executive summaries.
goals:
- Compute quarterly revenue by region
- Identify top growth segments
- Generate executive summary report
success_criteria:
- Output contains revenue_by_region table
- Report generated in under 60 seconds

Capabilities

Capabilities define the tools, data sources, and output formats available to the agent.

Tools

ToolDescriptionInputOutput
queryExecute PRQL or SQL queries against connected data sources.PRQL/SQL string, datasource IDTable results
searchSemantic search across data catalog metadata.Search query stringMatching tables, columns, descriptions
llmCall the tenant's configured LLM for reasoning or generation.Prompt string, parametersText response
visionAnalyze images using GPT-4 Vision.Image URL or base64Text description, structured data
web_searchSearch the web for external information.Search querySearch results with URLs and snippets
web_fetchFetch and parse content from a URL.URLPage content as text or markdown
vision_extractionExtract structured data from documents using GPT-4 Vision.Document file, extraction schemaStructured JSON
http_apiMake HTTP requests to external APIs.Method, URL, headers, bodyHTTP response
emailSend email notifications or retrieve email content.Recipients, subject, bodyDelivery status
ftpUpload or download files from FTP/SFTP servers.Host, path, credentialsFile content or transfer status
csvParse or generate CSV files.File path or data arrayParsed rows or file path
jsonParse, transform, or generate JSON documents.JSON string or objectTransformed JSON
markdownGenerate formatted markdown documents.Content structureMarkdown string

Data Sources

You specify which connected data sources the agent can access. The agent can only query data sources listed in its specification, and all queries are further restricted by ABAC policies.

Output Formats

Define the formats the agent produces: text, json, markdown, table, or any combination.

capabilities:
tools:
- query
- llm
- csv
- markdown
data_sources:
- datasource: sales_warehouse
permissions: read
- datasource: crm_database
permissions: read
output_formats:
- markdown
- table

Behavior

Behavior controls how the agent reasons, executes, and remembers context.

Execution Mode

ModeDescriptionBest For
SequentialSteps execute one after another. Each step's output is available to the next.Linear analysis pipelines, step-by-step reasoning.
ParallelIndependent steps execute simultaneously.Data gathering from multiple sources, batch processing.
HybridCombines sequential and parallel execution. Groups of parallel steps feed into sequential stages.Complex workflows that benefit from both patterns.

Reasoning Strategy

StrategyDescriptionBest For
Step-by-stepThe agent reasons through the problem one step at a time, building on each conclusion.Analytical tasks requiring logical progression.
Parallel explorationThe agent explores multiple approaches simultaneously and selects the best result.Open-ended questions with multiple valid approaches.
Hypothesis-drivenThe agent forms a hypothesis, tests it against data, and refines iteratively.Investigative analysis, anomaly detection.
Depth-firstThe agent pursues one line of inquiry deeply before considering alternatives.Detailed root cause analysis.
Breadth-firstThe agent surveys all options at a high level before diving into any single path.Exploratory analysis, option comparison.

Retry Policy

Configure how the agent handles failures:

behavior:
execution_mode: hybrid
reasoning_strategy: hypothesis-driven
retry_policy:
max_retries: 3
backoff: exponential
initial_delay_ms: 1000
memory:
type: hybrid
short_term:
max_turns: 20
long_term:
storage: tenant_memory_store
ttl_days: 30

Memory

Memory TypeDescriptionPersistence
Short-termContext from the current execution. Includes step outputs and intermediate results.Current run only.
Long-termPersisted knowledge from previous runs. The agent can recall past findings.Configurable TTL.
HybridCombines short-term and long-term. The agent uses current context and historical knowledge.Both scopes.

Guard Rails

Guard rails constrain the agent's behavior to keep it safe, efficient, and compliant.

Resource Limits

ResourceDescriptionDefaultMaximum
TokensTotal LLM tokens (input + output) per run.50,000500,000
MemoryWorking memory allocation per run.256 MB2 GB
CPUCPU time limit per run.60 s600 s
API callsMaximum external API calls per run.50500

Constraints

ConstraintDescription
PII filteringScrub personally identifiable information before sending data to an LLM. Configurable patterns and entity types.
SQL injection preventionAll generated queries pass through parameterized validation. Agents cannot execute raw, unvalidated SQL.
Approval requirementsRequire human approval before executing specific tools (e.g., email, http_api) or when token usage exceeds a threshold.
Data source restrictionsLimit the agent to specific data sources, schemas, or tables.
Output redactionAutomatically redact sensitive values in agent output.
guard_rails:
resource_limits:
max_tokens: 100000
max_memory_mb: 512
max_cpu_seconds: 120
max_api_calls: 100
constraints:
pii_filtering:
enabled: true
entities: [email, phone, ssn, credit_card]
sql_injection_prevention: true
approval_required:
tools: [email, http_api]
token_threshold: 80000

Testing

The Agent Builder includes a built-in testing environment where you can validate your agent before publishing.

Test Runs

  1. Click Test in the builder toolbar.
  2. Provide sample input parameters.
  3. The agent executes in a sandboxed environment with full logging.
  4. Review each step: the reasoning, tool calls, intermediate results, and final output.
  5. Inspect token usage, execution time, and resource consumption.

Assertions

Define assertions that automatically validate test run output:

tests:
- name: revenue_report_generates
input:
quarter: Q3
year: 2025
assertions:
- output.format == "markdown"
- output.contains("Revenue by Region")
- execution_time_ms < 60000
Test with Realistic Data

Test runs execute against your real data sources (with your access policies applied). This ensures the agent behaves correctly with production schemas and data volumes, not just mock data.


Monitoring

After publishing an agent, monitor its health and performance from AI > Agent Monitoring.

MetricDescription
Run countTotal runs over a selected time period.
Success ratePercentage of runs that completed successfully.
Average durationMean execution time across runs.
Token usageAverage and peak token consumption per run.
Error ratePercentage of runs that failed, grouped by error type.
Resource utilizationCPU, memory, and API call usage relative to configured limits.
Resource Alerts

When an agent consistently approaches its resource limits (above 80% utilization), consider increasing the limits or optimizing the agent's reasoning strategy to reduce token consumption.


Next Steps