Integration Methods
AI Gateway
Use the AI Gateway for unified access to all providers with automatic fallbacks.
Proxy Integration
Route LangChain requests through Helicone’s proxy.
Async Logging
Zero-latency logging using OpenLLMetry.
Custom Headers
Add Helicone headers to existing LangChain applications.
Quick Start
Using the AI Gateway
The AI Gateway provides a unified interface for all providers:Chains
Track LangChain chains with full visibility:Agents
Monitor LangChain agents and tool usage:- All LLM calls
- Tool invocations
- Intermediate steps
- Total cost and latency
Retrieval (RAG)
Track RAG pipelines with custom properties:Session Tracking
Track multi-step LangChain workflows:Custom Properties
Add context to your LangChain requests:Streaming
Helicone supports LangChain streaming:Anthropic with LangChain
Use Anthropic Claude with LangChain:Zero-Latency Integration
For production applications, use async logging:Best Practices
Use session IDs for multi-step workflows
Use session IDs for multi-step workflows
Track complete workflows with session IDs:
Add custom properties for filtering
Add custom properties for filtering
Use custom properties to organize requests:
Track tool usage
Track tool usage
Label agent tool calls:
Monitor embeddings separately
Monitor embeddings separately
Track embedding and completion costs separately:
Python Examples
Basic Usage
Chains in Python
Troubleshooting
Requests not appearing in dashboard
Requests not appearing in dashboard
- Verify your Helicone API key is correct
- Check the
Helicone-Authheader format:Bearer sk-helicone-... - Ensure you’re using the correct base URL
- Check that
defaultHeadersis in theconfigurationobject
Session tracking not working
Session tracking not working
- Ensure you’re using the same session ID across requests
- Session IDs must be UUIDs or unique strings
- Include
Helicone-Session-Idin every request of the session
Headers not being sent
Headers not being sent
In LangChain, headers must be in the
configuration object:Next Steps
AI Gateway
Use multiple providers with automatic fallbacks
Session Tracking
Track complex workflows
Async Logging
Zero-latency integration
Custom Properties
Add custom metadata
