agentuity-cli-cloud-keyvalue-set
Set a key and value in the keyvalue storage. Requires authentication. Use for Agentuity cloud platform operations
When & Why to Use This Skill
The Agentuity Cloud Key-Value Set skill is a powerful utility for managing persistent data within the Agentuity cloud platform. It allows developers and AI agents to securely store, update, and manage key-value pairs with support for namespacing and Time-To-Live (TTL) configurations. This tool is essential for maintaining application state, managing configuration settings, and implementing caching strategies in a cloud-native environment.
Use Cases
- User Data Persistence: Securely store and update user profiles or preferences in a structured JSON format within a specific production namespace.
- Automated Session Management: Create temporary session records or authentication tokens with a defined TTL to ensure automatic data expiration and enhanced security.
- Performance Caching: Cache frequently accessed data, such as rendered HTML or API responses, to reduce latency and improve the responsiveness of cloud-based services.
- State Management for AI Agents: Enable AI agents to maintain long-term memory or context by storing operational variables and status flags in the cloud storage.
| name | agentuity-cli-cloud-keyvalue-set |
|---|---|
| description | Set a key and value in the keyvalue storage. Requires authentication. Use for Agentuity cloud platform operations |
| version | "0.0.103" |
| license | Apache-2.0 |
| allowed-tools | "Bash(agentuity:*)" |
| argument-hint | "<namespace> <key> <value> [ttl]" |
| command | "agentuity cloud keyvalue set" |
| tags | "mutating updates-resource slow requires-auth" |
Cloud Keyvalue Set
Set a key and value in the keyvalue storage
Prerequisites
- Authenticated with
agentuity auth login - Project context required (run from project directory or use
--project-id)
Usage
agentuity cloud keyvalue set <namespace> <key> <value> [ttl]
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
<namespace> |
string | Yes | - |
<key> |
string | Yes | - |
<value> |
string | Yes | - |
<ttl> |
string | No | - |
Examples
Store user data:
bunx @agentuity/cli kv set production user:123 '{"name":"Alice","email":"alice@example.com"}'
Store session with 1h TTL:
bunx @agentuity/cli kv set cache session:abc "session-data-here" --ttl 3600
Cache homepage for 10m:
bunx @agentuity/cli kv set staging cache:homepage "<!DOCTYPE html>..." --ttl 600
Output
Returns JSON object:
{
"success": "boolean",
"namespace": "string",
"key": "string",
"contentType": "string",
"durationMs": "number",
"ttl": "number"
}
| Field | Type | Description |
|---|---|---|
success |
boolean | Whether the operation succeeded |
namespace |
string | Namespace name |
key |
string | Key name |
contentType |
string | Content type (application/json or text/plain) |
durationMs |
number | Operation duration in milliseconds |
ttl |
number | TTL in seconds if set |