惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Know Your Adversary
Know Your Adversary
小众软件
小众软件
L
LangChain Blog
月光博客
月光博客
博客园 - Franky
Microsoft Azure Blog
Microsoft Azure Blog
Y
Y Combinator Blog
有赞技术团队
有赞技术团队
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
MongoDB | Blog
MongoDB | Blog
Recorded Future
Recorded Future
V
Visual Studio Blog
TaoSecurity Blog
TaoSecurity Blog
S
Schneier on Security
C
Cybersecurity and Infrastructure Security Agency CISA
P
Privacy & Cybersecurity Law Blog
T
Threat Research - Cisco Blogs
D
DataBreaches.Net
L
LINUX DO - 热门话题
C
Check Point Blog
F
Fortinet All Blogs
Hugging Face - Blog
Hugging Face - Blog
The Hacker News
The Hacker News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Microsoft Security Blog
Microsoft Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
V
V2EX
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
P
Proofpoint News Feed
L
Lohrmann on Cybersecurity
博客园 - 司徒正美
T
Threatpost
P
Palo Alto Networks Blog
A
About on SuperTechFans
Spread Privacy
Spread Privacy
Engineering at Meta
Engineering at Meta
N
News | PayPal Newsroom
T
Tailwind CSS Blog
The Last Watchdog
The Last Watchdog
Blog — PlanetScale
Blog — PlanetScale
A
Arctic Wolf
量子位
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
博客园 - 聂微东
Google Online Security Blog
Google Online Security Blog
Google DeepMind News
Google DeepMind News
www.infosecurity-magazine.com
www.infosecurity-magazine.com
V
Vulnerabilities – Threatpost
H
Hacker News: Front Page

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店 GitHub - EdoardoBambini/Agent-Armor-Iaga: AI agents are getting tool access — shell, file system, databases, APIs, secrets. But **nobody is governing what they actually do with it**. Frameworks like LangChain, CrewAI, AutoGen, and Claude Code give agents the power to execute. Agent Armor gives you the power to control, audit, and approve every single action before it happens. HN Vibes — Week 15, Apr 7–13 2026 GitHub - chojs23/ec: Easy terminal-native 3-way git mergetool vim-like workflow GitHub - SethPyle376/hiraeth: Local AWS emulator focused on fast integration testing, with SQS support, SQLite-backed state, and a debug-friendly web UI. GitHub - JakOb-dotcom/cloud-sandbox-security-analysis: Technical analysis and Proof of Concept (PoC) regarding environment variable exfiltration in containerized cloud sandboxes via side-channel data leaks. Springboards - Flint Alpha Show HN: A simpler coding agent harness GitHub - audiodude/sudomake-friends GitHub - 256thFission/mini-mythos: OSS clone of Anthropic’s Mythos harness to locate C/C++ memory vulnerabilities Show HN: OpenParallax: OS-level privilege separation for AI agent execution Hacker News Sorted - Chrome 应用商店 Show HN: How to Install Docker on Ubuntu 24.04 LTS: Complete 2026 Guide GitHub - himanshudongre/smriti GitHub - sverrirsig/claude-control: macOS desktop dashboard for monitoring and managing multiple Claude Code sessions GitHub - ory/dockertest: Write better integration tests! Dockertest helps you boot up ephermal docker images for your Go tests with minimal work. Chiral - Chrome 应用商店 Show HN: Two Claudes collaborating through shared memory on a $100 mini-PC GitHub - pmichaillat/latex-cv: Minimalist LaTeX template for academic CVs GitHub - oguzbilgic/posse: A web UI for Anthropic Managed Agents. GitHub - sshiraz/depsly: Dependency risk analysis tool for npm packages ABI Add safari/agent-harness — Safari browser automation via safari-mcp by achiya-automation · Pull Request #212 · HKUDS/CLI-Anything GitHub - Halfblood-Prince/trustcheck: Verify PyPI package attestations and improve Python supply-chain security GitHub - oguzbilgic/kern-ai: Agents that do the work and show it. GitHub - bruits/satteri: High-performance Markdown and MDX processing for the JavaScript ecosystem GitHub - tylergibbs1/feedstock: High-performance web crawler and scraper for TypeScript, powered by Bun and Playwright GitHub - Grimm67123/grimmbot: The self-improving sandboxed and open-source AI agent. With persistent memory and scheduling. GitHub - whitevanillaskies/whitebloom: Local whiteboard that blooms. GitHub - hwdsl2/docker-whisper: Docker image for a self-hosted Whisper speech-to-text server with speaker diarization and OpenAI-compatible transcription and translation APIs. Powered by faster-whisper. Supports all Whisper models, NVIDIA GPU (CUDA) acceleration, JSON/SRT/VTT output, SSE streaming, offline mode, and multi-arch (amd64, arm64). GitHub - yisding/reviewwiggum GitHub - MarwanAlsoltany/serrors: Structured errors for Go: sentinel hierarchies, typed data, custom formatting, and slog integration. GitHub - soatok/age-php GitHub - Luthiraa/markitme GitHub - stagas/rtdiff: realtime git diff gui and AI-assisted commits GitHub - tombedor/excalicharts GitHub - wh1le/excalidraw-edit: Open and edit .excalidraw files from the terminal. Offline, auto-saves to disk. MalExt Sentry - Malicious Extension Scanner - Chrome 应用商店 GitHub - syi0808/asciianimesvg: Generate animated ASCII art SVGs from text. CLI, Rust library, WASM, and web editor. GitHub - zaina-ml/ml_forge: A visual-based graph node editor for training computer vision models. GitHub - anakin87/llm-rl-environments-lil-course: 🌱 A little course on Reinforcement Learning Environments for evaluating and training Language Models GitHub - takaakit/superpowers-uml: Superpowers-UML modifies Superpowers to ensure a software development workflow in which AI agents design through UML modeling. AdriByte Studio - Sviluppo Web e Soluzioni Digitali GitHub - chouligi/angel-copilot: Your personalized Angel Investment Advisor Show HN: MoodSense AI (ML and FastAPI and Gradio, Deployed on Hugging Face) Moodsense Ai - a Hugging Face Space by aman179102 GitHub - agenteractai/lodmem: Level Of Detail Context Management for Agents GitHub - ostefani/subnetlens: A fast, concurrent network scanner with a TUI and plain-text CLI, built in Go. It discovers live hosts on your network, scans their open ports, resolves hostnames, and fingerprints operating systems—delivered. Cyber Pulse: Agentic Intel - Apps on Google Play Whisper API: Self-Hostable Speech to Text Transcription The Agent-Web Protocol Stack: A Research Thesis GitHub - msmarkgu/RelayFreeLLM: A restful API designed to route user prompts to various AI model providers. Show HN: Provepy – A Python decorator that proves your code using Lean and LLMs Show HN: Pardonned.com – A searchable database of US Pardons GitHub - patrickdappollonio/dux: Dux is a terminal UI that lets you run multiple AI coding agents side by side, each in its own git worktree, with full companion terminals, macros, commit generation, and a command palette that knows more tricks than you do. kMC Crystal Simulator Show HN: HyperFlow – A self-improving agent framework built on LangGraph GitHub - stef41/vibescore: 🎵 Grade your vibe-coded project. One command, instant letter grade across security, quality, dependencies, and testing. GitHub - stef41/lmscan: 🔍 Detect AI-generated text and fingerprint which LLM wrote it. Open-source GPTZero alternative. Zero dependencies, works offline. imgur.com GitHub - visionscaper/collabmem: Enabling long-term collaboration with Agentic AI - building up episodic and world model memory over time with in-context awareness 在 Steam 上购买 FriedrichAI: Offline AI 立省 10% GitHub - atripati/ark: AI Runtime Kernel — a context operating system for AI agents. Eliminates tool bloat, loads only what’s needed, and gives LLMs their reasoning space back. GitHub - nowork-studio/toprank: Open-source Claude Code skills for SEO, SEM, Google Ads GitHub - tacomanator/sash: Lightweight macOS menu bar app for reliably cycling through windows of the current application. Appents | Social Media Management for Product-First Teams GitHub - pnhoang/youtube-spam-blocker: Automatically detects and hides spam messages in YouTube Live chat. Set rate limits, keyword filters, and block repeat offenders. GitHub - decisionnode/DecisionNode: CLI + Local MCP - A shared structured memory store across Claude Code, Cursor, Windsurf, Antigravity, and every MCP client. Semantically queryable. GitHub - AvaCodeSolutions/django-email-learning: An open source Django app for creating email-based learning platforms with IMAP integration and React frontend components. The $100K Gap in Kubernetes Security Tooling Function Calling Harness: From 6.75% to 100%
GitHub - srinathsankara/agent-recall-ai: Your AI agent never starts over again. Framework-agnostic session checkpointing - survive context limits, cost overruns, and session death.
SrinathSanka · 2026-04-30 · via Hacker News: Show HN

