An open API service indexing awesome lists of open source software.

https://github.com/gitstq/agentscribe

๐Ÿ“Š AI็ผ–็ ไปฃ็†ไผš่ฏ่ฎฐๅฝ•ไธŽๆ™บ่ƒฝๅˆ†ๆžๅทฅๅ…ท - Record, analyze and visualize AI coding agent sessions (Claude Code, Cursor, Windsurf, Copilot) ๐Ÿ’ป
https://github.com/gitstq/agentscribe

ai analytics claude-code cli code-analysis cursor developer-tools productivity python session-recorder

Last synced: 3 days ago
JSON representation

๐Ÿ“Š AI็ผ–็ ไปฃ็†ไผš่ฏ่ฎฐๅฝ•ไธŽๆ™บ่ƒฝๅˆ†ๆžๅทฅๅ…ท - Record, analyze and visualize AI coding agent sessions (Claude Code, Cursor, Windsurf, Copilot) ๐Ÿ’ป

Awesome Lists containing this project

README

          

# ๐Ÿ“Š AgentScribe

> **AI Coding Agent Session Recorder & Analytics Tool**
> Record, analyze and visualize AI coding agent sessions (Claude Code, Cursor, Windsurf, Copilot)


AgentScribe Logo


GitHub Stars
MIT License
Python 3.10+
Latest Release
Issues

---

## ๐ŸŽ‰ Introduction

**AgentScribe** is a **session recording and analytics tool** designed for AI coding agents. It records, replays, and analyzes your interactions with AI coding agents (such as Claude Code, Cursor, Windsurf, GitHub Copilot, Codex, and more), helping you to:

- ๐Ÿ“ˆ **Understand Agent Behavior** - Track decision processes and tool calls in every session
- ๐Ÿ’ฐ **Optimize Token Costs** - Count token consumption, estimate usage costs
- ๐Ÿ” **Retrospective Sessions** - Quickly search and replay past coding sessions
- ๐Ÿ“Š **Generate Analytics Reports** - Output beautiful HTML visualization reports
- ๐Ÿง  **Discover Usage Patterns** - Identify high-frequency tool calls and coding patterns

> **Design Philosophy:** Local-first, data privacy paramount. All session data is stored in your local SQLite database โ€” no network required, no data leakage risk.

---

## โœจ Key Features

| Feature | Description |
|---------|-------------|
| ๐ŸŽฌ **Session Recording** | Interactively record complete AI coding agent sessions including user messages, AI responses, and tool calls |
| ๐Ÿ“‹ **Session List** | Browse historical sessions by time, agent, model, and more |
| ๐Ÿ” **Detail View** | Dive into each message's content, token consumption, and tool call details |
| ๐Ÿ“Š **Global Statistics** | Aggregate token, cost, and duration statistics across all sessions |
| ๐Ÿ“ˆ **HTML Reports** | Generate beautiful interactive HTML analytics reports for sharing and archiving |
| ๐Ÿ’พ **Data Export** | Export sessions in JSON and Markdown formats |
| ๐Ÿค– **Multi-Agent Support** | Compatible with Claude Code, Cursor, Windsurf, GitHub Copilot, Codex and more |
| ๐Ÿ–ฅ๏ธ **Interactive Dashboard** | Built-in interactive CLI dashboard for one-stop session management |
| ๐Ÿท๏ธ **Tag System** | Add custom tags to sessions for easy categorization and retrieval |
| ๐Ÿงน **Data Management** | Session deletion and batch cleanup functionality |

---

## ๐Ÿš€ Quick Start

### Prerequisites

- Python 3.10+
- pip (Python package manager)

### One-Click Install

```bash
# Option 1: pip install (recommended)
pip install agentscribe

# Option 2: Install from source
git clone https://github.com/gitstq/agentscribe.git
cd agentscribe
pip install -e .

# Option 3: Use install script
chmod +x scripts/install.sh
./scripts/install.sh
```

### Verify Installation

```bash
agentscribe --version
agentscribe --help
```

---

## ๐Ÿ“– Usage Guide

### ๐Ÿ“‹ List Sessions

