← Bob-Wire · c5

models.md

C5 Inventory Item Data Models

Entity definitions for the AI agent visibility platform. All items are discovered by Qpoint at runtime — no agent SDK instrumentation required. Primary observation point is the TLS-terminating network proxy, supplemented by process/system-level observation where noted.


Entity Map

Endpoint (compute host)
  └── User (OS identity)
        └── Session (bounded unit of work)
              ├── Agent (software identity — Claude Code, Cursor, etc.)
              ├── Model (LLM model + provider)
              ├── API Key (credential used)
              ├── MCP Server (MCP server connected during session)
              ├── Agent Capability (tools + skills available to session)
              ├── File (files read/written by tools)
              ├── Subagent (child session spawned by this session)
              ├── Secondary Call (non-LLM HTTP call made by a tool)
              └── LLM Turn ─ session-detail only
                    └── Tool Call (unified builtin + MCP invocations)

Inventory Items

Ten top-level items that form the navigable inventory:

#EntityCategory
1SessionCore
2AgentIdentity
3UserIdentity
4ModelProvider
5API KeyIdentity
6EndpointIdentity
7MCP ServerCapabilities
8Agent CapabilityCapabilities
9FileExposure
10Secondary CallExposure

Two additional entities are session-detail only — they appear in session drill-downs but are not top-level inventory items:

EntityNote
LLM TurnEvent record; navigated from session detail
Tool CallUnified builtin + MCP invocation (event record)

1. Session

What it is: The primary unit of observation. A bounded autonomous work episode — from first API call to process exit or sustained inactivity. Everything else is a tag on a session.

Identifier: session_id — from Claude Code's session.id attribute (proxy-visible); for other agents, a Qpoint-assigned UUID derived from source PID + first-call timestamp.

Fields

FieldTypeSourceNotes
session_idstringProxy (Claude Code) / derivedStable across all turns of a session
prompt_idstringProxy (Claude Code)Turn-level ID; event.sequence increments each turn
agent_idstring (FK)Derived from User-Agent / Stainless headersWhich agent software ran the session
user_idstring (FK)Proxy (user.email, OS user lookup)Who initiated the session
endpoint_idstring (FK)Network (source IP / process metadata)Where the session ran
api_key_idstring (FK)Proxy (x-api-key header)Which API credential was used
started_attimestampProxy (first API call timestamp)Session start
ended_attimestamp | nullProcess exit or inactivity heuristicNull if ongoing
duration_msinteger | nullDerivedended_at - started_at
statusenumDerivedactive, ended, terminated
terminal_typestringProxy (Claude Code terminal.type)e.g. ghostty, vscode, iterm2
turn_countintegerDerivedNumber of LLM turns (API calls)
tool_call_countintegerDerivedTotal tool calls across all turns
total_input_tokensintegerProxy (usage fields)Summed across all turns
total_output_tokensintegerProxy (usage fields)Summed across all turns
total_cache_read_tokensintegerProxy (usage fields)Tokens served from prompt cache
total_cache_creation_tokensintegerProxy (usage fields)Tokens written to prompt cache
total_cost_usdfloatDerivedΣ(turn costs)
parent_session_idstring | nullDerived (process tree / OTel traceparent)Set if this is a subagent session
cwdstringProcess (/proc/<pid>/cwd)Working directory at session start
stop_reason_lastenumProxy (last API response)end_turn, max_tokens, stop_sequence, tool_use
max_tokens_hit_countintegerDerivedTimes stop_reason = max_tokens — behavioral signal

Relationships

  • Has many LLM Turns
  • Has many Tool Calls (through turns)
  • Has many Files accessed
  • Has many Secondary Calls
  • Has one Agent
  • Has one User
  • Has one Endpoint
  • Has one API Key
  • May have one parent Session (if subagent)
  • May have many child Subagent sessions

2. Agent

What it is: The software system running the session — an autonomous AI runtime (e.g. Claude Code, Cursor, a LangChain pipeline). Identified by User-Agent string and Stainless SDK headers. An agent is not a session — one agent (e.g. "Claude Code v1.2.0") can have thousands of sessions across many users.

