Skip to main content
Agentic Enrich stage showing multi-turn reasoning agent with tool access for document classification
The Agentic Enrich stage uses a multi-turn reasoning agent (default: Claude) that can call tools — taxonomy lookup, example search, and content analysis — to produce high-quality structured classifications for each document.
Stage Category: ENRICH (Enriches documents)Transformation: N documents → N documents (with agent-produced classification added)

When to Use

When NOT to Use

Parameters

Available Tools

The agent has access to three tools, auto-enabled based on configuration:

Configuration Examples

How It Works

For each document, the stage runs a multi-turn agent loop:
  1. Initialize: Agent receives the document content + system prompt + available tools
  2. Reason: Agent analyzes the document and optionally calls tools (taxonomy lookup, example search, content analysis)
  3. Observe: Tool results are fed back to the agent as context
  4. Iterate: Loop continues until the agent produces a final answer (or max_turns/timeout_seconds is reached)
  5. Output: The agent’s structured JSON response is merged into the document at output_field

Output Examples

With Taxonomy + Examples

Simple Classification

Conditional Skip (When Condition)

Documents that don’t match the when condition are passed through unchanged.

Performance

Agentic enrichment makes multiple LLM calls per document. Use the when condition to limit which documents are processed, and keep max_turns low for simple tasks.

Common Pipeline Patterns

Search + Agentic Classify + Filter

Multimodal Analysis Pipeline

Bring Your Own Key (BYOK)

Use your own LLM API keys instead of Mixpeek’s default keys for both the reasoning agent and the analysis provider.
1

Store your API keys as secrets

2

Reference secrets in your stage config

When api_key is not specified, the stage uses Mixpeek’s default API keys and usage is charged to your Mixpeek account.

Stage Metadata

The stage returns execution metadata for observability:

Error Handling

Cost Considerations

Start with max_turns: 3 and increase only if the agent consistently needs more iterations. Most straightforward classifications finish in 2-4 turns.
  • LLM Enrich — Single-shot LLM enrichment (faster, cheaper)
  • Taxonomy Enrich — Vector-based taxonomy matching (no LLM cost)
  • Agent Search — Multi-turn agent for search (different use case)