Sign In

@betterdb/agent

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@betterdb/agent

BetterDB remote monitoring agent for Valkey/Redis

latest
npmnpm
Version
1.6.1
Version published
Weekly downloads
7
-63.16%
Maintainers
1
Weekly downloads
 
Created
Source

@betterdb/agent

npm version total downloads license: MIT types GitHub stars

Lightweight agent that connects your Valkey/Redis instances to BetterDB Cloud for monitoring and observability — without exposing your database to the internet.

The agent runs inside your VPC and initiates all connections outbound via WebSocket (WSS on port 443). No inbound firewall rules required.

See it live in BetterDB Monitor

BetterDB Monitor gives you live dashboards for the AI workloads running on your Valkey:

  • AI Cache & Memory - hit rate, cost saved, evictions, and index size across all your caches and memory stores, with history.
  • AI Traces - OpenTelemetry waterfalls for each request, correlated with live Valkey state to explain every cache hit and miss.

AI Cache & Memory tab in BetterDB Monitor

AI Traces waterfall in BetterDB Monitor

Run it self-hosted (docker run -p 3001:3001 betterdb/monitor), or use BetterDB Cloud - which can also provision a managed, TLS-enabled Valkey instance (Search module included) in one click.

Quick Start

docker run -d --name betterdb-agent \
  --restart=always \
  -e BETTERDB_TOKEN="<your-token>" \
  -e BETTERDB_CLOUD_URL="wss://<your-workspace>.app.betterdb.com/agent/ws" \
  -e VALKEY_HOST="<your-valkey-host>" \
  -e VALKEY_PORT="6379" \
  betterdb/agent

npx

npx @betterdb/agent \
  --token "<your-token>" \
  --cloud-url "wss://<your-workspace>.app.betterdb.com/agent/ws" \
  --valkey-host "<your-valkey-host>" \
  --valkey-port 6379

Configuration

Variable / FlagDefaultDescription
BETTERDB_TOKEN / --token(required)Agent token from BetterDB Cloud
BETTERDB_CLOUD_URL / --cloud-url(required)wss://<workspace>.app.betterdb.com/agent/ws
VALKEY_HOST / --valkey-hostlocalhostValkey/Redis hostname
VALKEY_PORT / --valkey-port6379Valkey/Redis port
VALKEY_PASSWORD / --valkey-passwordAuth password
VALKEY_USERNAME / --valkey-usernamedefaultACL username
VALKEY_TLS / --valkey-tlsfalseEnable TLS (required for ElastiCache Serverless)
VALKEY_DB / --valkey-db0Database number
BETTERDB_UNSAFE_CLI / --unsafe-clifalseAllow all commands (not just the read-only allowlist). Do not enable on publicly accessible instances.

Managed Services

Works with AWS ElastiCache, Google Memorystore, Azure Cache, Aiven, and others. Set VALKEY_TLS=true if the provider requires encryption. The agent must be deployed in the same VPC/network as your database.

Networking & Security

  • All connections are outbound — no inbound ports needed
  • WebSocket uses WSS (TLS) on port 443
  • Auto-reconnects with exponential backoff on disconnect
  • Tokens can be revoked instantly from the BetterDB Cloud UI

Documentation

Full docs: docs.betterdb.com/agent-connection

License

See LICENSE for details.

FAQs

Package last updated on 15 Jul 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts