tigris-agent-kit — Claude Code skill: storage for AI agents
A skill for Tigris object storage workflows: isolated dataset forks, per-agent buckets with TTL, snapshots and bucket webhooks.
npx skills add tigrisdata/skills --skill tigris-agent-kit -a claude-codeWhat tigris-agent-kit does
The skill covers four building blocks for agent storage on Tigris: forks, workspaces, checkpoints and coordination. A fork is an independent bucket holding a copy of a shared dataset, and copy-on-write means it appears instantly at any size. A workspace hands one agent its own bucket with a TTL and scoped credentials. A checkpoint captures bucket state, and restore spins up a new fork from that snapshot while the original stays untouched.
Coordination wires bucket notifications so a write fires a webhook and the next agent starts without polling. Every function returns TigrisResponse<T>, a union of { data: T } or { error: Error }, so check error first. Credentials come from TIGRIS_STORAGE_ACCESS_KEY_ID and TIGRIS_STORAGE_SECRET_ACCESS_KEY, or you pass them through the config parameter.
You need the Tigris CLI and the @tigrisdata/agent-kit package. Forks and checkpoints require snapshots enabled on the base bucket, otherwise createForks fails with a snapshots-not-enabled error. Pair every createForks with teardownForks: orphaned buckets keep billing. Sharing one access key across agents defeats the scoped credentials the kit hands out per fork.
What it helps with
- give several agents their own copy of one dataset
- hand an agent a scratch bucket that expires on its own
- save a run mid-flight and branch from it later
- start the next agent when a result lands in a bucket
- revoke credentials and delete buckets after a run
Example prompts for the agent
- create three forks of the my-dataset bucket for parallel runs
- checkpoint training-data as epoch-50 and restore it into a new fork
- set up a webhook on pipeline-bucket so agent B starts after a write to results/
How to install tigris-agent-kit
1Skills CLI (Vercel)
npx skills add tigrisdata/skills --skill tigris-agent-kit -a claude-code2Manually: put the files in place
~/.claude/skills/tigris-agent-kit/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/tigris-agent-kit/
1Skills CLI (Vercel)
npx skills add tigrisdata/skills --skill tigris-agent-kit -a codex2Manually: put the files in place
.agents/skills/tigris-agent-kit/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add tigrisdata/skills --skill tigris-agent-kit -a cursor2Manually: put the files in place
.cursor/skills/tigris-agent-kit/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install tigrisdata/skills tigris-agent-kit2Manually: put the files in place
.github/skills/tigris-agent-kit/SKILL.md1Skills CLI (Vercel)
npx skills add tigrisdata/skills --skill tigris-agent-kit -a gemini-cli2Platform CLI
gemini skills install https://github.com/tigrisdata/skills --path skills/tigris-agent-kitManually: put the files in place
.devin/skills/tigris-agent-kit/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add tigrisdata/skills --skill tigris-agent-kit -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about tigris-agent-kit
How do I install tigris-agent-kit in Claude?
Run npx skills add tigrisdata/skills --skill tigris-agent-kit -a claude-code. The skill lands in ~/.claude/skills/tigris-agent-kit/SKILL.md.
What does tigris-agent-kit do?
It composes @tigrisdata/storage and @tigrisdata/iam into four blocks: forks for dataset copies, workspaces with TTL, checkpoints with snapshots, and coordination through bucket webhooks.
What do I need before using it?
The Tigris CLI, the @tigrisdata/agent-kit package and Tigris access keys. Forks and checkpoints also need snapshots enabled on the base bucket.
Source text
SKILL.md · MIT
---
name: tigris-agent-kit
description: Use when building AI agent storage workflows on Tigris — forks for isolated dataset copies, workspaces for per-agent buckets with TTL, checkpoints for snapshot/restore, and coordination for event-driven pipelines via bucket webhooks. Triggers on "@tigrisdata/agent-kit", "agent storage", "agent workspace", "agent fork", "isolated agent environment", "checkpoint and restore", "bucket webhook", "multi-agent pipeline"
---
# Tigris Agent Kit
High-level storage workflows for AI agents on Tigris. Composes `@tigrisdata/storage` and `@tigrisdata/iam` primitives into four building blocks: **forks**, **workspaces**, **checkpoints**, and **coordination**.
## Prerequisites
**Before doing anything else**, ensure the Tigris CLI is installed:
```bash
tigris help || npm install -g @tigrisdata/cli
```
If you need to install it, tell the user: "I'm installing the Tigris CLI (`@tigrisdata/cli`) so we can work with Tigris object storage."
Then install the agent-kit package:
```bash
npm install @tigrisdata/agent-kit
```
## Configuration
All functions accept an optional `config` parameter. When omitted, the SDK reads from environment variables:
```bash
TIGRIS_STORAGE_ACCESS_KEY_ID=tid_...
TIGRIS_STORAGE_SECRET_ACCESS_KEY=tsec_...
```
Pass config explicitly when needed:
```typescript
const config = {
accessKeyId: 'tid_...',
secretAccessKey: 'tsec_...',
};
```
All functions return a `TigrisResponse<T>` — a discriminated union of `{ data: T }` or `{ error: Error }`. Always check `error` first.
## Quick Reference
| Building Block | Purpose | Functions |
|---|---|---|
| **Forks** | N isolated copies of a shared dataset | `createForks`, `teardownForks` |
| **Workspaces** | Dedicated per-agent bucket with TTL | `createWorkspace`, `teardownWorkspace` |
| **Checkpoints** | Snapshot bucket state, restore as fork | `checkpoint`, `restore`, `listCheckpoints` |
| **Coordination** | Event-driven pipelines via webhooks | `setupCoordination`, `teardownCoordination` |
## When to Use Which
| Scenario | Use |
|---|---|
| Spin up N agents that each need their own copy of a dataset | **Forks** |
| Give one agent a scratch bucket that auto-cleans after a day | **Workspace** |
| Save agent state mid-run so you can branch from it later | **Checkpoint** + **Restore** |
| Trigger downstream agent when an upstream agent writes a result | **Coordination** |
## Forks — Parallel Agent Copies
Each fork is an independent bucket with isolated storage. Copy-on-write — instant at any size, zero data duplication. The base bucket must have snapshots enabled.
```typescript
import { createForks, teardownForks } from '@tigrisdata/agent-kit';
const { data: forkSet, error } = await createForks('my-dataset', 3, {
prefix: 'experiment-run-42',
credentials: { role: 'Editor' },
});
if (error) throw error;
for (const fork of forkSet.forks) {
// fork.bucket — the bucket name
// fork.credentials?.accessKeyId / secretAccessKey — scoped per fork
}
// Revokes credentials and deletes all fork buckets
await teardownForks(forkSet);
```
Detailed options, lifecycle, and patterns: read `./resources/forks.md`.
## Workspaces — Per-Agent Buckets
Provision a dedicated bucket for one agent. Optional TTL auto-expires objects; optional scoped credentials enforce least privilege.
```typescript
import { createWorkspace, teardownWorkspace } from '@tigrisdata/agent-kit';
const { data: workspace } = await createWorkspace('agent-workspace-abc', {
ttl: { days: 1 },
enableSnapshots: true,
credentials: { role: 'Editor' },
});
// Use workspace.bucket and workspace.credentials with @tigrisdata/storage
await teardownWorkspace(workspace);
```
Detailed options, TTL behavior, and patterns: read `./resources/workspaces.md`.
## Checkpoints — Snapshot and Restore
Capture bucket state at a point in time; restore creates a copy-on-write fork from that snapshot. Original is untouched.
```typescript
import { checkpoint, restore, listCheckpoints } from '@tigrisdata/agent-kit';
const { data: ckpt } = await checkpoint('training-data', { name: 'epoch-50' });
const { data: list } = await listCheckpoints('training-data');
const { data: restored } = await restore(
'training-data',
ckpt.snapshotId,
{ forkName: 'training-data-retry' },
);
// restored.bucket — independent fork at that point in time
```
Detailed options and rollback patterns: read `./resources/checkpoints.md`.
## Coordination — Event-Driven Pipelines
Wire bucket notifications so writes fire webhooks instead of requiring polling. Use it to chain agents: agent A writes a result, Tigris fires a webhook, agent B starts.
```typescript
import { setupCoordination, teardownCoordination } from '@tigrisdata/agent-kit';
await setupCoordination('pipeline-bucket', {
webhookUrl: 'https://my-service.com/webhook',
filter: 'WHERE `key` REGEXP "^results/"',
auth: { token: 'my-webhook-secret' },
});
await teardownCoordination('pipeline-bucket');
```
Filter syntax, webhook auth, and pipeline patterns: read `./resources/coordination.md`.
## API Reference
### Forks
| Function | Description |
|---|---|
| `createForks(baseBucket, count, options?)` | Snapshot + fork N times + scoped credentials |
| `teardownForks(forkSet, options?)` | Revoke credentials + delete forks |
### Workspaces
| Function | Description |
|---|---|
| `createWorkspace(name, options?)` | Create bucket + TTL + scoped credentials |
| `teardownWorkspace(workspace, options?)` | Revoke credentials + delete bucket |
### Checkpoints
| Function | Description |
|---|---|
| `checkpoint(bucket, options?)` | Snapshot a bucket, returns snapshot ID |
| `restore(bucket, snapshotId, options?)` | Fork from a snapshot |
| `listCheckpoints(bucket, options?)` | List all snapshots for a bucket |
### Coordination
| Function | Description |
|---|---|
| `setupCoordination(bucket, options)` | Configure bucket notifications |
| `teardownCoordination(bucket, options?)` | Clear bucket notifications |
## Critical Rules
**Always:** Check `result.error` before `result.data` | Call the corresponding `teardown*` to revoke credentials and delete buckets — agents leak buckets fast | Enable snapshots on the base bucket before calling `createForks` or `checkpoint` | Use scoped per-fork/per-workspace credentials so one agent's compromise doesn't expose others
**Never:** Reuse a single shared access key across agents — defeats the point of scoped credentials | Skip teardown on long-running services — orphaned buckets accumulate billing | Assume `restore` mutates the original bucket — it creates a new fork
## Common Mistakes
| Mistake | Fix |
|---|---|
| `createForks` fails with "snapshots not enabled" | Recreate base bucket with `enableSnapshot: true` |
| Forks not cleaned up after agent run | Always pair `createForks` with `teardownForks` in a `finally` block |
| Webhook never fires | Check `filter` syntax — must be a valid SQL `WHERE` clause against `key`, `event`, etc. |
| Workspace TTL doesn't delete bucket | TTL expires *objects*, not the bucket itself. Call `teardownWorkspace` to delete the bucket |
| Restored bucket is empty | Verify `snapshotId` exists with `listCheckpoints` before calling `restore` |
## Related Skills
- **tigris-snapshots-forking** — Lower-level snapshot and fork primitives in `@tigrisdata/storage`
- **tigris-bucket-management** — Bucket creation, regions, snapshot configuration
- **tigris-security-access-control** — IAM, scoped keys, key rotation
- **file-storage** — Core `@tigrisdata/storage` SDK for reading/writing within fork or workspace buckets
## Official Documentation
- Package: https://www.npmjs.com/package/@tigrisdata/agent-kit
- Source: https://github.com/tigrisdata/storage/tree/main/packages/agent-kit
© tigrisdata · MIT · tigrisdata/skills