Your AI agent died mid-task. This is how it comes back.

PyPI Python Tests License Protected by agent-recall-ai


What is this for? (non-technical version)

Imagine you ask an AI assistant to help you with a big project — writing a report, refactoring code, building an API. It works away for an hour, makes dozens of decisions, and then... it runs out of memory and forgets everything it was doing. When you start a new conversation, you're back to square one.

agent-recall-ai is an auto-save for AI agents.

Every decision the agent makes, every file it touches, every constraint you gave it — all saved automatically in a structured format. When the session dies, you get a compact briefing that any AI can read to pick up exactly where it left off.

Zero code changes for Claude Code users:

pip install agent-recall-ai
agent-recall-ai install-hooks

That's it. Every Claude Code session is now automatically checkpointed at the end of each response. Your work is protected.


The problem is real — it's in every framework's GitHub issues

Framework Open issue
OpenAI Codex #3997"Session dies halfway, starts from scratch"
Claude Code #40286"Lost all context at 80K tokens"
Google ADK #1738"No checkpoint/resume support"
Microsoft Copilot #1535"Context reset mid-refactor"
Kiro #4976"Long tasks need session persistence"

The context window fills. The agent dies. You restart from zero — losing every decision, every rejected alternative, every hard-won constraint.

agent-recall-ai solves this. It snapshots your agent's reasoning state in a format designed for cold revival, not just compression.


