Skip to main content
5 minutes to get up and running. Just 3 lines of code to start tracking.
Follow these steps to integrate AgentBasis into your application.

1. Install the SDK

2. Get Your Credentials

You’ll need two things from the AgentBasis dashboard:
1

API Key

Go to Dashboard → Settings → API Keys and copy your API key.
2

Agent ID

Go to Dashboard → Agents and create a new agent (or select an existing one) to get the Agent ID.

3. Set Environment Variables

Add your credentials to your environment. The SDK will read them automatically.
Load with python-dotenv or your framework’s env loader.

4. Initialize the SDK

Add this at the top of your main application file:

5. Instrument Your LLM

Choose your LLM provider and add one line to start tracking:

6. Track Custom Functions (Optional)

Use the @trace decorator to track any function:

What’s Next?

Core Concepts

Learn about context, sessions, and manual tracing

LangChain

Trace chains, agents, and tools

Pydantic AI

Monitor Pydantic AI agents

API Reference

Complete function reference