Skip to main content
GitHub

Frameworks

Auto-instrumentation for agent frameworks.

Risicare provides deep integrations with popular agent frameworks.

Supported Frameworks

What's Captured

Framework integrations provide rich observability beyond basic LLM tracing:

FeatureDescription
Agent IdentityName, role, and hierarchy
Decision FlowThink/Decide/Act phases
Tool ExecutionTool calls with inputs/outputs
State ChangesGraph state transitions
Inter-Agent MessagesCommunication between agents
Iteration TrackingLoop 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.

FrameworkProvider SuppressionNotes
LangChainYesCallback dedup prevents double LLM spans
LiteLLMYesContext manager suppresses provider instrumentation
DSPyYesSuppresses for LM calls
LlamaIndexSelectiveSuppresses LLM and embedding spans only
LangGraphNoLangChain callbacks handle dedup when both active
CrewAINoProvider spans appear as children
AutoGenNoProvider spans appear as children
OpenAI AgentsNoProvider spans appear as children
InstructorNoProvider spans appear as children
Pydantic AINoProvider 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 code

Manual 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']

Next Steps