golem-custom-snapshot-ts

Configure snapshot-based recovery and custom state serialization for TypeScript Golem agents.

Updated May 17, 2026
One-click install
npx skills add https://github.com/Rust-soham/golem-claw --skill golem-custom-snapshot-ts-rust-soham
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golem-custom-snapshot-ts
Source: https://github.com/Rust-soham/golem-claw/tree/main/packages/golem/.agents/skills/golem-custom-snapshot-ts
Command: npx skills add https://github.com/Rust-soham/golem-claw --skill golem-custom-snapshot-ts-rust-soham

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Long-running Golem agents can become slow to recover because their oplog grows over time, and upgrades can be difficult when state serialization needs to change between versions.

Core Features & Use Cases

  • Snapshot-based recovery: Compact the oplog so recovery starts from the latest snapshot rather than replaying the full history.
  • Custom saveSnapshot/loadSnapshot: Implement a bespoke serialization format (including binary) for TypeScript agent state, enabling cross-version compatibility or compact state representation.
  • Snapshotting configuration: Use the snapshotting option (disabled/enabled/every/periodic) to control when snapshots are taken for durable agents.

Quick Start

Create or update your TypeScript agent to override saveSnapshot and loadSnapshot, then enable snapshotting with snapshotting: { every: 1 } (or snapshotting: { periodic: '30s' }) to ensure regular snapshot compaction during recovery.

Frequently Asked Questions about golem-custom-snapshot-ts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I speed up Golem durable agent recovery time?

Snapshot-based recovery speeds up durable agent recovery by compacting the oplog so the agent resumes from the latest snapshot instead of replaying full history. Configure this using the snapshotting option in the @agent decorator.

Can I use custom binary serialization for TypeScript agent state in Golem?

Yes, you can implement custom binary serialization for TypeScript agent state by overriding the saveSnapshot and loadSnapshot methods in your BaseAgent class, enabling compact state representation and cross-version compatibility.

How do I configure periodic snapshotting for Golem agents?

Configure periodic snapshotting for Golem agents by setting snapshotting: { periodic: '30s' } in the @agent decorator, or use snapshotting: { every: 1 } to trigger a snapshot on every operation for regular oplog compaction.

When do I need custom snapshots for durable agents?

Custom snapshots are needed for durable agents with frequent state changes like heartbeat loops, polling workflows, recurring tasks, or high-volume event handling, where long oplogs would otherwise slow down recovery and complicate state version upgrades.

Does snapshotting support cross-version upgrades for TypeScript agents?

Yes, snapshotting supports cross-version upgrades by allowing you to implement a bespoke serialization format with saveSnapshot and loadSnapshot, ensuring consistent byte formats that can adapt when state serialization needs to change between versions.

What are the limitations of oplog replay without snapshotting in Golem?

Without snapshotting, long-running Golem agents become slow to recover because their oplog grows over time, requiring the full history to be replayed. Upgrades are also difficult when state serialization needs to change between versions.