AgentSkillsCN

agentuity-cli-cloud-keyvalue-set

在键值存储中设置键与值。需进行身份验证。可用于 Agentuity 云平台的运维操作。

SKILL.md
--- frontmatter
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.1.24"
license: Apache-2.0
allowed-tools: "Bash(agentuity:*)"
argument-hint: "<namespace> <key> <value> [ttl]"
metadata:
  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

Usage

bash
agentuity cloud keyvalue set <namespace> <key> <value> [ttl]

Arguments

ArgumentTypeRequiredDescription
<namespace>stringYes-
<key>stringYes-
<value>stringYes-
<ttl>stringNo-

Examples

Store user data:

bash
bunx @agentuity/cli kv set production user:123 '{"name":"Alice","email":"alice@example.com"}'

Store session with 1h TTL:

bash
bunx @agentuity/cli kv set cache session:abc "session-data-here" --ttl 3600

Cache homepage for 10m:

bash
bunx @agentuity/cli kv set staging cache:homepage "<!DOCTYPE html>..." --ttl 600

Output

Returns JSON object:

json
{
  "success": "boolean",
  "namespace": "string",
  "key": "string",
  "contentType": "string",
  "durationMs": "number",
  "ttl": "number"
}
FieldTypeDescription
successbooleanWhether the operation succeeded
namespacestringNamespace name
keystringKey name
contentTypestringContent type (application/json or text/plain)
durationMsnumberOperation duration in milliseconds
ttlnumberTTL in seconds if set