```bash
# List recent 20 sessions
agentscribe list

# Filter by specific agent
agentscribe list --agent claude-code

# JSON format output
agentscribe list --json
```

### ๐ŸŽฌ Record a New Session

```bash
# Interactive recording
agentscribe record

# Specify agent and model
agentscribe record --agent cursor --model gpt-4o --project /path/to/project

# Add tags
agentscribe record --tag frontend --tag refactor
```

### ๐Ÿ” View Session Details

```bash
# View specific session details
agentscribe view session_20260614_1a2b3c4d

# JSON format output
agentscribe view session_20260614_1a2b3c4d --json
```

### ๐Ÿ“Š View Statistics

```bash
# View global statistics
agentscribe stats
```

### ๐Ÿ“ˆ Generate Report

```bash
# Generate HTML analytics report
agentscribe report

# Specify output path and auto-open
agentscribe report --output ./report.html --open
```

### ๐Ÿ’พ Export Session

```bash
# Export as JSON
agentscribe export session_20260614_1a2b3c4d

# Export as Markdown
agentscribe export session_20260614_1a2b3c4d --format markdown
```

### ๐Ÿ—‘๏ธ Delete Session

```bash
agentscribe delete session_20260614_1a2b3c4d
```

### ๐Ÿ–ฅ๏ธ Interactive Dashboard

```bash
# Start interactive mode
agentscribe dashboard
```

---

## ๐Ÿ’ก Design Philosophy & Roadmap

### Design Principles

1. **Local-First** - All data stored in local SQLite, no network required, privacy secure
2. **CLI Native** - Powerful command-line interface suitable for developer daily workflow
3. **Modular Architecture** - Storage, analysis, and reporting modules are independent and extensible
4. **Open Formats** - Support JSON/Markdown/HTML multiple data export formats

### Architecture

```
agentscribe/
โ”œโ”€โ”€ agentscribe/ # Core package
โ”‚ โ”œโ”€โ”€ cli.py # CLI entry point (Click framework)
โ”‚ โ”œโ”€โ”€ storage.py # SQLite storage engine
โ”‚ โ”œโ”€โ”€ analyzer.py # Analysis engine (cost/pattern/stats)
โ”‚ โ”œโ”€โ”€ reporter.py # HTML report generator
โ”‚ โ”œโ”€โ”€ models.py # Data models
โ”‚ โ”œโ”€โ”€ config.py # Configuration management
โ”‚ โ””โ”€โ”€ utils.py # Utility functions
โ”œโ”€โ”€ tests/ # Unit tests
โ”œโ”€โ”€ scripts/ # Install scripts
โ”œโ”€โ”€ setup.py # Build configuration
โ””โ”€โ”€ requirements.txt # Dependency management
```

### Roadmap

- **v0.2.0** - Automatic agent session sniffing (no manual recording)
- **v0.3.0** - Cross-session pattern recognition and smart suggestions
- **v0.4.0** - Multi-user/team collaboration support
- **v0.5.0** - Web visualization dashboard
- **v1.0.0** - Stable release, plugin ecosystem

---

## ๐Ÿ“ฆ Build & Deploy

### Build Distribution Package

```bash
# Install build tools
pip install build

# Build source and wheel packages
python -m build

# Artifacts in dist/
ls dist/
```

### Run Tests

```bash
# Install test dependencies
pip install pytest flake8

# Run all tests
pytest tests/ -v

# Run code linting
flake8 agentscribe/
```

---

## ๐Ÿค Contributing

Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

- ๐Ÿ› **Report Bugs** - [Create an Issue](https://github.com/gitstq/agentscribe/issues/new?template=bug_report.md)
- ๐Ÿ’ก **Feature Requests** - [Submit a Feature Request](https://github.com/gitstq/agentscribe/issues/new?template=feature_request.md)
- ๐Ÿ“ **Improve Docs** - Help us improve documentation quality
- ๐Ÿ”ง **Submit Code** - Submit a Pull Request to fix issues or add features

---

## ๐Ÿ“„ License

This project is open-sourced under the [MIT License](LICENSE).

---


AgentScribe โ€” Make every AI coding agent interaction traceable ๐Ÿš€


GitHub ยท
Issues ยท
Releases