Identifier: agent_id — derived from user_agent + stainless_package_version (normalized slug, e.g. claude-code@1.2.0).

Fields

FieldTypeSourceNotes
agent_idstringDerivedNormalized slug
namestringProxy (User-Agent parse)e.g. claude-code, cursor, langchain
versionstringProxy (User-Agent parse)e.g. 1.2.0
sdk_languagestringProxy (x-stainless-lang)js, python, go, java, ruby
sdk_runtimestringProxy (x-stainless-runtime)node, python, deno
sdk_versionstringProxy (x-stainless-package-version)Anthropic SDK version
first_seen_attimestampDerivedFirst session involving this agent version
last_seen_attimestampDerivedMost recent session
session_countintegerDerivedTotal sessions observed
user_countintegerDerivedDistinct users who ran this agent

Relationships

  • Has many Sessions
  • Used by many Users

3. User

What it is: The human identity behind a session. May be an authenticated developer (email from Claude Code session metadata), an OS user (from process uid), or an application service account.

Identifier: user_id — user.email from Claude Code metadata when available; otherwise <endpoint_id>:<uid> (OS user on host).

Fields

FieldTypeSourceNotes
user_idstringProxy (Claude Code user.email) / Process uidStable identifier
emailstring | nullProxy (Claude Code user.email)Available for Claude Code sessions
account_idstring | nullProxy (Claude Code user.account_id)Anthropic account ID
os_usernamestring | nullProcess (/proc/<pid>/status → uid → /etc/passwd)OS-level identity
organization_idstring | nullProxy (Claude Code organization.id)Anthropic org
roleenumDerived (heuristics)developer, admin, ci, service, unknown
first_seen_attimestampDerived
last_seen_attimestampDerived
session_countintegerDerived
total_cost_usdfloatDerivedAggregate across all sessions
primary_agentstring (FK)DerivedMost-used agent name
primary_modelstring (FK)DerivedMost-used model

Relationships

  • Has many Sessions
  • Runs on many Endpoints
  • Uses many Agents

4. Model

What it is: A specific LLM model invoked by an agent, including the provider that serves it. Identified by the model field in API requests and responses — the response model is authoritative (it reflects actual routing, not just the requested model). Provider context (hostname, base URL) is a property of the model rather than a separate entity.

Identifier: model_id — the canonical model string from the API response, e.g. claude-opus-4-6, claude-sonnet-4-6, gpt-4o.

Fields

FieldTypeSourceNotes
model_idstringProxy (response model field)Canonical, authoritative
model_familystringDerivede.g. claude-opus, claude-sonnet, gpt-4o
providerstringDerived (hostname → known provider map)anthropic, openai, google, mistral, cohere, unknown
provider_hoststringProxy (SNI / HTTP Host)e.g. api.anthropic.com, api.openai.com
base_urlstringProxy (HTTP Host + path prefix)e.g. https://api.anthropic.com/v1
input_price_per_mtokfloatKnown (published pricing)USD per million input tokens
output_price_per_mtokfloatKnownUSD per million output tokens
cache_write_price_per_mtokfloatKnownUSD per million cache creation tokens
cache_read_price_per_mtokfloatKnownUSD per million cache read tokens
context_window_tokensintegerKnownMax context window size
first_seen_attimestampDerived
last_seen_attimestampDerived
session_countintegerDerived
total_cost_usdfloatDerived
avg_input_tokensfloatDerivedAverage per turn
avg_output_tokensfloatDerivedAverage per turn
avg_cache_hit_ratefloatDerivedcache_read / (cache_read + input)

Relationships

  • Used in many Sessions and LLM Turns

5. API Key

What it is: The Anthropic API credential used to authenticate sessions. A key is visible at the proxy layer (x-api-key header). Different keys may correspond to different organizational units, cost centers, or environments. Keys are stored as hashed tokens — only the first/last N chars shown in the UI.

Identifier: api_key_id — SHA-256 hash of the raw key value (never stored in plaintext).

Fields

