> ## Documentation Index
> Fetch the complete documentation index at: https://docs.contextual.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Composer Overview

> Build custom agent workflows with Agent Composer

## Description

Agent Composer is a framework that allows you to compose custom query path implementations using pre-made building blocks. By combining primitives such as search tools, third-party API/MCP tools, and various LLMs, you can construct arbitrary computational graphs and configure them to build specialized agents.

<Note>
  Template agents (Basic Search and Agentic Search) are available for self-serve users. Full Agent Composer capabilities—including the visual workflow builder for custom workflows, YAML customization, and the prompt-based workflow generator—are available in public preview for enterprise users.
</Note>

<Card title="Read the launch announcement" icon="newspaper" href="https://contextual.ai/blog/introducing-agent-composer">
  Learn how Agent Composer reduces complex technical tasks from hours to minutes.
</Card>

## Two Ways to Build

The framework offers two ways to construct workflows:

1. **YAML Configuration**: Specify a YAML with a specific format describing the graph and its configuration. Enter this YAML in the "Agent Composer" tab during agent creation.

2. **Visual Workflow Builder**: Use the visual frontend builder, which internally translates to YAML.

## Key Concepts

| Concept               | Description                                                           |
| --------------------- | --------------------------------------------------------------------- |
| **Nodes**             | Basic operations in the graph (search, generate, transform, etc.)     |
| **Input Mapping**     | How nodes connect to each other using `source_node#output_key` syntax |
| **Config**            | Configuration parameters passed to step constructors                  |
| **Subgraphs**         | Reusable components that can be referenced in larger workflows        |
| **Conditional Nodes** | Execute different paths based on runtime conditions                   |
| **UI Stream Types**   | Control what data streams to the UI during execution                  |

## Example: Minimal Agent

```yaml theme={null}
version: 0.1
inputs:
  query: str

outputs:
  response: str

nodes:
  search:
    type: SearchUnstructuredDataStep
    input_mapping:
      query: __inputs__#query

  generate:
    type: ResponseGenerationStep
    input_mapping:
      query: __inputs__#query
      retrievals: search#retrievals

  __outputs__:
    type: output
    input_mapping:
      response: generate#response
```

This minimal example:

* Accepts a `query` string as input
* Searches the datastore for relevant documents
* Generates a response based on the query and retrieved documents
* Returns the response as output

## Related

* [YAML Format Reference](/reference/ac-yaml-format)
* [Input Mapping](/reference/ac-input-mapping)
* [Agentic Workflows](/reference/ac-agentic-workflows)
* [Step Reference Catalog](/how-to-guides/ac-yaml-reference)
