Skip to main content
GitHub

Agents

Multi-agent observability and analytics.

Read agent data in the dashboard — the REST API is not public yet

What runs today: agent activity is captured and shown in the dashboard. Everything on this page about how agents are identified, and how their behaviour is compared, is current.

What does not run yet: the agent REST endpoints are not exposed outside the platform in this release, so a request from your own machine cannot reach them. The REST API reference describes them for when they are.

Track individual agent performance and inter-agent interactions.

Agent Identity

Define agent identity in your code:

from risicare import agent
 
@agent(name="researcher", role="specialist")
def research_agent(query: str):
    # Agent code here
    pass

Or with context managers:

from risicare import agent_context
 
with agent_context(
    "planner-001",                   # agent_id (required, positional)
    agent_name="planner",
    agent_role="orchestrator",
    agent_type="custom",
    version=1,
):
    # Agent code here
    pass

Agent Attributes

AttributeTypeDescription
agent_idstringUnique instance ID (required, first positional argument)
agent_namestringHuman-readable agent name (falls back to agent_id)
agent_rolestringorchestrator, worker, specialist, etc.
parent_agent_idstringParent in hierarchy (set automatically when nesting)
agent_typestringFramework-specific type (langgraph, crewai, autogen, custom)
versionintAgent version number
metadatadictCustom agent metadata

Agent Roles

RoleDescription
orchestratorCoordinates other agents
workerExecutes assigned tasks
supervisorMonitors and validates
specialistDomain expert
routerRoutes messages/tasks
aggregatorAggregates results
broadcasterBroadcasts to multiple agents
criticReviews and critiques
plannerCreates execution plans
executorExecutes plans
retrieverRetrieves information
validatorValidates outputs

JS SDK has a different role set

The JavaScript SDK's AgentRole enum has 14 values — the 12 shared with Python plus reviewer and custom. See the JS SDK reference for the full list.

Agent Dashboard

Risicare Agents dashboard showing agent performance metrics, success rates, and trace counts

The KPI strip shows: Total Agents, Invocations (with trace count), Success Rate (with errors), Avg Latency (with P95), Total Errors (with error rate), and Total Cost (with tokens).

Agent List

View all agents with metrics:

ColumnDescription
NameAgent name, with a type badge
ErrorsError count, when the agent has errors
Traces, spansCounts for the agent
SuccessSuccess percentage
Avg DurationAverage duration
Last seenWhen the agent last ran

Agent Detail

Deep dive into a single agent:

Agent detail view showing 8 KPI cards (Invocations, Success Rate, Avg Latency, Total Cost, Errors, Avg Tokens, Total Traces, Last Active) with Recent Traces, Tool Usage, and Error Breakdown tabs

The agent page shows KPI cards and three tabs: Recent Traces, Tool Usage and Error Breakdown.

Some agent values are not shown

The agent metrics derived from span/trace data are live today: invocations, success/error rate (from has_error), latency percentiles, token usage, cost, and semantic_phase (captured end-to-end). A second set of agent-semantic values — iteration / max_iterations, delegation depth, and per-phase time splits (think/decide/act_time) — is not shown: the dashboard has no field for them. Rely on the span-derived metrics above.

Agent Hierarchy

Track parent-child relationships:

@agent(name="orchestrator", role="orchestrator")
def orchestrator():
    with agent_context(
        "researcher-001",
        agent_name="researcher",
        agent_role="specialist",
    ):
        research()
 
    with agent_context(
        "writer-001",
        agent_name="writer",
        agent_role="specialist",
    ):
        write()

Visualized as:

orchestrator (orchestrator)
├── researcher (specialist)
└── writer (specialist)

Inter-Agent Communication

Track messages between agents:

from risicare import trace_message
 
@trace_message(target="researcher-001", target_name="Researcher")
def send_research_request(task: str):
    return researcher.process(task)

Message Types

What the SDK actually emits today

The SDK decorators (trace_message, trace_delegate, trace_coordinate) only emit three message types: message, delegation, and coordination. The broader MessageType enum below is reserved for manual/aspirational use — those values are not produced automatically by the SDK and must be set by hand on the span if you need them.

TypeDescription
taskTask assignment
resultTask result
statusStatus update
errorError notification
queryInformation request
responseInformation response
broadcastBroadcast to all
directDirect message
proposalPropose action
voteVote on proposal
consensusConsensus reached
conflictConflict detected
heartbeatAgent alive signal
shutdownShutdown signal
handoffHandoff to another agent

JS SDK has a different message type set

The JavaScript SDK's MessageType enum has 18 values (e.g. REQUEST, RESPONSE, DELEGATE, COORDINATE, BROADCAST, VOTE, HANDOFF, …). See the JS SDK reference for the full list.

Message Attributes

The published Python SDK records the target agent on message and delegation spans:

AttributeDescription
message.target_agent_idReceiving agent ID
message.target_agent_nameReceiving agent name

The SDK does not record sender, receiver, message_type, content or correlation_id attributes; set them yourself with set_attribute() if you need them.

Agent Delegation

Track when agents delegate tasks:

from risicare import trace_delegate
 
@trace_delegate(target="executor-001", target_name="Executor")
def delegate_execution(plan: dict):
    return executor.execute(plan)

Agent Analytics

Topology

The Topology tab of the Agents page shows the agents as a sunburst or as a treemap, grouped by name prefix. The dashboard has no network graph of agent interactions.

Agent Iterations

Record iteration counts on iterative agent loops via agent metadata. (Note: this stores the value in the span's metadata; the dedicated iteration / max_iterations agent analytics are not yet auto-populated — see the in-flight note above.)

@agent(name="refiner", role="specialist")
def iterative_refine(content: str, max_iterations: int = 3):
    for i in range(max_iterations):
        with agent_context(
            "refiner-001",
            agent_name="refiner",
            metadata={"iteration": i + 1}
        ):
            content = refine_step(content)
            if is_good_enough(content):
                break
    return content

Filtering Agents

The Management API is not available with an API key during the beta, so you cannot filter agents over HTTP. There is no field:value query language — a filter such as name:researcher or error_rate:>0.1 is not supported.

Next Steps