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-cacheIn agents: Use ctx.kv for programmatic access. See Key-Value Storage.
S3 Storage
Manage S3-compatible storage resources for file uploads and downloads.
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-storageThis adds S3 credentials to your local .env file automatically.
List 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>In agents: Use Bun's s3 API (import { s3 } from "bun"). See Object Storage (S3).
Vector 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>Upsert Vectors
Add or update vectors from a JSON file:
# Upsert from file
agentuity cloud vector upsert products --file vectors.json
# File format: array of { key, document?, embeddings?, metadata? }Example vectors.json:
[
{
"key": "product-123",
"document": "Ergonomic office chair with lumbar support",
"metadata": { "category": "furniture", "price": 299 }
},
{
"key": "product-456",
"document": "Standing desk with adjustable height",
"metadata": { "category": "furniture", "price": 599 }
}
]Delete a Vector
agentuity cloud vec delete <vector-id>View Statistics
# Stats for all namespaces
agentuity cloud vector stats
# Stats for specific namespace
agentuity cloud vector stats productsList Namespaces
agentuity cloud vector namespacesDelete a Namespace
Delete an entire namespace and all its vectors:
agentuity cloud vector delete-namespace old-productsDestructive Operation
Deleting a namespace removes all vectors within it. This cannot be undone.
In agents: Use ctx.vector for programmatic access. See Vector Storage.
Database
Manage database resources and run SQL queries.
List Databases
agentuity cloud db listCreate a Database
agentuity cloud db create --name my-database
agentuity cloud db create --name analytics-db --description "Analytics data warehouse"| Option | Description |
|---|---|
--name <name> | Custom database name |
--description <text> | Optional database description |
This adds DATABASE_URL to your local .env file automatically.
Get 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>In agents: Use Bun's sql API (import { sql } from "bun"). See Database.
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>In agents: Use ctx.stream for programmatic access. See Durable Streams.
Redis
View Redis connection details for your organization.
Show Connection URL
# Show Redis URL (credentials masked in terminal)
agentuity cloud redis show
# Show with credentials visible
agentuity cloud redis show --show-credentials
# JSON output (credentials always visible)
agentuity --json cloud redis showOrganization Resource
Redis is provisioned at the organization level. Contact support if you need Redis enabled for your organization.
To use Redis locally, add the URL to your .env:
REDIS_URL=redis://...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!