Skip to main content
GitHub

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:

ExtraIncludes
frameworksAll 10 framework extras (langchain, langgraph, crewai, autogen, openai-agents, instructor, litellm, dspy, pydantic-ai, llamaindex)
providersAll 7 provider extras (bedrock, vertexai, groq, ollama, together, cerebras, huggingface)
allAll framework extras + all provider extras + otel
# Everything
pip install risicare[all]

Get an API Key

  1. Sign up at app.risicare.ai
  2. A default project and API key are created automatically on first sign-in
  3. Go to Settings → API Keys to view and copy your key (starts with rsk-)
  4. 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 text

Programmatic Configuration

For more control, initialize explicitly:

Configuration Precedence

Configuration is resolved in this order (later overrides earlier):

  1. Default values
  2. Environment variables
  3. 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-agentchat

No separate integration packages are needed — risicare.init() detects installed frameworks automatically via import hooks.

Troubleshooting

No traces appearing

  1. Verify your API key is set correctly
  2. Check RISICARE_TRACING=true is set
  3. Ensure risicare.shutdown() is called (or use a context manager)
  4. 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=true

IDE 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.

Next Steps