Skip to main content
Think of agents as the workers in your system - each one has a specific job and does it well.

Agent Hierarchy

Anatomy of an Agent

An agent has:
  • Inputs: Parameters it accepts
  • Operation: The type of work it performs (code, think, http, etc.)
  • Handler (for code operations): TypeScript file that implements the logic
  • Outputs: Data it returns

The Handler Pattern

For custom logic, agents use the handler pattern which separates YAML contracts from TypeScript implementation: YAML (Contract) - Declares WHAT the agent does:
TypeScript (Implementation) - Defines HOW it works:
This pattern keeps agents:
  • Testable - Pure TypeScript functions
  • Type-safe - Full TypeScript type checking
  • Debuggable - Standard debugging tools work
  • Maintainable - Clear separation of concerns

Multi-Operation Agent Example

For agents with multiple operations, use YAML flow:

Agent Types

Conductor provides three categories of agents:

1. System Agents

Built-in agents for core infrastructure functionality. Location: agents/system/ Available:
  • redirect - URL redirect service (permanent, expiring, single-use links)
  • docs - Documentation generation and serving
  • fetch - HTTP fetching with caching
  • validate - Data validation with multiple strategies
  • scrape - Web scraping with bot detection
  • slug - Generate URL-safe slugs
  • tools - MCP tools integration
  • queries - SQL query execution

2. Debug Agents

Development utilities for testing and debugging. Location: agents/debug/ Available:
  • echo - Returns input unchanged (inspect data)
  • delay - Add artificial delay (simulate slow operations)
  • inspect-context - View execution context

3. Custom Agents

Agents you build for your specific needs. Location: agents/user/my-agent/ Example: Company enricher, data processor, report generator

4. Pre-built Feature Agents

Ready-made agents for common workflows. Location: Built-in, reference by name Available:
  • scraper - Web scraping
  • validator - Data validation
  • rag - Retrieval-augmented generation
  • hitl - Human-in-the-loop approval
  • fetcher - Smart HTTP fetching
  • transformer - Data transformation
  • scheduler - Task scheduling
See Starter Kit for details.

Using Agents

In Ensembles

Directly via API

Agent Composition

Agents can use other agents:

Versioning Agents

Version agents with Edgit:
Lock to specific versions in ensembles:

Agent Features

State Management

Share state across operations:

Caching

Cache entire agent execution:
Or cache individual operations:

Error Handling

Graceful failure handling:

Agent Patterns

Pattern 1: Data Pipeline

Pattern 2: AI Chain

Pattern 3: API Orchestration

Testing Agents

Using Agents in TypeScript Ensembles

Agents defined in YAML can be used seamlessly in TypeScript ensembles:

Agent Composition Patterns

Compose multiple agents into reusable patterns:
For complete TypeScript API documentation, see the TypeScript API Reference.

Best Practices

  1. Single Responsibility - Each agent does one thing well
  2. Clear Inputs/Outputs - Document what goes in and comes out
  3. Version Agents - Use Edgit for version control
  4. Test Thoroughly - Unit test each agent
  5. Cache Aggressively - Cache expensive operations
  6. Handle Failures - Always have fallbacks
  7. Keep It Declarative - Let Conductor handle orchestration
  8. Monitor Performance - Track execution times

Next Steps

TypeScript API

TypeScript API reference

Ensembles

Orchestrate agents

Starter Kit

Use ready-made agents

Creating Agents

Build custom agents