KosmoKrator

data

Upstash Redis CLI for AI Agents

Use the Upstash Redis CLI from KosmoKrator to call Upstash Redis tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 5 read 2 write API key auth

Upstash Redis CLI Setup

Upstash Redis can be configured headlessly with `kosmokrator integrations:configure upstash`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure upstash --set api_key="$UPSTASH_API_KEY" --set redis_url="$UPSTASH_REDIS_URL" --enable --read allow --write ask --json
kosmokrator integrations:doctor upstash --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
api_key UPSTASH_API_KEY Secret secret yes API Key
redis_url UPSTASH_REDIS_URL URL url yes Redis REST URL

Call Upstash Redis Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call upstash.upstash_get_key '{
  "key": "example_key"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:upstash upstash_get_key '{
  "key": "example_key"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs upstash --json
kosmo integrations:docs upstash.upstash_get_key --json
kosmo integrations:schema upstash.upstash_get_key --json
kosmo integrations:search "Upstash Redis" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Upstash Redis.

upstash.upstash_get_key

Read read

Retrieve the value stored at a Redis key. Returns null if the key does not exist.

Parameters
key

Generic CLI call

kosmo integrations:call upstash.upstash_get_key '{"key":"example_key"}' --json

Provider shortcut

kosmo integrations:upstash upstash_get_key '{"key":"example_key"}' --json

upstash.upstash_set_key

Write write

Store a key-value pair in Redis. Optionally set a TTL (time-to-live) in seconds so the key expires automatically.

Parameters
key, value, ex

Generic CLI call

kosmo integrations:call upstash.upstash_set_key '{"key":"example_key","value":"example_value","ex":1}' --json

Provider shortcut

kosmo integrations:upstash upstash_set_key '{"key":"example_key","value":"example_value","ex":1}' --json

upstash.upstash_delete_key

Write write

Delete a key from Redis. Returns the number of keys that were removed.

Parameters
key

Generic CLI call

kosmo integrations:call upstash.upstash_delete_key '{"key":"example_key"}' --json

Provider shortcut

kosmo integrations:upstash upstash_delete_key '{"key":"example_key"}' --json

upstash.upstash_list_keys

Read read

List Redis keys matching a glob-style pattern. Defaults to "*" to list all keys.

Parameters
pattern

Generic CLI call

kosmo integrations:call upstash.upstash_list_keys '{"pattern":"example_pattern"}' --json

Provider shortcut

kosmo integrations:upstash upstash_list_keys '{"pattern":"example_pattern"}' --json

upstash.upstash_list_databases

Read read

List all Redis databases in the Upstash account. Returns database IDs, names, regions, and endpoints.

Parameters
none

Generic CLI call

kosmo integrations:call upstash.upstash_list_databases '{}' --json

Provider shortcut

kosmo integrations:upstash upstash_list_databases '{}' --json

upstash.upstash_get_database

Read read

Get details for a specific Upstash Redis database by ID, including endpoint, region, and usage stats.

Parameters
id

Generic CLI call

kosmo integrations:call upstash.upstash_get_database '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:upstash upstash_get_database '{"id":"example_id"}' --json

upstash.upstash_get_current_user

Read read

Get current team information from Upstash, including team name, members, and plan details.

Parameters
none

Generic CLI call

kosmo integrations:call upstash.upstash_get_current_user '{}' --json

Provider shortcut

kosmo integrations:upstash upstash_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

upstash.upstash_get_key

Retrieve the value stored at a Redis key. Returns null if the key does not exist.

Operation
Read read
Schema command
kosmo integrations:schema upstash.upstash_get_key --json
ParameterTypeRequiredDescription
key string yes The Redis key to retrieve.

upstash.upstash_set_key

Store a key-value pair in Redis. Optionally set a TTL (time-to-live) in seconds so the key expires automatically.

Operation
Write write
Schema command
kosmo integrations:schema upstash.upstash_set_key --json
ParameterTypeRequiredDescription
key string yes The Redis key to set.
value string yes The value to store.
ex integer no Time-to-live in seconds (optional).

upstash.upstash_delete_key

Delete a key from Redis. Returns the number of keys that were removed.

Operation
Write write
Schema command
kosmo integrations:schema upstash.upstash_delete_key --json
ParameterTypeRequiredDescription
key string yes The Redis key to delete.

upstash.upstash_list_keys

List Redis keys matching a glob-style pattern. Defaults to "*" to list all keys.

Operation
Read read
Schema command
kosmo integrations:schema upstash.upstash_list_keys --json
ParameterTypeRequiredDescription
pattern string no Glob-style pattern to match keys against (default: "*").

upstash.upstash_list_databases

List all Redis databases in the Upstash account. Returns database IDs, names, regions, and endpoints.

Operation
Read read
Schema command
kosmo integrations:schema upstash.upstash_list_databases --json
ParameterTypeRequiredDescription
No parameters.

upstash.upstash_get_database

Get details for a specific Upstash Redis database by ID, including endpoint, region, and usage stats.

Operation
Read read
Schema command
kosmo integrations:schema upstash.upstash_get_database --json
ParameterTypeRequiredDescription
id string yes The Upstash database ID.

upstash.upstash_get_current_user

Get current team information from Upstash, including team name, members, and plan details.

Operation
Read read
Schema command
kosmo integrations:schema upstash.upstash_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.