> ## 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.

# Quick Start

> Get up and running with Valmi Value in under 5 minutes

This guide will walk you through the complete setup process to send your first meter event, create an agent, set up billing, and generate your first invoice.

## 2.1 Installing the SDK

Install the Valmi Value Python SDK:

```bash theme={null}
pip install valmi-value
```

<Info>
  Python 3.8+ is required. Support for Node.js, Go, and other languages coming soon.
</Info>

## 2.2 Send Your First Meter Event

```python theme={null}
from valmi_value import ValueClient
from langgraph.graph import StateGraph

# Initialize the Value client
value = ValueClient(api_key="your-api-key")

# In your agent workflow
def agent_node(state):
    # Your agent logic here
    result = llm.invoke(state["messages"])
    
    # Send meter event
    value.send_action(
        agent_key="my-langgraph-agent",
        action_type="llm_call",
        metadata={
            "model": "gpt-4",
            "input_tokens": result.usage.prompt_tokens,
            "output_tokens": result.usage.completion_tokens,
            "cost_usd": calculate_cost(result.usage)
        }
    )
    
    return {"messages": result}
```

## 2.3 Create Your First Agent

1. Log in to the [Valmi Value Control Plane](https://cloud.valmi.io)
2. Navigate to **Agents** → **Create Agent**
3. Fill in the agent details:
   * **Name**: My First Agent
   * **Type**: LangGraph Agent
   * **Description**: A simple agent for testing
4. Click **Create**

<Info>
  You'll receive an Agent Key that you'll use in your SDK calls. Keep this secure!
</Info>

## 2.4 Attach Metering to the Agent

1. In the Agent details page, copy the **Agent Key**
2. Update your code to use this key:

```python theme={null}
value = ValueClient(api_key="your-api-key")

value.send_action(
    agent_key="agent_abc123xyz",  # Your agent key
    action_type="llm_call",
    metadata={...}
)
```

3. Events will start appearing in the **Live Data** view within seconds

## 2.5 Set Up a Billing Plan

1. Navigate to **Products** → **Create Product**
2. Create a new product:
   * **Product Name**: AI Agent API
   * **Description**: Pay-per-use AI agent service
3. Create a **Rate Plan**:
   * **Plan Name**: Usage-Based Plan
   * **Pricing Model**: Usage-Based
   * **Charge**: \$0.01 per 1,000 tokens
4. Save the plan

## 2.6 Create an Account + Subscription

1. Go to **Accounts** → **Create Account**
2. Fill in account details:
   * **Account Name**: Acme Corp
   * **Contact Email**: [billing@acme.com](mailto:billing@acme.com)
3. Click **Create Subscription**:
   * Select your product and rate plan
   * Set billing cycle (monthly)
   * Assign the agent instance to this subscription
4. Save the subscription

## 2.7 Generate First Invoice

1. Navigate to **Billing** → **Invoices**
2. Click **Run Invoice** for the current billing period
3. The system will:
   * Aggregate all usage for the period
   * Apply pricing rules
   * Calculate costs and revenue
   * Generate the invoice
4. View and download the invoice PDF

## 2.8 View Revenue & Margin

1. Go to **Profit & Loss** dashboard
2. You'll see:
   * **Revenue**: Total billed amount
   * **Costs**: LLM and infrastructure costs
   * **Margin**: Revenue - Costs
   * **Margin %**: Profitability percentage
3. Filter by agent, customer, or time period

<Success>
  Congratulations! You've successfully set up Valmi Value and generated your first invoice. Explore the [Core Concepts](/concepts/overview) section to learn more about how everything works.
</Success>