Zero-code protection for Claude Code

pip install agent-recall-ai
agent-recall-ai install-hooks          # adds a Stop hook to .claude/settings.json

Every Claude Code session now auto-saves a checkpoint when it ends. No code changes. No API keys. Resume any session:

agent-recall-ai resume <session-name>

Works with Cursor and Windsurf too: --tool cursor / --tool windsurf


Quick start — under 30 seconds

pip install agent-recall-ai
from agent_recall_ai import Checkpoint

with Checkpoint("refactor-auth") as cp:
    cp.set_goal("Replace python-jose with PyJWT")
    cp.add_constraint("Do not break the public API")
    cp.record_decision(
        "Use PyJWT",
        reasoning="Actively maintained; python-jose has unpatched CVEs",
        alternatives_rejected=["python-jose", "authlib"],
    )
    cp.record_file_modified("auth/tokens.py")
    cp.record_tokens(prompt=18000, completion=2000)
    # State auto-saves to .agent-recall-ai/

When the context window fills (or the process dies), resume instantly:

from agent_recall_ai import resume

state = resume("refactor-auth")
print(state.resume_prompt())
## Resuming Agent Session
**Session:** refactor-auth  |  **Checkpoint:** #3
**Started:** 2025-04-28 14:22 UTC

### Goals
- Replace python-jose with PyJWT

### Active Constraints
- Do not break the public API

### Decisions Made
- **Use PyJWT**
  Reason: Actively maintained; python-jose has unpatched CVEs
  Rejected: python-jose, authlib

### Files Modified
- `auth/tokens.py`

**Token usage so far:** 20,000 tokens  |  **Cost:** $0.0014

That's it. No server. No config. No framework lock-in.


How it works — the Hydration Flow

graph TD
    subgraph Session["Agent Live Session"]
        A([Agent starts task]) --> B[Goals and Constraints set]
        B --> C{Work happens}
        C --> D[record_decision]
        C --> E[record_file_modified]
        C --> F[record_tokens]
        D & E & F --> G[(Checkpoint State\nauto-saved to disk)]
    end

    subgraph Death["Session Death"]
        G -->|Context limit hit| H([Context window full])
        H --> I([Session terminated])
    end

    subgraph Hydration["Hydration Flow — Cold Revival"]
        I --> J["resume() loads state from disk"]
        J --> K["resume_prompt() builds structured recap"]
        K --> L{New context window}
        L --> M["Goals restored"]
        L --> N["Decisions + reasoning restored"]
        L --> O["Files touched restored"]
        L --> P["Constraints restored"]
        L --> Q["Next steps restored"]
        M & N & O & P & Q --> R([Agent continues — no restart needed])
    end
Loading

The critical insight: a prose summary loses structured data. agent-recall-ai stores decisions as queryable records with reasoning and rejected alternatives. When the new session starts, it gets a compact, structured prompt — not a wall of summarized text.


Compare: agent-recall-ai vs. the alternatives

agent-recall-ai /compact Manual summarization LangGraph persistence
Decision + reasoning preserved Structured Best-effort prose Usually lost Tool calls only
Constraints preserved Always Often dropped Rarely Not tracked
Alternatives rejected Per decision No No No
Files touched With action + desc No Sometimes State only
Cost tracking Per call, USD No No No
Real-time alerts 5 monitors No No No
Works offline SQLite default Yes Yes Needs infra
Framework agnostic Yes Yes Yes LangGraph only
PII redaction Pre-serialization No No No
Schema versioning BFS migration No No No
Multi-agent handoff as_handoff() No No Graph edges only

Benchmark (from scripts/benchmark.py — 60-turn sessions, 5 seeds):

Strategy Decision recall Constraint recall Resume tokens Composite score
agent-recall-ai 100% 100% ~270 100%
Summarization 56% 71% ~182 53%
Truncation 100% 13% 47,175 64%

Summarization uses fewer tokens but silently drops half your decisions and most of your constraints. Truncation consumes 47K tokens of context headroom while discarding everything from the first 80% of the session. agent-recall-ai's resume prompt is tiny (~270 tokens), perfectly structured, and loses nothing.


Dashboard (AgentPrism)

Open dashboard/index.html in any browser — no server, no install. Click Load Demo to explore a live session. Every row, card, and stat is clickable — opens a detail panel with full context.

Overview — goals, constraints, decisions, and context pressure at a glance

Dashboard Overview

Decision Tree — every "why" preserved, searchable, filterable

Decisions Tab

Decision Anchors (⚓) are protected from context compression. Keywords like decided, rejected, because, constraint score 1.0 — they survive any pruning pass. The reasoning chain lives forever.

Event Timeline — full session history in chronological order

Timeline Tab

Tokens & Cost — real-time spend with prompt caching savings

Tokens & Cost Tab

Alerts — real-time warnings from 5 built-in monitors

Alerts Tab


Core features

Async and decorator support

# Async context manager — works with every modern agent framework
async with Checkpoint("my-async-agent") as cp:
    cp.set_goal("Analyze sales data")
    result = await openai_client.chat.completions.create(...)
    cp.record_tokens(prompt=result.usage.prompt_tokens,
                     completion=result.usage.completion_tokens)
# Non-blocking save via asyncio.to_thread on exit

# One-line decorator — sync or async, both work
@checkpoint("refactor-auth")
async def run_agent(goal: str, cp=None):
    cp.set_goal(goal)
    cp.add_constraint("Do not break the public API")
    result = await do_work()
    cp.record_decision("Chose streaming", reasoning="Lower latency")
    return result

# cp is injected automatically when declared as a parameter
await run_agent("Replace python-jose with PyJWT")

Decision Anchors — the reasoning chain is sacred

Every decision is stored with its full reasoning and alternatives considered:

cp.record_decision(
    "Use JWT in httpOnly cookie",
    reasoning="CSRF risk is lower than XSS at our scale",
    alternatives_rejected=["localStorage", "sessionStorage"],
    tags=["security", "auth"],
)

When context is compressed, Decision Anchors are never pruned. Keywords like decided, rejected, because, constraint, must not lock a message in memory with a score of 1.0. You chose PyJWT three weeks and 200K tokens ago — the new session still knows why.

Real-time monitors — alerts before catastrophe

from agent_recall_ai import Checkpoint, CostMonitor, TokenMonitor, DriftMonitor

with Checkpoint(
    "long-refactor",
    monitors=[
        CostMonitor(budget_usd=5.00),               # raises CostBudgetExceeded at $5
        TokenMonitor(warn_at=0.70, compress_at=0.88),  # alerts at 70%/88% fill
        DriftMonitor(),                              # detects constraint violations
    ],
) as cp:
    ...
Monitor Fires when
CostMonitor Spend exceeds budget; raises CostBudgetExceeded
TokenMonitor Context fills past warning/compression thresholds
DriftMonitor Agent output contradicts recorded constraints
PackageHallucinationMonitor Tool calls reference non-existent packages
ToolBloatMonitor Repetitive tool calls suggest an infinite loop

Enterprise privacy — secrets never hit disk

from agent_recall_ai.privacy import PIIRedactor, SensitivityLevel

