Storage Commands
Manage Key-Value, S3, Vector, Database, and Stream storage from the CLI.
These CLI commands help you inspect and manage cloud storage during development and debugging.
Cloud Prefix Required
All storage commands require the cloud prefix. For example: agentuity cloud kv get ...
Key-Value Storage
Inspect and manage key-value data organized into namespaces.
Interactive REPL
Start an interactive session for faster exploration:
agentuity cloud kv replIn the REPL, use commands like set, get, delete, keys, and stats:
> set cache user:123 '{"name":"Alice"}'
> get cache user:123
> keys cache
> statsGet a Value
agentuity cloud kv get production user:123
agentuity cloud kv get cache session:abcSet a Value
# Store JSON data
agentuity cloud kv set production user:123 '{"name":"Alice","email":"alice@example.com"}'
# Set with TTL (expires after 1 hour)
agentuity cloud kv set cache session:abc "session-data" --ttl 3600Delete a Key
agentuity cloud kv delete production user:123
agentuity cloud kv rm cache session:abc # Using aliasList Keys
agentuity cloud kv keys production
agentuity cloud kv ls cache # Using aliasSearch Keys
agentuity cloud kv search production user
agentuity cloud kv search cache sessionView Statistics
# Stats for all namespaces
agentuity cloud kv stats
# Stats for specific namespace
agentuity cloud kv stats productionNamespace Management
A namespace is a logical container that groups related keys together. For example, you might use cache for temporary data, users for user profiles, and sessions for session state.
# List all namespaces
agentuity cloud kv list-namespaces
agentuity cloud kv ns # Using alias
# Create a namespace
agentuity cloud kv create-namespace staging
# Delete a namespace and all its keys
agentuity cloud kv delete-namespace old-cacheSDK Access
For programmatic access in agents, use ctx.kv:
await ctx.kv.set('cache', 'user:123', data);
const value = await ctx.kv.get('cache', 'user:123');See Key-Value Storage for details.
S3 Storage
Manage S3-compatible storage resources for file uploads and downloads.
Command Alias
Both cloud storage and cloud s3 work interchangeably. Examples below use s3 for brevity.
Create Storage Resource
agentuity cloud storage create --name my-storage
# or: agentuity cloud s3 create --name my-storageList Storage Resources
agentuity cloud s3 listUpload a File
agentuity cloud s3 upload ./local-file.pdfDownload a File
agentuity cloud s3 download <file-id> --output ./downloaded-file.pdfGet Storage Details
agentuity cloud s3 get <storage-id>Delete Storage Resource
agentuity cloud s3 delete <storage-id>SDK Access
For programmatic access, use Bun's native S3 APIs:
import { s3 } from "bun";
const file = s3.file("path/to/file.pdf");
await file.write(buffer);
const url = s3.presign("path/to/file.pdf", { expiresIn: 3600 });See Object Storage (S3) for details.
Object Storage (Legacy)
The cloud obj commands provide bucket-based object management. For new projects, consider using cloud s3 instead.
Interactive REPL
agentuity cloud obj replUpload a File
# Upload from file path
agentuity cloud obj put uploads images/logo.png @./logo.png
# Store JSON directly
agentuity cloud obj put assets config.json '{"api":"https://api.example.com"}'
# With custom content type
agentuity cloud obj put backups db.sql @~/backup.sql --content-type application/sqlDownload a File
agentuity cloud obj get uploads images/logo.png
agentuity cloud obj get assets config.jsonDelete a File
agentuity cloud obj delete uploads old-image.pngGenerate Public URL
# Permanent URL
agentuity cloud obj url uploads images/logo.png
# Temporary URL (expires in 1 hour)
agentuity cloud obj url uploads private-doc.pdf --expires 3600
# 5-minute presigned URL
agentuity cloud obj presigned backups db.sql --expires 300List Buckets and Files
agentuity cloud obj list-buckets
agentuity cloud obj list-keys uploads
agentuity cloud obj ls assets # Using aliasVector Storage
Search and inspect vector embeddings.
Search by Similarity
# Basic search
agentuity cloud vector search products "comfortable office chair"
# Limit results
agentuity cloud vector search docs "API documentation" --limit 5
# Set minimum similarity threshold
agentuity cloud vector search products "ergonomic" --similarity 0.8
# Filter by metadata
agentuity cloud vector search embeddings "neural networks" --metadata category=aiGet Vector by ID
agentuity cloud vec get <vector-id>Delete a Vector
agentuity cloud vec delete <vector-id>SDK Access
For programmatic access, use ctx.vector:
const results = await ctx.vector.search('products', {
query: 'comfortable chair',
limit: 10
});See Vector Storage for details.
Database
Manage database resources and run SQL queries.
List Databases
agentuity cloud db listCreate a Database
agentuity cloud db create --name my-databaseGet Database Details
agentuity cloud db get <database-id>Run SQL Queries
Execute SQL queries directly from the CLI:
# Simple query
agentuity cloud db sql "SELECT * FROM users LIMIT 10"
# Query with filtering
agentuity cloud db sql "SELECT name, email FROM users WHERE active = true"
# Insert data
agentuity cloud db sql "INSERT INTO users (name, email) VALUES ('Alice', 'alice@example.com')"View Database Logs
agentuity cloud db logs <database-id>Delete a Database
agentuity cloud db delete <database-id>SDK Access
For programmatic access, use Bun's native SQL APIs:
import { sql } from "bun";
const users = await sql`SELECT * FROM users WHERE active = ${true}`;
await sql`INSERT INTO users (name, email) VALUES (${"Alice"}, ${"alice@example.com"})`;See Database for details.
Streams
List and manage durable event streams.
List Streams
agentuity cloud stream listGet Stream Details
agentuity cloud stream get <stream-id>Delete a Stream
agentuity cloud stream delete <stream-id>SDK Access
For programmatic access, use ctx.stream:
const stream = await ctx.stream.create('export', {
contentType: 'text/csv',
});
await stream.write('data');
await stream.close();See Durable Streams for details.
Next Steps
- Configuration Commands: Manage environment variables, secrets, and API keys
- Key-Value Storage: Programmatic KV access in agents
- Object Storage (S3): File storage with Bun S3
- Database: SQL queries with Bun SQL
- Vector Storage: Semantic search in agents
Need Help?
Join our Community for assistance or just to hang with other humans building agents.
Send us an email at hi@agentuity.com if you'd like to get in touch.
Please Follow us on
If you haven't already, please Signup for your free account now and start building your first agent!