Skip to content

Releases: KeelStack-me/guard

v0.1.0 — First Public Release of KeelStack Guard

20 Apr 20:08

Choose a tag to compare

KeelStack Guard v0.1.0

KeelStack Guard v0.1.0 is the first public release of a lightweight runtime safety layer for TypeScript AI agents.

This package helps prevent expensive or dangerous duplicate tool effects by adding three practical guardrails around any async action:

  • Idempotency gate to replay prior results for the same operation key.
  • Budget enforcer to cap per-user LLM/tool spend.
  • Risk gate to classify and optionally block high-risk actions.

What is included

  • Zero-framework core guard API that works with any async action.
  • In-memory defaults for both idempotency ledger and budget tracking.
  • Optional pluggable integrations via custom ledger and budget store interfaces.
  • Type-safe exports for guard configuration and result handling.
  • Examples for popular agent/tool stacks, including Vercel AI SDK, LangGraph.js, and Mastra.
  • MIT-licensed package with public npm publish configuration.

Why this release matters

  • Reduces duplicate side effects from retries and network instability.
  • Prevents runaway AI/tool spend with configurable usage thresholds.
  • Adds explicit risk-aware execution controls for irreversible operations.

Quality and stability

  • Type-checked and tested.
  • High test coverage.

Compatibility

  • Node.js 20+
  • TypeScript 5+ recommended

Install

npm install @keelstack/guard

Notes

  • No breaking changes in this initial public release.
  • ioredis is optional and can be used for custom persistence scenarios.