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

# Routines overview

> Understand the routine types: Clay-managed functions, custom functions, and Workflows.

Routines are the umbrella for programmable Clay logic: enrichment, research, scoring, routing, cleanup, and other repeatable GTM work.

| Routine type                                               | Use it when                                                                            | Status    |
| ---------------------------------------------------------- | -------------------------------------------------------------------------------------- | --------- |
| [Clay-managed functions](/routines/clay-managed-functions) | You want Clay-provided enrichment or research for common jobs                          | Available |
| [Custom functions](/routines/custom-functions)             | You already have Clay logic you want to call from agents, the CLI, MCP, or the API     | Available |
| [Workflows (Alpha)](/routines/workflows-alpha)             | You want to create, edit, run, inspect, or batch-run Clay logic from the plugin or CLI | Alpha     |

<Note>
  **Workflows are in Alpha.** They overlap with functions in what they can execute, but differ in how you build and
  manage them.
</Note>

## How routines are called

Routines can be called from the Clay plugin, CLI, MCP, or direct API integrations.

| Surface     | What it is good for                                                                |
| ----------- | ---------------------------------------------------------------------------------- |
| Clay plugin | Agent workflows in Claude Code, Codex, and Cursor                                  |
| CLI         | JSON-first runs, batch runs, workflow testing, and debugging                       |
| MCP         | Agent access to Clay objects and routines                                          |
| API         | Backend services, internal tools, queue workers, custom UIs, and product workflows |

## First pattern

1. Use [Searches](/searches) to find a list of companies or people.
2. Use a Clay-managed function to enrich the results.
3. Send the structured output to your CRM, warehouse, app, or agent.

<Card title="Run a search, then enrich with a function" href="/recipes/search-and-enrich">
  See the basic search-plus-function flow.
</Card>
