Installation
Install and configure the Risicare SDK.
Risicare is in closed beta
Access is by invitation. The link in your invitation email opens the sign-in page — start there rather than from the addresses on this page. The link does not sign you in by itself: sign in with the same email address the invitation was sent to, or it is not accepted. If a step here does not work for you during the beta, write to support@risicare.ai.
This guide covers installation and basic configuration of the Risicare SDK.
Requirements
Python
- Python: 3.10 or higher. The tests of the SDK run on Python 3.10, 3.11 and 3.12. A later version is allowed, and it is not tested
- Operating System: Linux, macOS, or Windows
- Network: Outbound HTTPS to
ingest.risicare.ai(spans) andapi.risicare.ai(scores, and prompts and evaluations when you use them)
JavaScript/TypeScript
- Node.js: 18.0.0 or higher. The tests of the SDK run on Node.js 22. Other versions from 18.0.0 are allowed, and they are not tested
- Operating System: Linux, macOS, or Windows
- Network: Outbound HTTPS to
ingest.risicare.ai(spans) andapi.risicare.ai(scores, and prompts and evaluations when you use them)
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. The tests of the SDK run on Python 3.10, 3.11 and 3.12, and on Node.js 22.
Install the SDK
Install with pip:
pip install risicareOr with uv (recommended for faster installs):
uv add risicareInstall with npm:
npm install risicareOr with yarn/pnpm:
yarn add risicare
# or
pnpm add risicareFramework 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]'CrewAI and OpenAI Agents in one environment
The extras frameworks and all include CrewAI and the OpenAI Agents SDK. CrewAI 1.15.44 needs openai below 3. openai-agents 0.25.0 needs openai 3 or later. These two releases cannot be in one environment. When you install both in one command, the installer picks an older release of one of them. A test used CrewAI 1.15.44 with openai-agents 0.20.0 and openai 2.54.0. If you use both frameworks, pin the versions that you test.
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)
Bring the spans of your OpenTelemetry SDK into Risicare:
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 in at app.risicare.ai with GitHub or Google, using an account whose email address matches your invitation. Access is by invitation
- The first person to sign in to a new organization gets a default project and API key on that first sign-in. The key is shown once, in the Your API key card on the dashboard home page — copy it before you leave that page
- Joined an organization that already has a project, or missed that key? Go to Settings → API Keys → Create API Key and copy the key from the dialog (also shown only once; owners and admins can create keys). Settings lists existing keys by prefix only; it cannot show a key again. Creating a key needs a sign-in from the last 15 minutes — if you are asked to re-authenticate, do so and create the key again
- Need more projects? Owners and admins can click the project dropdown → New Project — each project gets its own key, shown once in the dialog that opens after you create the project. Creating a project needs a sign-in from the last 15 minutes. If the dialog tells you to sign in again, click Sign in again and retry
A new project's first key is an Ingest key, for your application. For risicare eval gate, evals.run, dataset import by key and the MCP server, make a Secret key in Settings → API Keys, and keep it out of your application.
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
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=false # Turn off capture of prompt/completion text and tool-call arguments (on by default)Programmatic Configuration
For more control, initialize explicitly:
import risicare
risicare.init( # reads RISICARE_API_KEY from the environment
environment="production",
service_name="my-agent",
service_version="1.0.0",
sample_rate=1.0,
trace_content=True, # the default; False turns off capture of prompt/completion text and tool-call arguments
batch_size=100,
batch_timeout_ms=1000,
)import { init } from 'risicare';
init({
// the key comes from RISICARE_API_KEY: do not pass it here
environment: 'production',
serviceName: 'my-agent',
serviceVersion: '1.0.0',
sampleRate: 1.0,
traceContent: true, // the default; false turns off capture of prompt/completion text and tool-call arguments
batchSize: 100,
batchTimeoutMs: 1000,
});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!")
# Wait for the gateway to accept the span: True when it did
print(risicare.flush())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. The order of your imports does not matter. risicare.init() (or import risicare with RISICARE_TRACING=true) traces a supported library that your program imported already, and one that it imports later with an import statement.
Troubleshooting
No traces appearing
Nothing arrives and the SDK printed nothing: check RISICARE_TRACING first. RISICARE_TRACING=false (also 0, no or off) turns tracing off with no message, in both SDKs, also when your code calls init(). init(enabled=False) (JavaScript: init({ enabled: false })) does the same. Then nothing is sent, and flush() returns False. risicare doctor does not read this variable, so it can pass while your application sends nothing. Remove the variable, or set it to true. risicare.is_enabled() (JavaScript: isEnabled()) after init() shows the result.
- Confirm your entrypoint actually does
import risicare— environment variables alone install no instrumentation, and a process that never imports the SDK emits zero spans with no error. When the Python SDK starts with an API key and with debug off, it prints[risicare] Tracing configured — endpoint: ..., service: ..., and the line ends withDelivery is not checked yet: a WARNING follows if the endpoint refuses the key or cannot be reached.This line shows what is configured. It does not show that spans arrive. The JavaScript SDK prints no startup line. - Run
risicare doctor(Python only). It checks the key, the endpoint, the network and a test span, one line for each check, and it exits with code 0 only when the gateway accepted the test span. See Check Your Setup. - Verify your API key is set correctly. With no key the SDK sends nothing,
init()logs one WARNING that says so, andflush()returnsFalse. The WARNING names theRISICARE_API_KEYenvironment variable - If you only import the SDK and do not call
init(), check thatRISICARE_TRACING=trueis set. Withinit(), leave the variable unset. - Check for network connectivity to
ingest.risicare.ai. A line that starts withRisicare: spans are NOT reachingnames the HTTP status, or says that there was no answer, and gives the next step. See What the outage WARNING says for each answer. - Spans are sent by an
atexithook on normal exit. A process that exits withos._exit()runs no exit handler: callrisicare.flush()before it. A process that is killed withSIGKILLcannot send what is queued. In a serverless function, callflush()at the end of each invocation. See Serverless functions.
If your process forks — gunicorn, uvicorn workers, celery --prefork — or if
traces stopped arriving after an outage, see
Production & Failure Modes.
Import errors
Make sure you have the correct Python version:
python --version # Should be 3.10+Debug mode
A failed span export logs a WARNING that names the HTTP status. To see each attempt and
what else the SDK is doing, raise the SDK's logger:
import logging
logging.getLogger("risicare").setLevel(logging.DEBUG)Do not use debug=True to troubleshoot delivery
risicare.init(debug=True) (and RISICARE_DEBUG=true) attaches a console
exporter that writes whole span payloads to stdout, unredacted — including
gen_ai.prompt and gen_ai.completion. If your prompts carry customer data,
that data lands in your terminal, your container logs, and anything that
scrapes stdout. Values are truncated at ~80 characters, which is not
redaction: a leading SSN or card number is printed in full.
It is also the wrong tool for the most common problem: debug=True adds
nothing about a failed export. Use the logger above.
Use debug=True only when you actually want spans echoed to the console, on
non-production data.
IDE Integration
A coding agent such as Claude Code or Cursor can read your project through the Risicare MCP server. The server is read-only, and it takes a project API key. Use a Secret key: an Ingest key cannot read traces. To add it to Claude Code:
claude mcp add --transport http risicare https://app.risicare.ai/api/mcp \
--header "Authorization: Bearer rsk-..."See MCP Server for Cursor, the tools, and which key reads what.