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.

Upstash Redis CLI Setup

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

Install, configure, and verify
# 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 reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

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

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

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

Discovery

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

Discovery commands
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

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

upstash.upstash_get_key

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

Read read
Parameters
key
Generic call
kosmo integrations:call upstash.upstash_get_key '{"key":"example_key"}' --json
Shortcut
kosmo integrations:upstash upstash_get_key '{"key":"example_key"}' --json

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.

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

upstash.upstash_delete_key

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

Write write
Parameters
key
Generic call
kosmo integrations:call upstash.upstash_delete_key '{"key":"example_key"}' --json
Shortcut
kosmo integrations:upstash upstash_delete_key '{"key":"example_key"}' --json

upstash.upstash_list_keys

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

Read read
Parameters
pattern
Generic call
kosmo integrations:call upstash.upstash_list_keys '{"pattern":"example_pattern"}' --json
Shortcut
kosmo integrations:upstash upstash_list_keys '{"pattern":"example_pattern"}' --json

upstash.upstash_list_databases

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

Read read
Parameters
none
Generic call
kosmo integrations:call upstash.upstash_list_databases '{}' --json
Shortcut
kosmo integrations:upstash upstash_list_databases '{}' --json

upstash.upstash_get_database

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

Read read
Parameters
id
Generic call
kosmo integrations:call upstash.upstash_get_database '{"id":"example_id"}' --json
Shortcut
kosmo integrations:upstash upstash_get_database '{"id":"example_id"}' --json

upstash.upstash_get_current_user

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

Read read
Parameters
none
Generic call
kosmo integrations:call upstash.upstash_get_current_user '{}' --json
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 1 parameters
Schema command
kosmo integrations:schema upstash.upstash_get_key --json
ParameterTypeRequiredDescription
key string yes The Redis key to retrieve.
upstash.upstash_set_key 3 parameters
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 1 parameters
Schema command
kosmo integrations:schema upstash.upstash_delete_key --json
ParameterTypeRequiredDescription
key string yes The Redis key to delete.
upstash.upstash_list_keys 1 parameters
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 0 parameters
Schema command
kosmo integrations:schema upstash.upstash_list_databases --json
ParameterTypeRequiredDescription
No parameters.
upstash.upstash_get_database 1 parameters
Schema command
kosmo integrations:schema upstash.upstash_get_database --json
ParameterTypeRequiredDescription
id string yes The Upstash database ID.
upstash.upstash_get_current_user 0 parameters
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.