Skip to main content
Follow these steps to integrate AgentBasis into your application.

1. Initialize the SDK

Start by initializing the SDK with your API key and Agent ID. This usually goes at the top of your main application file.
import agentbasis

# Initialize with your API Key and Agent ID
agentbasis.init(
    api_key="your-api-key-here", 
    agent_id="your-agent-id-here"
)

2. Basic Usage

You can now use decorators to track any function in your code.
from agentbasis import trace

@trace
def chat_with_user(query):
    # Your agent logic here
    return "Response to: " + query

# When you call this, data is automatically sent to AgentBasis
chat_with_user("Hello world")

What’s Next?

Now that you have the SDK initialized, explore how to integrate with your specific tools: