Installation
Install and configure the Risicare SDK.
This guide covers installation and basic configuration of the Risicare SDK.
Requirements
Python
- Python: 3.10 or higher
- Operating System: Linux, macOS, or Windows
- Network: Outbound HTTPS to
app.risicare.ai
JavaScript/TypeScript
- Node.js: 18.0.0 or higher
- Operating System: Linux, macOS, or Windows
- Network: Outbound HTTPS to
app.risicare.ai
Minimum runtime versions
Python SDK requires Python 3.10+ (uses match statements and modern typing features). JavaScript SDK requires Node.js 18+ (uses native fetch and crypto.randomUUID). Older runtimes will fail at import time.
Install the SDK
Framework Extras (Python)
Install with framework-specific extras:
# LangChain
pip install risicare[langchain]
# LangGraph
pip install risicare[langgraph]
# LlamaIndex
pip install risicare[llamaindex]
# CrewAI
pip install risicare[crewai]
# AutoGen
pip install risicare[autogen]
# OpenAI Agents SDK
pip install risicare[openai-agents]
# DSPy
pip install risicare[dspy]
# Instructor
pip install risicare[instructor]
# LiteLLM
pip install risicare[litellm]
# Pydantic AI
pip install risicare[pydantic-ai]
# All frameworks
pip install risicare[frameworks]
# All frameworks + all providers + OpenTelemetry
pip install risicare[all]Provider Extras (Python)
Install with provider-specific extras to pull in the correct dependency versions:
# Amazon Bedrock
pip install risicare[bedrock]
# Google Vertex AI
pip install risicare[vertexai]
# Groq
pip install risicare[groq]
# Ollama
pip install risicare[ollama]
# Together AI
pip install risicare[together]
# Cerebras
pip install risicare[cerebras]
# HuggingFace
pip install risicare[huggingface]
# All providers
pip install risicare[providers]Core providers
OpenAI and Anthropic are auto-detected and do not require an extra. Just install them alongside Risicare: pip install risicare openai anthropic.
OpenTelemetry Extra (Python)
Bridge Risicare spans to an OpenTelemetry-compatible backend:
pip install risicare[otel]This installs opentelemetry-sdk and opentelemetry-api (>= 1.20.0). Enable the bridge with otel_bridge=True in risicare.init().
Meta Extras (Python)
Combine multiple extras with a single install:
| Extra | Includes |
|---|---|
frameworks | All 10 framework extras (langchain, langgraph, crewai, autogen, openai-agents, instructor, litellm, dspy, pydantic-ai, llamaindex) |
providers | All 7 provider extras (bedrock, vertexai, groq, ollama, together, cerebras, huggingface) |
all | All framework extras + all provider extras + otel |
# Everything
pip install risicare[all]Get an API Key
- Sign up at app.risicare.ai
- A default project and API key are created automatically on first sign-in
- Go to Settings → API Keys to view and copy your key (starts with
rsk-) - Need more projects? Click the project dropdown → "+ New Project" — each project gets its own key
Keep your API key secret
Never commit your API key to version control. Use environment variables or a secrets manager.
Configuration
Environment Variables
The simplest configuration uses environment variables:
# Required
export RISICARE_API_KEY=rsk-your-api-key
# Optional
export RISICARE_TRACING=true # Enable tracing
export RISICARE_ENVIRONMENT=production # Environment name
export RISICARE_SERVICE_NAME=my-agent # Service name for filtering
export RISICARE_SERVICE_VERSION=1.0.0 # Service version
export RISICARE_SAMPLE_RATE=1.0 # Sampling rate (0.0-1.0)
export RISICARE_TRACE_CONTENT=true # Capture prompt/completion textProgrammatic Configuration
For more control, initialize explicitly:
Configuration Precedence
Configuration is resolved in this order (later overrides earlier):
- Default values
- Environment variables
risicare.init()arguments
Verify Installation
Test that the SDK is working:
import risicare
# Initialize
risicare.init()
# Create a test trace
tracer = risicare.get_tracer()
span = tracer.start_span("test-span")
span.set_attribute("test", True)
span.end()
print("Risicare is working!")
# Ensure spans are exported
risicare.shutdown()Check the dashboard to see your test span.
Framework Integrations
Frameworks are auto-instrumented when risicare.init() is called. Just install the framework package alongside Risicare:
# LangChain / LangGraph
pip install risicare langchain langgraph
# CrewAI
pip install risicare crewai
# AutoGen
pip install risicare autogen-agentchatNo separate integration packages are needed — risicare.init() detects installed frameworks automatically via import hooks.
Troubleshooting
No traces appearing
- Verify your API key is set correctly
- Check
RISICARE_TRACING=trueis set - Ensure
risicare.shutdown()is called (or use a context manager) - Check for network connectivity to
app.risicare.ai
Import errors
Make sure you have the correct Python version:
python --version # Should be 3.10+Debug mode
Enable debug logging to see what's happening:
import risicare
risicare.init(debug=True)Or set the environment variable:
export RISICARE_DEBUG=trueIDE Integration
Risicare provides an MCP server for AI coding assistants. Query your traces, sessions, and agent performance directly from your editor.
See the MCP Server reference for setup instructions for Claude Code, Cursor, and other MCP-compatible tools.