Skip to main content

Review, score, and curate your coding agent conversation traces locally

Project description

AgentsTrace (Local-Only Fork)

原版:kaiaiagent/clawtrace


快速开始

安装

git clone https://github.com/cyijun/agentstrace.git
cd agentstrace-local
pip install -e .

基本使用

# 1. 配置导出源(claude/kimi/codex/gemini/all)
agentstrace config --source all

# 2. 导出对话记录
agentstrace export --no-push -o my_conversations.jsonl

私人使用(保留 API Keys)

# 禁用 secrets 脱敏(仅建议本地私人使用)
agentstrace config --no-secrets-redaction

# 导出(包含原始 API keys)
agentstrace export --no-push -o my_data.jsonl

# ⚠️ 警告:此文件包含明文 API keys,请勿分享!

其他命令

# 列出发现的项目
agentstrace list

# 启动本地 Web UI
agentstrace serve

# 查看配置
agentstrace config

支持的 AI 工具

工具 数据位置 状态
Claude Code ~/.claude/projects/
Kimi CLI ~/.kimi/sessions/
Codex CLI ~/.codex/sessions/
OpenCode ~/.local/share/opencode/
OpenClaw ~/.openclaw/
Gemini CLI ~/.gemini/tmp/

导出格式

JSONL(每行一个 JSON 对象):

{"session_id": "abc-123", "model": "kimi-k2", "messages": [...], ...}
{"session_id": "def-456", "model": "claude-3-7", "messages": [...], ...}

主要字段

字段 说明
session_id 会话唯一标识
model AI 模型名称
project 项目名称(已脱敏)
source 来源(claude/kimi/codex等)
start_time / end_time ISO 8601 时间
messages 对话消息列表
stats 统计信息

messages 结构

{
  "role": "user|assistant",
  "content": "消息内容",
  "thinking": "思考过程(assistant)",
  "timestamp": "2024-01-01T12:00:00Z",
  "tool_uses": [{
    "tool": "bash",
    "input": {"command": "ls -la"},
    "output": {"text": "..."},
    "status": "success"
  }]
}

关于本版本

这是 AgentsTrace 的修改版本,专注于本地隐私保护纯离线使用

主要修改点

1. 移除所有网络功能

  • ❌ 云上传功能
  • ❌ Skill 下载功能
  • ❌ 浏览器自动打开
  • ❌ 所有 urllib 网络请求

2. 可选禁用 Secrets 脱敏

  • 新增 --no-secrets-redaction 配置
  • 私人使用时保留 API keys
  • 路径/用户名脱敏始终启用

3. 安全审查

  • ✅ 无 eval() / exec() / compile()
  • ✅ 无动态代码执行
  • ✅ 无反序列化风险
  • ✅ 路径遍历已防护

与原版对比

功能 原版 本版本
云上传 ❌ 已移除
Skill 下载 ❌ 已移除
可选禁用脱敏 ✅ 支持
适用场景 分享数据集 私人本地分析

许可证

MIT License - 详见 LICENSE

Copyright (c) 2024 kaiaiagent (Original Author)
Copyright (c) 2024 cyijun (Modified Version)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentstracer-1.0.0.tar.gz (169.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentstracer-1.0.0-py3-none-any.whl (128.2 kB view details)

Uploaded Python 3

File details

Details for the file agentstracer-1.0.0.tar.gz.

File metadata

  • Download URL: agentstracer-1.0.0.tar.gz
  • Upload date:
  • Size: 169.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for agentstracer-1.0.0.tar.gz
Algorithm Hash digest
SHA256 bb70367413378b51b61bc962d77e6c67721caf75483ee675d54b21c76ba632ea
MD5 e2353d88120d017e06eb5e497d60b92c
BLAKE2b-256 3d9a767f637cdaa2b58e1612f3568fd73b588a5409f54a85d39b51d5b5da6f42

See more details on using hashes here.

File details

Details for the file agentstracer-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: agentstracer-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 128.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for agentstracer-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2f06b8e7091d4a390ee388cffab84e4029840944ee8c0544966f0390c95fb315
MD5 017031b56d819e6f0540f7f59d2ee74b
BLAKE2b-256 2e3fd01f16a49ac2d63b843b87426323154c886608cdc3ed1d77eaa6090acb7b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page