redactor = PIIRedactor(sensitivity=SensitivityLevel.HIGH)
# Scans for: API keys, passwords, emails, SSNs, credit cards, private IPs

with Checkpoint("prod-deploy", redactor=redactor) as cp:
    cp.record_decision(
        "Rotate DB credentials",
        reasoning="Old password was SuperSecret123 — now rotated",
    )
    # Saved to disk: reasoning="... [REDACTED:password] — now rotated"
    # In memory (live agent): original value retained

14 built-in regex PII categories. Custom rules via RedactionRule. dry_run=True for audit mode. hash_redacted=True for deterministic correlation tokens across checkpoints.

Microsoft Presidio upgrade (NER-based, catches contextual PII like names and locations):

from agent_recall_ai.privacy.presidio_backend import PresidioBackend
from agent_recall_ai.privacy import PIIRedactor

backend = PresidioBackend(entities=["PERSON", "LOCATION", "EMAIL_ADDRESS", "PHONE_NUMBER"])
redactor = PIIRedactor(sensitivity=SensitivityLevel.HIGH, extra_backend=backend)
# Now catches: "Contact John Smith at his office in New York"

Install: pip install 'agent-recall-ai[presidio]' + python -m spacy download en_core_web_lg

Schema versioning — checkpoints survive upgrades

from agent_recall_ai.privacy import VersionedSchema

with Checkpoint("future-proof", schema=VersionedSchema()) as cp:
    ...
# Every checkpoint carries schema_version="1.0.0"
# BFS migration graph handles forward AND backward compatibility
# A checkpoint saved today loads cleanly 6 months from now

Semantic compression — protect what matters

from agent_recall_ai.core.semantic_pruner import SemanticPruner

pruner = SemanticPruner()
compressed, stats = pruner.compress_context(messages, target_tokens=4096)
print(stats)
# {"original_tokens": 22000, "compressed_tokens": 4096,
#  "anchors_protected": 7, "compression_ratio": 0.81}

Decision Anchors score 1.0 and are never dropped. Other messages are ranked by embedding similarity (or keyword importance when sentence-transformers is not installed). Typical result: 80% token reduction, 95%+ reasoning retention.

Framework adapters — 6 frameworks, zero lock-in

# OpenAI SDK — with ConversationRepair for orphaned tool_call IDs
from agent_recall_ai.adapters import OpenAIAdapter
adapter = OpenAIAdapter(cp, repair_conversations=True)
client = adapter.wrap(openai.OpenAI())
# If the session was interrupted mid-tool-call, the history is auto-repaired

# Anthropic SDK — automatic prompt caching (90% cost reduction)
from agent_recall_ai.adapters import AnthropicAdapter
adapter = AnthropicAdapter(cp)   # enable_prompt_caching=True by default
# Injects cache_control breakpoints on system, tools, and last user message
# Pre-counts tokens before each call → state.metadata["pre_inference_tokens"]
client = adapter.wrap(anthropic.Anthropic())

# LangChain
from agent_recall_ai.adapters import LangChainAdapter
handler = LangChainAdapter(cp).as_callback()

# CrewAI — records each task completion as a Decision Anchor
from agent_recall_ai.adapters import CrewAIAdapter
crew = CrewAIAdapter(cp).wrap(Crew(agents=[...], tasks=[...]))
result = crew.kickoff()  # every task boundary auto-checkpointed

# smolagents (HuggingFace) — records every reasoning step
from agent_recall_ai.adapters import smolagentsAdapter
agent = smolagentsAdapter(cp).wrap(CodeAgent(tools=[...], model=model))
result = agent.run("Analyze the sales data in data.csv")
Framework Stars Adapter
OpenAI SDK OpenAIAdapter + ConversationRepair
Anthropic SDK AnthropicAdapter + prompt caching + pre-inference token count
LangGraph 47K LangGraphAdapter — drop-in BaseCheckpointSaver
LangChain 90K LangChainAdapter
CrewAI 26K CrewAIAdapter
smolagents 12K smolagentsAdapter
PydanticAI coming soon — PR welcome
AutoGen 38K coming soon — PR welcome

LangGraph drop-in — one line change

If you're already using LangGraph, agent-recall-ai is a zero-effort drop-in:

from langgraph.graph import StateGraph
from agent_recall_ai.adapters import LangGraphAdapter

# Before: MemorySaver() or SqliteSaver()
# After:
checkpointer = LangGraphAdapter.from_sqlite("checkpoints.db")

