Agent workflows

AI
Recipes

Explore common agent recipes with ready to copy code to improve your LLM applications.

Autonomous Agent

AgentLoops

Agent

Self-directed agents plan, act, and observe to reach objectives.

Evaluator-Optimizer

WorkflowLoops

Workflow

Generator and evaluator models refine outputs through feedback loops.

Orchestrator-Workers

Workflow

Workflow

A central orchestrator delegates subtasks to specialized workers.

Parallelization

Workflow

Workflow

Run multiple LLM calls in parallel to reduce total latency.

Prompt Chaining

Workflow

Workflow

LLM calls are sequenced with conditional branching to refine outputs.

Retrieval-Augmented Generation

RAGKnowledge

Knowledge

Ground LLM responses in external knowledge bases for accurate, up-to-date answers.

Routing

WorkflowLow latency

Workflow

Route incoming requests to specialized services based on intent.

Self-Critique

ReflectionEvaluation

Reflection

Enable agents to evaluate and improve their own outputs through structured self-reflection.

Tool Calling

Tool UseFunction Calling

Capability

Enable LLMs to invoke external tools, APIs, and functions dynamically.