documentdb-agent-kit

[!IMPORTANT]
Public Preview. This project is currently in Public Preview. APIs,
configuration, on-disk layout, skill contents, and installer behavior may
change in breaking ways before General Availability. There is no SLA.
Provided "as-is"; see the Azure Preview Supplemental Terms.
Not recommended for production workloads.
A bundle of agent skills + an MCP server for Azure DocumentDB (MongoDB-compatible) — the fully managed Azure service built on the open-source DocumentDB project (Postgres-backed, 99.03% MongoDB-compatible).
Skills follow the Agent Skills format and the kit ships with plugin manifests for Claude Code, Cursor, Codex, Gemini CLI, and GitHub Copilot.
👉 Capabilities and skill catalog: docs/SKILLS.md
Diagnostic Toolbox — Quickstart
Beyond the text skills, the kit ships deterministic diagnostic scripts and a
knowledge-base router that inspect a local DocumentDB container and return
evidence-based answers (reading both the MongoDB API and the PostgreSQL engine
underneath). They need only docker, bash, and python3 — no MCP server, no
cloud, no API keys. Full guide: docs/DIAGNOSTICS.md.
The tools (scripts/)
All are read-only (they never modify data) and cross-layer (MongoDB API +
PostgreSQL engine). Each takes --db <name>; add --json for a compact
machine-readable result (what the router consumes).
| Diagnostic | Answers | --json |
|---|
document-bloat-advisor | Which collections have large text TOASTed and detoasted on every scan; which field to split out. | ✅ |
toast-split-advisor | Which large fields can move to a side collection and the projected hot-document size. | ✅ |
index-redundancy-finder | Redundant (prefix/duplicate/reverse) or unused indexes safe to drop. | ✅ |
db-config-advisor | Working set vs cache, TOAST share, cache-hit ratios — evidence-based config review. | ✅ |
perf-advisor | Overall health: collection-scan audit, query timing, PG I/O / locks / config. | ✅ |
data-integrity-check | Orphaned foreign-key references and mixed-type fields (hard structural integrity). | ✅ |
Common flags: --container NAME, --password PASS, --port, --pg-port; env
vars DB_USER / DB_PASSWORD / PORT / PG_PORT are also honored. No password
is baked in — set DB_PASSWORD (or pass --password).
Quickstart
# 0. start a local DocumentDB container (choose any password; the scripts read it)
docker run --pull always -dt --name documentdb-local -p 10260:10260 \
-e USERNAME=docdbadmin -e PASSWORD=Test1234 \
ghcr.io/documentdb/documentdb/documentdb-local:latest
export DB_PASSWORD=Test1234 # the scripts require this (or --password)
# 1. seed demo data
bash scenarios/ecommerce/seed.sh # -> "ecommerce"
bash scenarios/contoso/seed.sh # -> "contoso" (TOAST demo)
# 2. diagnose (read-only; add --json for machine output)
bash scripts/document-bloat-advisor.sh --db contoso
bash scripts/index-redundancy-finder.sh --db ecommerce
# 3. or ask in natural language — the router picks the tool (no LLM, no container)
bash knowledge-base/kb-route.sh --db contoso "why are my aggregations slow even though I have indexes"
The diagnostics also have host-portable Python and PowerShell entry points.
They require Python 3.10+ and Docker Desktop, but do not require Bash or WSL:
python scripts\document-bloat-advisor.py --db contoso
.\scripts\index-redundancy-finder.ps1 --db ecommerce --json
The Python launcher executes the same read-only diagnostic logic inside the
Linux DocumentDB container, so Linux, macOS, and Windows share one behavior
contract.
Demo datasets are seeders under scenarios/ (they plant the
problems the tools find). The kit is guarded by two test loops — deterministic
script tests in testing/ and cross-model skill evals in
evals/, plus an MSBench benchmark in
benchmarks/ — all described in
docs/TESTING.md.
Benchmark platform support: Run the SDK benchmark natively on an ARM64
or AMD64 host. Running its AMD64 images on an ARM64 host via emulation is
not supported; use an AMD64 runner to validate the published x86-64
MSBench images. See the ARM64 test report.