FieldTypeSourceNotes
api_key_idstringDerived (hash of x-api-key)Never stored in plaintext
key_prefixstringProxy (first 8 chars of x-api-key)Display hint: sk-ant-api03-XXXX...
organization_idstring | nullProxy (Claude Code organization.id)Anthropic org (when available)
rate_limit_requestsinteger | nullProxy (response header)API key tier signal
rate_limit_tokensinteger | nullProxy (response header)Token quota
first_seen_attimestampDerived
last_seen_attimestampDerived
session_countintegerDerived
total_cost_usdfloatDerivedAggregate spend on this key

Relationships

  • Used by many Sessions
  • May be associated with one User or many (shared org key)

6. Endpoint

What it is: The compute environment where an agent session ran — a laptop, cloud VM, CI runner, or container. The physical or virtual host. Identified by a combination of source IP and system metadata.

Identifier: endpoint_id — stable host identifier derived from: hostname (from process metadata) or source IP (from proxy), preferring hostname when available.

Fields

FieldTypeSourceNotes
endpoint_idstringProcess metadata (hostname) or source IPStable identifier
hostnamestring | nullProcess (/proc/<pid>/environ HOSTNAME or /etc/hostname)Preferred identifier
ip_addressstringProxy (source IP of connections)May be NAT gateway for shared environments
osstringProxy (x-stainless-os)MacOS, Linux, Windows
archstringProxy (x-stainless-arch)arm64, x86_64
runtimestringProxy (x-stainless-runtime)node, python
runtime_versionstringProxy (x-stainless-runtime-version)e.g. v22.1.0, 3.11.0
environment_typeenumDerived (heuristics)developer_machine, ci_runner, cloud_vm, container, unknown
first_seen_attimestampDerived
last_seen_attimestampDerived
session_countintegerDerived
user_countintegerDerivedDistinct users observed on this endpoint

Relationships

  • Hosts many Sessions
  • Used by many Users
  • Contains many Files accessed

7. MCP Server

What it is: A Model Context Protocol server that an agent connected to during a session. Provides tools, resources, or prompts to the agent. Identified from the MCP initialize exchange (serverInfo.name + serverInfo.version). Note: stdio-transport MCP servers are opaque at the proxy layer — observable only with process/eBPF instrumentation.

Identifier: mcp_server_id — <server_name>@<server_version> (e.g. filesystem@1.0.0, github@0.6.2).

Fields

FieldTypeSourceNotes
mcp_server_idstringMCP initialize response (serverInfo)Derived slug
namestringMCP serverInfo.namee.g. filesystem, github, postgres
versionstringMCP serverInfo.version
transportenumObservation methodhttp, websocket, stdio (stdio = limited visibility)
urlstring | nullProxy (HTTP Host / WebSocket URL)For http/ws transports only
client_namestringMCP clientInfo.nameAgent that connected (e.g. claude-code)
protocol_versionstringMCP initialize.protocolVersione.g. 2024-11-05
tools_availablestringMCP tools/list responseNames of tools exposed
first_seen_attimestampDerived
last_seen_attimestampDerived
session_countintegerDerivedSessions that connected to this server
total_tool_callsintegerDerivedTotal tools/call invocations
avg_tool_latency_msfloatDerivedAverage tool execution time
error_ratefloatDerivedisError: true / total calls

Relationships

  • Connected to during many Sessions
  • Exposes many Agent Capabilities (tools)
  • Has many Tool Calls (invocation records)

8. Agent Capability

What it is: A capability available to an agent during a session — either a tool (callable function from the API tools[] array or an MCP server) or a skill (named instruction file loaded into the system prompt). Both describe what an agent can do in a session and share an inventory view, differentiated by capability_type.

Identifier: capability_id — <type>:<source>:<name> (e.g. tool:builtin:bash, tool:filesystem:read_file, skill:claude-code:wireframe-builder).

Shared Fields

FieldTypeSourceNotes
capability_idstringDerived<type>:<source>:<name> slug
capability_typeenumDerivedtool | skill
namestringProxye.g. bash, wireframe-builder
agent_idstring (FK)DerivedAgent type that uses this capability
first_seen_attimestampDerived
last_seen_attimestampDerived
session_countintegerDerivedSessions where this capability was active