graph = builder.compile(checkpointer=checkpointer)
config = {"configurable": {"thread_id": "my-session"}}

# Every .invoke() is now auto-checkpointed with full reasoning state
result = graph.invoke({"messages": [...]}, config)

# After session death — resumes from exact checkpoint
result = graph.invoke(None, config)

All three storage backends supported:

  • LangGraphAdapter.from_memory() — in-process (tests, ephemeral tasks)
  • LangGraphAdapter.from_sqlite("path.db") — single-machine production
  • LangGraphAdapter.from_redis("redis://...") — distributed, multi-agent

Thread forking — explore alternatives without losing history

# Fork the main session to explore an alternative reasoning path
checkpointer.fork("main-session", "alt-branch-1")

alt_config = {"configurable": {"thread_id": "alt-branch-1"}}
alt_result = graph.invoke({"messages": [...]}, alt_config)
# main-session is unchanged; alt-branch-1 diverges from the same checkpoint

Forking also works directly on Checkpoint instances:

with Checkpoint("main-task") as cp:
    cp.set_goal("Refactor auth module")
    cp.record_decision("Use PyJWT", reasoning="Better maintained")

    # Explore a different approach
    alt = cp.fork("main-task-alt")
    alt.record_decision("Try python-jose instead", reasoning="Lighter weight")
    alt.save()
    # parent unchanged, alt has all parent state plus new decision

OpenTelemetry export — traces in Datadog, Jaeger, Grafana

from agent_recall_ai.exporters import OTLPExporter

# Jaeger (local dev)
exporter = OTLPExporter(endpoint="http://localhost:4317", insecure=True)

# Datadog APM
from agent_recall_ai.exporters import DatadogExporter
exporter = DatadogExporter(env="production", service="my-agent")

with Checkpoint("prod-task") as cp:
    exporter.attach(cp)   # auto-exports a trace on every save
    ...

# Or export after-the-fact
exporter.export_session(cp.state)

Each session produces a span hierarchy:

checkpoint:{seq}
├── decision:{id}       attributes: summary, reasoning, alternatives_rejected, tags
├── tool:{name}         attributes: input_summary, output_tokens, compressed
└── alert:{type}        attributes: severity, message

Token usage, cost, cache savings, and context utilization appear as span attributes — queryable in any OTLP backend.

Install: pip install 'agent-recall-ai[otlp-grpc]' or pip install 'agent-recall-ai[otlp-http]'

Redis for production / distributed agents

from agent_recall_ai.persistence.redis_provider import RedisProvider

store = RedisProvider(url="redis://redis.internal:6379", prefix="myapp")
with Checkpoint("prod-task", store=store) as cp:
    ...
# TTL: 7 days (active), 1 day (completed)
# Publishes events to myapp:events on each save
# Sorted index for fast session listing

Multi-agent handoff

# Agent 1 completes its subtask
payload = cp.as_handoff()
# {"session_id": "...", "decisions": [...], "constraints": [...],
#  "files_modified": [...], "next_steps": [...], "cost_usd": 0.14}

# Agent 2 picks up exactly where Agent 1 left off
with Checkpoint("agent-2", store=store) as cp2:
    cp2.set_context(f"Continuing from agent-1 (${payload['cost_usd']:.2f} spent)")
    for d in payload["decisions"]:
        cp2.record_decision(d["summary"], reasoning=d["reasoning"])

CLI

# Session management
agent-recall-ai list                            # all sessions (color-coded by status)
agent-recall-ai list --status active            # filter by status
agent-recall-ai inspect refactor-auth           # full details with decisions, files, alerts
agent-recall-ai inspect refactor-auth --full    # every decision and tool call
agent-recall-ai resume  refactor-auth           # print resume prompt — paste into new session
agent-recall-ai export  refactor-auth --format json > state.json
agent-recall-ai export  refactor-auth --format handoff > handoff.json
agent-recall-ai export  refactor-auth --format agenttest > test_auth.py
agent-recall-ai delete  refactor-auth
agent-recall-ai status                          # total cost, token spend, session counts

# One-time setup (zero-code protection)
agent-recall-ai install-hooks                   # Claude Code
agent-recall-ai install-hooks --tool cursor     # Cursor
agent-recall-ai install-hooks --tool windsurf   # Windsurf
agent-recall-ai install-hooks --global          # install globally (all projects)
agent-recall-ai install-hooks --dry-run         # preview changes without writing

