Skip to main content

Agents

An agent in Foil represents a distinct AI component or workflow in your application. Use agents to organize traces, configure alerts, and view metrics by logical unit.

What is an Agent?

An agent could be:
  • A customer support chatbot
  • A code review assistant
  • A document analyzer
  • A research agent
  • Any distinct AI-powered feature
Each agent has its own:
  • Trace history
  • Alert configuration
  • Analytics dashboard
  • Performance metrics

Creating Agents

Agents are created automatically when you specify an agentName:
Or create explicitly via API:

Agent Configuration

In the Dashboard

Configure agents in the Foil dashboard under Agents:
  1. Name & Description - Identify the agent
  2. Alert Settings - Enable/disable alert types
  3. Thresholds - Set custom thresholds for this agent
  4. Notification Contacts - Who gets alerted

Via API

Agent Metrics

Each agent tracks:

Organizing by Agent

Single Application, Multiple Agents

Environment-Based Naming

Version Tracking

Filtering by Agent

Dashboard

Use the agent dropdown to filter:
  • Traces
  • Alerts
  • Analytics
  • Signals

API

Multi-Agent Workflows

When agents collaborate, link them via traces:

Best Practices

Names should clearly identify the agent’s purpose:
  • customer-support not agent1
  • code-review-assistant not cra
Don’t mix different functionalities in one agent. Create separate agents for distinct workflows.
Different agents may need different alert thresholds. A code review agent might tolerate higher latency than a chatbot.
Include version information in trace properties to correlate performance with deployments.

Next Steps

Agent Profiles

Behavioral baselines that improve evaluations

Alerting

Configure agent alerts

Analytics

View agent metrics