Tool-Specific Fields (capability_type = tool)

FieldTypeSourceNotes
sourceenumDerivedbuiltin (Anthropic API tools array) or MCP server name
descriptionstringProxy (tools[].description) or MCPHuman-readable tool description
input_schemaobjectProxy (tools[].input_schema) or MCPJSON Schema for parameters
categoryenumDerivedfilesystem, shell, network, search, code, ui, data, mcp, other
invocation_countintegerDerivedTotal times called across all sessions
error_ratefloatDerivedFailed invocations / total
avg_execution_msfloatDerivedAverage tool_use → tool_result latency

Skill-Specific Fields (capability_type = skill)

FieldTypeSourceNotes
source_pathstring | nullProxy (system prompt parse)e.g. .claude/skills/wireframe-builder.md
content_hashstringDerived (SHA-256 of skill content)Detects skill version changes across sessions

Relationships

  • Referenced in many Sessions
  • Tools: may belong to one MCP Server (if MCP-sourced)
  • Tools: has many Tool Calls (invocation events)

9. File

What it is: A file on the host file system that was read or written by an agent tool during a session. Identified by absolute path. Multiple sessions may access the same file; each access is a distinct event.

Identifier: file_id — <endpoint_id>:<absolute_path> (file identity scoped to the host where it exists).

Fields

FieldTypeSourceNotes
file_idstringDerived<endpoint_id>:<path>
pathstringProxy (tool input.file_path / input.path) or eBPF openatAbsolute path
extensionstringDerivedFile extension for categorization
categoryenumDerivedsource_code, config, data, credentials, notebook, binary, other
is_sensitivebooleanDerived (path heuristics)~/.ssh/, *.env, *secret*, *credential*, *key*
endpoint_idstring (FK)Derived from sessionHost where file resides
first_seen_attimestampDerivedFirst time any session accessed this file
last_seen_attimestampDerived
access_countintegerDerivedTotal accesses across all sessions
session_countintegerDerivedDistinct sessions that touched this file

File Access Event (join entity: Session ↔ File)

FieldTypeSourceNotes
session_idstring (FK)
file_idstring (FK)
operationenumDerived from tool nameread, write, edit, delete, rename, glob, grep
tool_idstring (FK)Which tool performed the access
accessed_attimestamp
bytes_readinteger | nulleBPF read syscallFile size proxy
bytes_writteninteger | nulleBPF write syscall or tool content field length

Relationships

  • Accessed during many Sessions
  • Via many Tool Calls
  • Exists on one Endpoint

10. Secondary Call

What it is: An outbound HTTP/HTTPS request made by a tool (not the LLM itself) — e.g. web_fetch fetching a URL, bash running curl github.com, or computer_use loading a web page. Represents the "hidden exposure" surface: indirect network access attributable to an agent session.

Identifier: secondary_call_id — Qpoint-assigned UUID.

Fields

FieldTypeSourceNotes
secondary_call_idstringQpoint-assigned
session_idstring (FK)Derived (source PID → parent session)
tool_call_idstring | null (FK)Derived (temporal correlation)Tool Call that triggered this call
destination_hoststringProxy (SNI / HTTP Host)e.g. api.github.com, registry.npmjs.org
destination_ipstringProxy (DNS resolution)
destination_portintegerProxy
methodstring | nullProxy (HTTP method)GET, POST, etc.; null for non-HTTP
urlstring | nullProxyFull URL if HTTP
protocolstringProxyhttps, http, tcp, dns
http_statusinteger | nullProxyHTTP response status
request_bytesintegerProxy
response_bytesintegerProxy
called_attimestampProxy
duration_msintegerProxy
process_pidinteger | nullProcess (source port → PID)Originating process
attribution_confidenceenumDerivedhigh (PID match), medium (temporal), low (IP only)

Relationships

  • Attributed to one Session
  • Triggered by one Tool Call (when correlatable)

11. LLM Turn (session-detail only)

What it is: A single request/response pair with the LLM API — one call to POST /v1/messages. The atomic unit of LLM interaction. A session is composed of many turns. Displayed in session drill-downs; not a top-level inventory item.

