Frameworks
Auto-instrumentation for agent frameworks.
Risicare provides deep integrations with popular agent frameworks.
Supported Frameworks
LangGraph
Graph-based agents
CrewAI
Multi-agent crews
AutoGen
Conversational agents
LangChain
Chains and agents
OpenAI Agents
OpenAI Agents SDK
Instructor
Structured outputs
LiteLLM
Unified LLM interface
DSPy
Declarative prompting
Pydantic AI
Type-safe AI
LlamaIndex
RAG framework
JavaScript SDK
The JS SDK supports 4 of the 10 frameworks above. The remaining 6 are Python-only (no npm packages exist).
| Framework | JS Import | Function |
|---|---|---|
| LangChain | risicare/langchain | RisicareCallbackHandler + withSuppression() |
| LangGraph | risicare/langgraph | instrumentLangGraph() |
| Instructor | risicare/instructor | patchInstructor() |
| LlamaIndex | risicare/llamaindex | RisicareLlamaIndexHandler |
What's Captured
Framework integrations provide rich observability beyond basic LLM tracing:
| Feature | Description |
|---|---|
| Agent Identity | Name, role, and hierarchy |
| Decision Flow | Think/Decide/Act phases |
| Tool Execution | Tool calls with inputs/outputs |
| State Changes | Graph state transitions |
| Inter-Agent Messages | Communication between agents |
| Iteration Tracking | Loop counts and convergence |
Provider Span Behavior
Some frameworks automatically suppress underlying LLM provider spans to avoid duplicate traces. Others let provider spans appear alongside framework spans for full visibility.
| Framework | Provider Suppression | Notes |
|---|---|---|
| LangChain | Yes | Callback dedup prevents double LLM spans |
| LiteLLM | Yes | Context manager suppresses provider instrumentation |
| DSPy | Yes | Suppresses for LM calls |
| LlamaIndex | Selective | Suppresses LLM and embedding spans only |
| LangGraph | No | LangChain callbacks handle dedup when both active |
| CrewAI | No | Provider spans appear as children |
| AutoGen | No | Provider spans appear as children |
| OpenAI Agents | No | Provider spans appear as children |
| Instructor | No | Provider spans appear as children |
| Pydantic AI | No | Provider spans appear as children |
Auto vs Manual Instrumentation
Auto-Instrumentation
Enable with a single import:
import risicare
risicare.init()
# Framework code is automatically traced
from langgraph.graph import StateGraph
# ... your agent codeManual Instrumentation
Add explicit context for more control:
from risicare import agent, trace_think, trace_decide, trace_act
@agent(name="researcher", role="specialist")
def research_agent(query: str):
@trace_think
def analyze():
return analyze_query(query)
@trace_decide
def plan():
return create_plan(analysis)
@trace_act
def execute():
return run_search(plan)
analysis = analyze()
plan = plan()
return execute()Framework Detection
Risicare automatically detects which frameworks are installed and instruments them:
import risicare
# Returns set of instrumented module names
print(risicare.get_instrumented_modules())
# ['langgraph', 'crewai', 'autogen']