agent-session
agent-session is the reusable Rust library for local AI coding-agent session
data. It owns agent-specific transcript discovery/parsing and exposes a common
session IR for applications such as AgentSight.
Responsibilities
- Discover and parse local Claude Code, Codex, and Gemini CLI session files.
- Normalize model usage, token totals, tool calls, file references, prompts, cwd, timestamps, and session identifiers.
- Match live process trees to sessions using real path evidence, sticky bindings, and recent cwd fallback.
- Expose PID-to-session lookup through
SessionProcessMatches::session_for_pid.
Non-goals
- No OpenTelemetry exporter in this crate. AgentSight owns OTEL and other product sinks.
- No UI, report rendering, database schema, or eBPF capture logic.
- No dependency on AgentSight collector internals.
OTel Alignment
agent-session remains a local IR. Its public fields use OTel-friendly names
where they fit: agent_type, conversation_id, and aggregate usage.
AgentSight maps those fields to OTLP only at export time and leaves
conversation_id unset when a native log has no real session/thread id.
Release
AgentSight's release workflow publishes agent-session before publishing
agentsight. The workflow finds the next available agent-session patch
version on crates.io, updates agent-session/Cargo.toml, updates the collector
dependency, regenerates collector/Cargo.lock, and commits that release
snapshot before packaging.
After crates.io publish, docs.rs builds the Rust API docs and the unofficial lib.rs index can discover the crate from crates.io metadata.
继续阅读
返回索引
AgentSight:基于 eBPF 的零侵入 LLM 智能体可观测性工具
 
下一篇 / 下一页
agentpprof: pprof-style profiles for AI coding-agent sessions
An AI coding agent can finish a task and leave behind hundreds of events: user prompts, model calls, shell commands, file edits, package downloads, test runs, and retries.
- 最后更新
- 2026年6月23日
- 首次发布
- 2026年6月23日
- 贡献者
- LinuxDev9002
这个页面有帮助吗?