Quick Start

Metrx Quick Start

Get up and running with Metrx in under 5 minutes.

Step 1: Sign Up

Create your account at app.metrxbot.com:

  • Click Sign Up
  • Use email, Google, or GitHub
  • Verify your email
  • Create your organization

Step 2: Choose a Template (Optional)

When you first log in, Metrx offers template options to jumpstart your setup:

  • Sales automation
  • Marketing analytics
  • Finance tracking
  • Customer support
  • Content generation
  • Data analysis
  • Research assistant
  • Custom (blank slate)

Select one or skip to start from scratch. Templates pre-configure common agent types and dashboards.

Step 3: Connect Your Agent

Choose one of four methods to start tracking LLM calls:

Option A: Python SDK

pip install metrx
from metrx import track
from openai import OpenAI
 
client = OpenAI(api_key="sk_...")
 
@track(agent_id="my-agent")
def analyze_feedback(feedback):
    response = client.chat.completions.create(
        model="gpt-4",
        messages=[{"role": "user", "content": feedback}]
    )
    return response.choices[0].message.content

Set environment variable:

export METRX_API_KEY=al_your_api_key

Option B: TypeScript SDK

npm install @metrxbot/sdk
import { Metrx } from '@metrxbot/sdk';
 
const metrx = new Metrx({
  apiKey: process.env.METRX_API_KEY,
});
 
const response = await metrx.chat.completions.create({
  model: 'gpt-4',
  messages: [{ role: 'user', content: 'Hello!' }],
  agentId: 'my-agent',
});

Option C: Gateway Proxy

Change your LLM client’s base_url to use Metrx as a transparent proxy:

from openai import OpenAI
 
client = OpenAI(
    api_key="al_your_metrx_api_key",
    base_url="https://gateway.metrxbot.com/v1",
    default_headers={
        'X-Provider-Key': 'sk_openai_your_key',
        'X-Agent-ID': 'my-agent',
    }
)
 
response = client.chat.completions.create(
    model="gpt-4",
    messages=[{"role": "user", "content": "Hello!"}]
)

Option D: AI IDE Setup

  1. Go to the onboarding flow
  2. Click “Set up with AI IDE”
  3. Select your IDE (Claude Code, Cursor, Windsurf, Gemini, etc.)
  4. Copy the generated prompt
  5. Paste into your IDE’s AI assistant for guided setup

Step 4: Verify Connection

Send a test request using your chosen method. Then:

  1. Open your Metrx dashboard at app.metrxbot.com
  2. Navigate to Events tab
  3. You should see your test request within seconds
  4. Click on it to view costs, latency, tokens, and model details

Step 5: Set Up Budgets (Optional)

Prevent unexpected costs with spending limits:

  1. Go to SettingsBudgets
  2. Click Create Budget
  3. Set:
    • Period: Daily or Monthly
    • Limit: Your maximum spend
    • Enforcement Mode:
      • alert_only: warnings only
      • soft_block: flag but allow requests
      • hard_block: reject requests
  4. Apply to an agent or your entire organization

Step 6: Configure Alerts (Optional)

Get notified of important events:

  1. Go to SettingsAlerts
  2. Select channels: Email, Slack, Telegram, or Webhook
  3. Enable alert types:
    • Cost spikes (50%+ increase)
    • High error rates (>5%)
    • Usage spikes (2x normal)
    • Idle agents (no calls in 7 days)
    • Budget warnings (80% of limit)
  4. Set thresholds and save

Example: Slack notifications for cost spikes.

Step 7: Explore the Dashboard

The main dashboard shows:

  • Cost Breakdown: By model, agent, day
  • ROI: Business outcomes vs. spending
  • Agent Topology: Network graph of agent interactions
  • Performance Metrics: Latency, error rates, token usage
  • Events Log: Complete history of LLM calls
  • Real-Time Updates: Data refreshes automatically

Step 8: Next Steps

Once your agents are connected, consider:

Log Business Outcomes

Track what matters: conversions, support tickets resolved, leads generated.

@track(agent_id="support-bot")
def handle_support_ticket(ticket):
    response = client.chat.completions.create(...)
 
    # Log outcome
    metrx.outcomes.create({
        session_id=ticket.id,
        name="Support ticket resolved",
        metadata={"satisfaction": 5}
    })

Connect Integrations

Link your CRM, payment processor, or other tools:

  • Stripe (for revenue tracking)
  • Calendly (for appointment data)
  • HubSpot (for sales pipeline)
  • Zapier (for workflows)

Invite Team Members

Go to SettingsTeam and add collaborators to your organization.

Monitor Performance

Use the dashboard to:

  • Compare model efficiency
  • Find your most cost-effective agents
  • Optimize prompts for cheaper models
  • Track trends over time

Need help? See the Integration Guide for detailed examples or the API Reference for endpoint documentation.