Identifier: turn_id — Anthropic's response id field (e.g. msg_01XFDUDYJgAACzvnptvVoYEL).

Fields

FieldTypeSourceNotes
turn_idstringProxy (response id)Anthropic message ID
session_idstring (FK)DerivedParent session
sequenceintegerDerived / event.sequenceTurn order within session
model_idstring (FK)Proxy (response model)Actual model used
requested_attimestampProxyRequest timestamp
responded_attimestampProxyLast byte of response received
latency_msintegerDerivedTotal round-trip time
ttft_msinteger | nullProxy (streaming only)Time to first token
input_tokensintegerProxy (usage.input_tokens)
output_tokensintegerProxy (usage.output_tokens)
cache_read_tokensintegerProxy (usage.cache_read_input_tokens)
cache_creation_tokensintegerProxy (usage.cache_creation_input_tokens)
cost_usdfloatDerivedToken counts × model pricing
stop_reasonenumProxyend_turn, max_tokens, stop_sequence, tool_use
tool_call_countintegerDerivedNumber of tool calls in this turn
is_streamingbooleanProxy (Transfer-Encoding: chunked)
http_statusintegerProxy200, 400, 429, 500, etc.

Relationships

  • Belongs to one Session
  • Uses one Model
  • Has many Tool Calls

12. Tool Call (session-detail only)

What it is: A single tool execution — either a built-in tool (tool_use/tool_result pair in the Anthropic API) or an MCP tools/call invocation. Both represent the same semantic event: a tool was invoked and produced a result. Unified under one entity with call_type indicating the protocol. Displayed in session drill-downs; not a top-level inventory item.

Identifier: tool_call_id — the tool_use_id for builtin calls (e.g. toulu_01A09q90...); derived from JSON-RPC id + MCP server ID + timestamp for MCP calls.

Fields

FieldTypeSourceNotes
tool_call_idstringProxy / DerivedSee identifier note above
call_typeenumDerivedbuiltin | mcp
session_idstring (FK)Derived
turn_idstring | null (FK)DerivedLLM Turn that triggered this call; null for MCP calls not tied to a turn
capability_idstring (FK)DerivedWhich Agent Capability was invoked
tool_namestringProxyDenormalized tool name for query convenience
mcp_server_idstring | null (FK)MCP serverInfo.nameSet for call_type = mcp; null for builtin
inputobjectProxyTool parameters (unified from content[].input or MCP params.arguments)
resultstring | object | nullProxyTool output (unified from tool_result.content or MCP result.content)
is_errorbooleanProxyTrue if tool failed
error_messagestring | nullProxyError detail when is_error = true
called_attimestampProxyWhen the tool was invoked
result_attimestampProxyWhen the result was received
latency_msintegerDerivedresult_at - called_at
input_size_bytesintegerDerivedJSON size of input
result_size_bytesintegerDerivedJSON size of result

Relationships

  • Belongs to one Session and one LLM Turn (when call_type = builtin)
  • References one Agent Capability
  • May belong to one MCP Server (when call_type = mcp)
  • May produce File access events (if file-touching tool)
  • May produce Secondary Calls (if network-touching tool)

Observation Mechanism Summary

EntityPrimary observationSupplemental
SessionProxy (API calls + Claude Code metadata)Process (PID, cwd)
AgentProxy (User-Agent, Stainless headers)—
UserProxy (Claude Code user.email)Process (OS uid → username)
ModelProxy (API response model + Host header)—
API KeyProxy (x-api-key header, hashed)—
EndpointProxy (Stainless OS/arch headers, source IP)Process (hostname, /proc)
MCP ServerMCP intercept (HTTP/WS transport)eBPF (stdio transport)
Agent Capability (tool)Proxy (API tools[] definitions)MCP intercept
Agent Capability (skill)Proxy (system prompt parse)—
FileProxy (tool input fields)eBPF openat/write
Secondary CallProxy (outbound HTTP from tool processes)Process (PID attribution)
LLM TurnProxy (full request/response)—
Tool CallProxy (tool_use/tool_result) + MCP intercepteBPF (stdio MCP)

Qpoint Brand Style Guide