Architecture

agent_recall_ai/
├── checkpoint.py            Primary API — Checkpoint context manager
├── core/
│   ├── state.py             TaskState (Pydantic v2), Decision, FileChange, Alert
│   ├── tracker.py           Token cost table (GPT-4o, Claude 3.5 Sonnet, etc.)
│   ├── compressor.py        Tool output + decision log compression
│   └── semantic_pruner.py   SemanticPruner with Decision Anchor protection
├── storage/
│   ├── disk.py              DiskStore — zero-config SQLite (default)
│   └── memory.py            MemoryStore — for tests
├── persistence/
│   ├── sqlite_provider.py   Full SQLite with decision_log full-text search
│   └── redis_provider.py    Redis with TTL, pub/sub, sorted index
├── monitors/                CostMonitor, TokenMonitor, DriftMonitor, ...
├── adapters/
│   ├── anthropic_adapter.py Prompt caching + pre-inference token count
│   ├── openai_adapter.py    ConversationRepair for orphaned tool_call IDs
│   ├── langgraph_adapter.py BaseCheckpointSaver drop-in + thread forking
│   ├── langchain_adapter.py CallbackHandler + MessageHistory
│   ├── crewai_adapter.py    kickoff() + task boundary instrumentation
│   └── smolagents_adapter.py run() + step() + log harvesting
├── exporters/
│   ├── otlp.py              OpenTelemetry spans → Datadog / Jaeger / Grafana
│   └── datadog.py           Datadog APM convenience wrapper
├── privacy/
│   ├── redactor.py          PIIRedactor — 14 categories, runs pre-serialization
│   ├── versioned_schema.py  VersionedSchema — BFS migration graph
│   └── presidio_backend.py  Optional NER-based PII via Microsoft Presidio
└── cli/main.py              Typer CLI (list, inspect, resume, export, delete, install-hooks)

Key design decisions and why:

  • Pydantic v2 for TaskState — type-safe, fast JSON via model_dump_json(), validates on load
  • Explicit, not magic — no ContextVar injection; cp.record_decision() is intentional
  • Decision Anchors are never pruned — the reasoning chain is irreplaceable; token count isn't
  • Secrets never hit storagePIIRedactor runs on a deep copy before store.save()
  • SQLite default, Redis optional — zero config for local dev; Redis for distributed prod
  • Adapter plugin registry@register_adapter("name") — add frameworks without forking

Installation

pip install agent-recall-ai              # minimal
pip install agent-recall-ai[redis]       # + Redis support
pip install agent-recall-ai[langchain]   # + LangChain integration
pip install agent-recall-ai[langgraph]   # + LangGraph BaseCheckpointSaver
pip install agent-recall-ai[crewai]      # + CrewAI integration
pip install agent-recall-ai[smolagents]  # + smolagents integration
pip install agent-recall-ai[semantic]    # + embedding-based compression
pip install agent-recall-ai[otlp-grpc]  # + OpenTelemetry gRPC export
pip install agent-recall-ai[otlp-http]  # + OpenTelemetry HTTP export
pip install agent-recall-ai[presidio]   # + NER-based PII (Microsoft Presidio)
pip install agent-recall-ai[all]        # everything

# Development
pip install -e ".[dev]"
pytest tests/ -v    # 289 passing, 17 skipped (optional deps)

Why not just use /compact?

/compact summarizes your conversation into a prose block. Better than nothing, but:

  1. Structured reasoning becomes prose. "Use PyJWT" is a sentence in a summary, not a queryable decision with alternatives and rationale.
  2. Constraints disappear. "Must not break the public API" was said 40K tokens ago. Summarization drops it.
  3. It's reactive, not proactive. You remember to run it after the context fills. agent-recall-ai saves on every 10th token update automatically.
  4. No cost, file, or next-step tracking. No multi-agent handoff.
  5. Nothing to test. agent-recall-ai's state is a Pydantic model — every field is typed, validated, and testable.

agent-recall-ai doesn't replace /compact — it eliminates the need for it.


Add the badge to your project

[![Protected by agent-recall-ai](https://img.shields.io/badge/agent--recall-protected-00c896)](https://github.com/srinathsankara/agent-recall-ai)

Protected by agent-recall-ai


License

MIT. See LICENSE.


Built to solve a real problem that has open GitHub issues in every major agent framework. File an issue if your agent died on something this should have caught.

Made by @srinathsankara