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 metrxfrom 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.contentSet environment variable:
export METRX_API_KEY=al_your_api_keyOption B: TypeScript SDK
npm install @metrxbot/sdkimport { 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
- Go to the onboarding flow
- Click “Set up with AI IDE”
- Select your IDE (Claude Code, Cursor, Windsurf, Gemini, etc.)
- Copy the generated prompt
- Paste into your IDE’s AI assistant for guided setup
Step 4: Verify Connection
Send a test request using your chosen method. Then:
- Open your Metrx dashboard at app.metrxbot.com
- Navigate to Events tab
- You should see your test request within seconds
- Click on it to view costs, latency, tokens, and model details
Step 5: Set Up Budgets (Optional)
Prevent unexpected costs with spending limits:
- Go to Settings → Budgets
- Click Create Budget
- Set:
- Period: Daily or Monthly
- Limit: Your maximum spend
- Enforcement Mode:
alert_only: warnings onlysoft_block: flag but allow requestshard_block: reject requests
- Apply to an agent or your entire organization
Step 6: Configure Alerts (Optional)
Get notified of important events:
- Go to Settings → Alerts
- Select channels: Email, Slack, Telegram, or Webhook
- 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)
- 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 Settings → Team 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.