Skip to main content
Helicone OSS LLM Observability

Claude Agent SDK Integration

Use Helicone AI Gateway with the Claude Agent SDK for building AI agents with automatic observability
2 min read

Introduction#

The Claude Agent SDK allows you to build powerful AI agents that can use tools and make decisions autonomously.

Note

This integration uses Helicone's Model Context Protocol (MCP) to provide seamless AI Gateway access to your Claude agents.

Integration Steps#

Create an account and generate an API key

Sign up at helicone.ai and generate an API key.

Make sure to have some credits available in your Helicone account to make requests (or BYOK).

Install the Helicone MCP Package

Configure MCP Server in Your Application

Add to your Claude Desktop configuration:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

The Helicone MCP tools will be automatically available in Claude Desktop.

Test the Integration

The agent will automatically use the use_ai_gateway tool to make the request through Helicone AI Gateway.

Available MCP Tools#

use_ai_gateway#

Make requests to any LLM provider through Helicone AI Gateway with automatic observability.

Parameters:

  • model (required): Model name (e.g., gpt-4o, claude-sonnet-4, gemini-2.0-flash - see Supported Models for more)
  • messages (required): Array of conversation messages
  • max_tokens (optional): Maximum tokens to generate
  • temperature (optional): Response randomness (0-2)
  • sessionId (optional): Session ID for request grouping
  • sessionName (optional): Human-readable session name
  • userId (optional): User identifier for tracking
  • customProperties (optional): Custom metadata for filtering

query_requests#

Query historical requests for debugging and analysis with filters, pagination, and sorting.

query_sessions#

Query conversation sessions with filtering, search, and time range capabilities.

Complete Working Examples#

Basic Agent with Session Tracking#

Multi-Model Comparison#

Self-Analyzing Agent#

Next Steps#