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

# Agent Types & Agent Instances

> Understanding agent types and how they're deployed

## Agent Types

An **Agent Type** is a logical definition of an AI service you offer. Think of it as a template that describes what your AI can do.

Agent types come in different flavors:

* **LangGraph Agents** - Built with the LangGraph framework
* **CrewAI Agents** - Multi-agent systems using CrewAI
* **n8n Workflows** - Automated workflows with AI steps
* **Custom Agents** - Any AI application using the SDK

## Agent Instances

An **Agent Instance** is a specific deployment of an agent type. It's where your agent actually runs.

Common instance types:

* **Production** - Live customer-facing deployment
* **Staging** - Testing and development environment
* **Per-Customer** - Dedicated instance for a specific customer
* **Multi-Tenant** - Shared instance serving multiple customers

Each instance gets its own unique **secret token**. You use this token in SDK calls to identify which instance is sending events.

Pricing rules come from products, which are associated with agent types. Each instance tracks usage and costs separately.

### Mapping Secret Tokens to Instances

You configure the secret token when initializing the Value client. Set the `VALUE_AGENT_SECRET` environment variable to your instance's secret token:

```python theme={null}
import os
from value import initialize_async

# Set the secret token via environment variable
os.environ["VALUE_AGENT_SECRET"] = "agent_abc123xyz"

# Initialize the client
value = await initialize_async()
```

Or import ValueClient and pass the secret directly during initialization:

```python theme={null}
from value import ValueClient

value = await ValueClient.initialize_async(secret="agent_abc123xyz")
```

Once configured, the client automatically uses this token for all actions you send. The Control Plane uses this token to:

* Look up the instance
* Attribute usage to that instance
* Track costs for that instance

<Info>
  Secret tokens are credentials. Keep them secure and rotate them periodically.
</Info>
