@agentreserve/core
v0.1.0
Published
Governance SDK for the AgentReserve Agent Transaction Protocol (ATP)
Maintainers
Readme
@agentreserve/core
Standalone governance SDK for the AgentReserve Agent Transaction Protocol (ATP).
Features
- Policy Engine — Evaluate spending limits, time restrictions, rate limits, approval thresholds, and connector-scoped rules
- Audit Logger — Interface + in-memory implementation for audit trail recording
- Idempotency Manager — Interface + in-memory implementation for request deduplication
- Action State Machine — Valid state transitions and lifecycle management
- Error Taxonomy — Structured error classes for all ATP error codes
- Type Definitions — Full TypeScript types for the ATP protocol
Usage
import { PolicyEngine, InMemoryPolicyStore } from "@agentreserve/core";
const engine = new PolicyEngine({
store: new InMemoryPolicyStore(),
});
const result = await engine.evaluate(
"org_123",
"execute",
{ amount: 5000, currency: "usd" },
{ detailed: true }
);Storage Agnostic
The SDK uses dependency injection. Provide your own store implementations:
PolicyStore— for policy dataAuditStore— for audit logsIdempotencyStore— for idempotency recordsActionStore— for action persistence
In-memory implementations are included for testing and local development.
License
MIT
