{"_id":"@abagraph/saba","name":"@abagraph/saba","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@abagraph/saba","version":"0.1.0","description":"CLI to control the Saba OpenClaw agent — terminal, dashboard tunnel, chat, and abagraph memory.","bin":{"saba":"bin/saba"},"os":["darwin","linux"],"engines":{"node":">=18"},"keywords":["openclaw","abagraph","saba","agent","cli","iap"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/abagraph/abagraph.git","directory":"agent/openclaw"},"_id":"@abagraph/saba@0.1.0","gitHead":"15a11e2f60512f46fc4ccb3d6c9c7e955db7c930","bugs":{"url":"https://github.com/abagraph/abagraph/issues"},"homepage":"https://github.com/abagraph/abagraph#readme","_nodeVersion":"22.22.3","_npmVersion":"10.9.8","dist":{"integrity":"sha512-fSMZZPj+Za0BUN0yHyKEl34bkOEIGIGdiGrKQL8DALGiTT/ADOV0LhcH+OPSAj9xXSOaKRLtZJs7zuB/lpIbXg==","shasum":"e057318e1f4a5771c3d02137422666e86d5db0c7","tarball":"https://registry.npmjs.org/@abagraph/saba/-/saba-0.1.0.tgz","fileCount":3,"unpackedSize":9968,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCO1ADTQBY7gbyMAtYKOp/bj3MZEmSVyybaYxqAFNM+kAIgc71qAU+uwhxYV2zmdkA+oKWeAmpBY2D1WWylY4ogQB4="}]},"_npmUser":{"name":"ashby1","email":"ash@abagraph.com"},"directories":{},"maintainers":[{"name":"ashby1","email":"ash@abagraph.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/saba_0.1.0_1782931819408_0.7243981055458435"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-01T18:50:19.198Z","0.1.0":"2026-07-01T18:50:19.548Z","modified":"2026-07-01T18:50:19.773Z"},"maintainers":[{"name":"ashby1","email":"ash@abagraph.com"}],"description":"CLI to control the Saba OpenClaw agent — terminal, dashboard tunnel, chat, and abagraph memory.","homepage":"https://github.com/abagraph/abagraph#readme","keywords":["openclaw","abagraph","saba","agent","cli","iap"],"repository":{"type":"git","url":"git+https://github.com/abagraph/abagraph.git","directory":"agent/openclaw"},"bugs":{"url":"https://github.com/abagraph/abagraph/issues"},"license":"MIT","readme":"# abaclaw — abagraph for OpenClaw agents\n\n**abaclaw** is an [OpenClaw](https://github.com/openclaw/openclaw) skill that gives any\nOpenClaw or NemoClaw agent bitemporal long-term memory backed by\n[abagraph](https://github.com/abagraph/abagraph) — the database built for AI agents.\n\nIt also ships **Saba**: an always-on autonomous engineering persona pre-wired to the same memory.\n\n---\n\n## The `saba` CLI (`npm i -g @abagraph/saba`)\n\nControl the Saba OpenClaw instance from any terminal — chat, dashboard, VM shell, memory.\n\n**Prerequisites** (the CLI wraps `gcloud` + IAP; it does not bundle them):\n1. [Google Cloud SDK](https://cloud.google.com/sdk/docs/install) installed.\n2. `gcloud auth login` with access to project `gen-lang-client-0753898819` + IAP access to the VM.\n\n**Install** (pick one):\n```bash\nnpm i -g @abagraph/saba                       # once published to npm\n# or from a tarball:  npm i -g ./abagraph-saba-0.1.0.tgz   (from `npm pack`)\n# or from a repo checkout:  npm i -g ./agent/openclaw\n```\n\n**First run:**\n```bash\nsaba setup     # pulls the tokens from the VM into ~/.saba-token + ~/.saba-gateway-token\nsaba chat      # talk to Saba in a terminal TUI\nsaba dash      # dashboard tunnel → http://localhost:18789  (Chat tab)\nsaba           # full command list\n```\n\nNot on `PATH` after install? Ensure your npm global bin is on `PATH` (`npm bin -g`). macOS/Linux\nonly (bash script); on Windows use WSL.\n\n---\n\n## What abagraph gives your agent\n\n- **Bitemporal facts** — every assertion carries `(valid_from, valid_until, recorded_at)`. You\n  can ask \"what did the agent believe on Tuesday?\" and get a provenance-exact answer.\n- **kNN recall** — semantic search over remembered facts when you don't know the exact subject.\n- **Pattern recall** — exact subject/predicate/object filter for structured lookup.\n- **Graph walk** — traverse edges between entities (BFS, directed, filtered by edge type).\n- **Auto-supersede** — asserting a contradicting fact atomically closes the old one. No manual\n  delete; the history is preserved for audit.\n- **Tenant isolation** — Saba's bearer token is scoped to the `saba` tenant server-side.\n  No other tenant's facts are visible.\n\n---\n\n## Install on an OpenClaw VM\n\n### Prerequisites\n\n- OpenClaw CLI installed and authenticated.\n- A running abagraph server reachable from the VM (self-hosted or abagraph.com).\n- A `saba`-scoped bearer token from the abagraph admin\n  (`ABAGRAPH_TOKENS=\"<secret>:saba\"` on the server).\n\n### One-command install\n\n```bash\nbash agent/openclaw/install.sh\n```\n\nThe script:\n1. Copies the `abaclaw` skill into `~/.openclaw/workspace/skills/abaclaw/`.\n2. Writes the Saba persona files (`IDENTITY.md`, `SOUL.md`, `AGENTS.md`) into\n   `~/.openclaw/workspace/`.\n3. Runs the guard test (skipped gracefully if `ABAGRAPH_URL`/`ABAGRAPH_TOKEN` are not set).\n4. Prints the remaining manual steps — they need your credentials and cannot be automated.\n\n### Remaining manual steps (after install.sh)\n\n```bash\n# 1. Register your token as a SecretRef (never lands in openclaw.json)\nopenclaw secret set ABAGRAPH_TOKEN\n\n# 2. Register the MCP server\nopenclaw mcp add abaclaw \\\n  --url https://<your-abagraph-host>/mcp \\\n  --transport streamable-http \\\n  --header 'Authorization: Bearer ${ABAGRAPH_TOKEN}'\n\n# 3. Probe — expect 7 tools\nopenclaw mcp probe abaclaw\n```\n\n---\n\n## Files in this kit\n\n| Path | What |\n|------|------|\n| `install.sh` | Idempotent onboarding script (skill + persona + guard test) |\n| `skills/abaclaw/SKILL.md` | The AgentSkill definition (frontmatter + full contract) |\n| `skills/abaclaw/scripts/abagraph-bridge.mjs` | stdio↔HTTP MCP proxy (fallback for non-streamable-http runtimes) |\n| `skills/abaclaw/scripts/guard-test.mjs` | Node guard test: tools/list → 7 tools, auth-deny, remember→recall |\n| `workspace/IDENTITY.md` | Agent name + vibe (<512 B) |\n| `workspace/SOUL.md` | Persona + hard constraints (<1 KB) |\n| `workspace/AGENTS.md` | Operating rules: memory loop, 3-layer model, dev done-bar, GitHub rules |\n\n---\n\n## Verify the memory link\n\n```bash\nexport ABAGRAPH_URL=https://<your-host>/mcp\nexport ABAGRAPH_TOKEN=<your-saba-scoped-token>\nnode agent/openclaw/skills/abaclaw/scripts/guard-test.mjs\n```\n\nExpected output:\n```\n  ok   tools/list → 7 tools\n  ok   bad token → 404 auth-deny\n  ok   remember → recall round-trip\n\n3 passed, 0 failed\n```\n\n---\n\n## ClawHub availability\n\nabaclaw is a candidate for publication on **ClawHub** (the OpenClaw community skill registry).\nThe handler source is fully readable in this directory — no obfuscation, no build step.\n\nSupply-chain note: publishing to ClawHub means any OpenClaw user could install `abaclaw` and\npoint it at their own abagraph server. Review the ClawHub listing process and their signing\nrequirements before publishing. Until then, install directly from this repo.\n\n---\n\n## Architecture note\n\n```\nOpenClaw runtime\n└─ abaclaw MCP skill (streamable-http, primary)\n     └─ POST /mcp  →  abagraph-server  →  facts tenant:saba\n          ↑\n     stdio bridge (fallback, abagraph-bridge.mjs, Node 20+)\n```\n\nThe token's tenant suffix (`:saba`) is validated server-side on every request. The client\nnever needs to inject `namespace:\"saba\"` — but the AGENTS.md instructs Saba to pass it\nexplicitly for consistency and auditability.\n","readmeFilename":"README.md","_rev":"1-49c4cd0d8e66ba95967fb95c76343a5c"}