SecretSkyDB
DiamondClaw · AI agents on SecretSkyDB

An AI agent on data it cannot leak.

DiamondClaw connects an agent — a local open-weights model, or Claude — to SecretSkyDB through typed tools, not raw SQL. Secret columns stay split across the share stores even while the agent filters, sums and searches them, every change is audited before it happens, and the whole stack installs with one command.

Typed toolsdescribe, lookup, aggregate, search, write — never raw SQL
Shares stay splitsums and similarity search run on the share stores
Audited firstan audit record is written before any change is made
1 commandagent + local model + the SecretSkyDB link

1Before you start

  • SecretSkyDB 0.5.0 or later running in your GKE cluster. Not installed yet? The ten-minute quick start takes you from the Marketplace listing to a working database — come back here after its step 3.
  • A machine for the agent: Linux, macOS or Windows WSL2, with curl and Python 3.10+. A laptop is fine.
  • Ubuntu workstation? One script readies it for the cluster steps below — it installs gcloud, the GKE auth plugin and kubectl from Google’s official repository, and removes the Snap gcloud, which cannot authenticate to a GKE cluster (contributed by an early customer; add WITH_DBEAVER=1 for a GUI SQL client too):
    curl -fsSL https://storage.googleapis.com/secretskydb-downloads/diamond/prereqs-ubuntu.sh -o prereqs-ubuntu.sh
    bash prereqs-ubuntu.sh
  • For a local model: about 24 GB of memory for gpt-oss-20b with its 64K context (an NVIDIA GPU makes it fast; CPU works, slower). No suitable machine? Skip the local model and connect Claude Code or Claude Desktop in step 5 instead.

Nothing in the agent's data path leaves the machine except its calls to the SecretSkyDB proxy. The model, the agent runtime and the MCP server all run where you install them.

2Install SecretSkyDB from Google Cloud Marketplace

If it is already running, skip ahead. Otherwise: open the SecretSkyDB listing ↗, click Configure, pick your cluster, namespace secretskydb, leave Create the three share stores inside this cluster checked, and click Deploy. Release 0.5.0 or later ships the agent tools used below.

Expected: the application turns green in 3–5 minutes. The quick start walks through the same form field by field, then splits a first secret column so you can see the mechanism before an agent touches it.

4One command installs the agent stack

The installer sets up Ollama serving the model with the 64K context the agent needs, the Hermes Agent runtime, and the SecretSkyDB MCP server wired to your proxy. Not sure which model fits your hardware and region? The selector turns six choices into the exact command.

curl -fsSLO https://raw.githubusercontent.com/hillelav/secretskydb-k8s-deploy/main/examples/diamondclaw/diamondclaw-install.sh
SSDB_PASSWORD='<password from step 3>' bash diamondclaw-install.sh \
  --agent hermes --model gpt-oss-20b --serving ollama \
  --connect mcp --ssdb 127.0.0.1:55432 --db ssdb --user ssdb --yes

Add --dry-run to see every step without changing anything. The script asks before running third-party installers unless you pass --yes, and stops with a clear message for any combination that is not implemented yet.

Expected: the first run downloads the model (several GB). At the end the installer prints how to start the agent; ask it something like “which tables can you see?” — the answer comes through the describe tool, and every call shows up in the audit log.

5Or connect Claude instead of a local model

The same MCP server (installed to ~/.diamondclaw by step 4, even if you skip the model) serves Claude Code or Claude Desktop over stdio:

Claude Code

claude mcp add secretskydb -e SSDB_ENV_FILE=$HOME/.diamondclaw/ssdb.env -- $HOME/.diamondclaw/venv/bin/python $HOME/.diamondclaw/ssdb_mcp_server.py

Claude Desktop (claude_desktop_config.json)

{"mcpServers": {"secretskydb": {"command": "/Users/me/.diamondclaw/venv/bin/python",
  "args": ["/Users/me/.diamondclaw/ssdb_mcp_server.py"], "env": {"SSDB_ENV_FILE": "/Users/me/.diamondclaw/ssdb.env"}}}}
Production: run the MCP server in the cluster instead

The chart runs the same server as a container of the proxy pod (mcp.enabled=true + a tokens Secret; see INSTALL.md, “MCP server for agents”). Any MCP client then connects to https://<host>:55440/mcp with Authorization: Bearer <token>. Each token names a proxy user, so roles and table grants decide what that agent may see — one token per agent.

6What the agent can and cannot do

The agent never writes SQL. It calls six typed tools, and the proxy's roles, grants and reconstruction policy apply to every call:

ToolWhat it doesThe rule it enforces
describetables, columns, and each column's tieropen / cacheable / secret is visible to the agent
lookuprows by filtersfilters and sort on open columns only; secret values counted against a per-session budget
aggregateSUM, COUNT, AVG, groupedcomputed on the share stores — no single value is ever assembled
searchsimilarity over a secret vector columneach share store scores its own shares
write, unit_of_workinsert / update, transactionalpreview first, then a confirm token; audit record written before the change

Tool results are screened for instruction-like text (prompt-injection), and each token carries limits: calls per minute, and how many rows with reconstructed secrets a session may see.

Try it: ask for the sum of a secret amount column — it answers, computed on the shares. Then ask it to show you the raw share values or to bypass a grant — it refuses, and the refusal is in the audit trail too. A scripted version of exactly this demo ships as demo.py / webdemo.py in the same folder.

7Next

Give each agent its own identity

One proxy user and one token per agent. The audit table agent_audit then tells you which agent did what, before it did it.

Measure a model before trusting it

bench.py runs eleven realistic questions through the tools and reports pass/fail per question — a model swap becomes a number, not an opinion.

Production shares, in or out of Google

The quick start keeps the share stores in one cluster. For production, place them on AlloyDB regions — or any PostgreSQL endpoints, on any cloud — and deploy with the quick-start box unchecked.