braindb-agent

braindb-agent is a skill for Claude Code from dimknaf/braindb. It costs 40 tokens per session (3,085 once invoked), scanned A, original, Apache-2.0.

A persistent memory service that lets an agent recall information across conversations and save new information for later. It runs as a local BrainDB API service.

In plain words
What is it for?
Use it to retrieve relevant stored facts at the start of work and record new facts in long-term memory.
Why use it?
It prevents useful context about the user or project from being lost when a session ends.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions subagents.

Good fit Use it to retrieve relevant stored facts at the start of work and record new facts in long-term memory.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dimknaf/braindb/braindb-agent
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add dimknaf/braindb --skill braindb-agent
Clone the repo
git clone --depth 1 https://github.com/dimknaf/braindb

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for braindb-agent

README.md
[![agentmods](https://agentmods.dev/badge/skills/dimknaf/braindb/braindb-agent/github.svg)](https://agentmods.dev/skills/dimknaf/braindb/braindb-agent)
Your own site
<a href="https://agentmods.dev/skills/dimknaf/braindb/braindb-agent"><img src="https://agentmods.dev/badge/skills/dimknaf/braindb/braindb-agent/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for braindb-agent

Your own site · 80×15
<a href="https://agentmods.dev/skills/dimknaf/braindb/braindb-agent"><img src="https://agentmods.dev/badge/skills/dimknaf/braindb/braindb-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,085 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 7 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 24
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Excessive Agency · line 115
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Memory Poisoning · line 119
    Skill injects content designed to persist in agent memory or context across interactions. Persistent injection can alter agent behavior long after the initial interaction.
    Fix: Do not allow untrusted input to persist in agent memory or context. Validate all content before storing and implement memory isolation between sessions.
  • medium Excessive Agency · line 143
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 159
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Prompt Injection · line 159
    Subtle instructions detected that may alter agent decision-making or introduce hidden biases.
    Fix: Review content for implicit steering or bias. Ensure instructions are explicit and align with the skill's stated purpose.
  • medium Data Exfiltration · line 178
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00040 $0.03085
Opus 5.5 $0.00016 $0.01234
Sonnet 5.5 $0.00008 $0.00617
Haiku 4.5 $0.00004 $0.00309

Measured 5d ago against content hash cd3af9c147f3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

braindb-agent scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

!`curl -sf http://localhost:8000/health > /dev/null 2>&1 && echo "OK" || echo "BRAINDB_DOWN"`
skills/braindb-agent/SKILL.md · 242 lines

How it starts

The opening of the file, as written. The whole thing — 242 lines — stays where its author put it; the contents beside it link to each section on GitHub.

BrainDB Memory Agent

BrainDB has its own internal agent (OpenAI Agents SDK with pluggable provider via LLM_PROFILE; defaults to DeepInfra's google/gemma-4-31B-it) that handles all memory operations. You don't call individual endpoints — you ask the agent in plain English via one endpoint: POST http://localhost:8000/api/v1/agent/query.

Health check:

!curl -sf http://localhost:8000/health > /dev/null 2>&1 && echo "OK" || echo "BRAINDB_DOWN"

If the output contains BRAINDB_DOWN, the memory database is not running. Do this:

  1. Ask the user: "BrainDB isn't running. Do you want me to start it for you?"
  2. Find the braindb repo — look for a directory that has ALL of these:
    • docker-compose.yml at the root
    • braindb/main.py
    • pyproject.toml with name = "braindb" Search in: current dir, parent dirs (up to 3 levels), common locations like ~/source/repos/**/braindb/.
  3. Start it: cd <braindb-path> && docker compose up -d
  4. Cache the path: echo "<braindb-path>" > ~/.claude/skills/braindb-agent/.repo_path
  5. Wait for it: poll curl -sf http://localhost:8000/health for up to 30 seconds.
  6. If healthy, proceed. If the user declines or start fails, proceed WITHOUT memory.

TOOL PRIORITY (read this first)

The agent has a clear order of tools it should reach for. When you phrase a request, lean into the sophisticated tools — don't ask it to "run SQL" for anything to do with recall or understanding.

  1. Query-driven recall — "what do we know about X?" → the agent calls /memory/context (keyword-mediated fuzzy + embedding + graph + ranking, with diversity quotas). The default for ALL discovery and understanding.
  2. Entity-driven neighbourhood — the agent's view_tree returns a nested JSON tree (root keyed by entity_type, children arrays per node, 1-N hops out, keyword + retired-wiki noise filtered by default, _truncated marker if more remain). Especially useful when an entity ID is already in hand — often sharper than another query about the same entity. On hub entities pass max_depth=3 for narrative chains.
  3. Multi-step investigation — "investigate / disambiguate / resolve X" → the agent delegates to a subagent. Keeps the main context clean.
  4. Direct lookups — view_entity_relations, get_entity, list_entities for narrow questions.
  5. search_sql ⚠ exception only — for explicit aggregates (counts, GROUP BY, activity-log joins). Never for finding / understanding / "what's related to" — those are jobs for the tools above.

Read the full file on GitHub · 242 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago Changed cd3af9c147f3
  2. 1mo ago First seen · 242 lines · 40 tokens per session scan A 92296a586c4a

Subscribe to this mod's changes

braindb-agent is a skill published in the GitHub repository dimknaf/braindb (112 stars, last pushed 5d ago), licensed Apache-2.0. It adds 40 tokens to every session and 3,085 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

graph-workflow

Exact mutation, revision, relationship, and document-tree rules for the Understanding Graph. Use when persisting or changing graph state. This is a write-contract reference, not a required thinking loop.

emergent-wisdom/understanding-graph · 44 tokens

orient

Re-enter relevant graph context when beginning a session, changing projects, or when the user explicitly asks for orientation. Use only when prior graph state could affect the work; it is not a ritual for every conversation.

emergent-wisdom/understanding-graph · 45 tokens

understanding-work

Use an available Understanding Graph or Undergraph MCP as the persistent medium for substantive reading, research, writing, coding, design, diagnosis, decisions, and other knowledge work. Trigger whenever a user asks for meaningful work in a graph-backed project, even if they do not explicitly say “use the graph.” Let…

emergent-wisdom/understanding-graph · 105 tokens

quality-check

Inspect graph structure when the user asks for a check or when a concrete structural problem may be affecting the work. Treat metrics as diagnostics, never as quotas or semantic-quality scores.

emergent-wisdom/understanding-graph · 40 tokens

agent-wiki

Manage a structured knowledge base with immutable raw sources and a mutable wiki layer. Use this skill whenever the user mentions knowledge base, wiki, raw documents, importing documents (Confluence, Jira, URLs, files), searching knowledge, code parsing (COBOL), or asks to add/read/write/search/lint knowledge. Also…

xinhuagu/agent-wiki · 142 tokens

harness-creator

Build, audit, and improve harnesses that make AI coding agents reliable: AGENTS.md/CLAUDE.md instruction files, feature/state tracking, verification gates, scope boundaries, session handoff, memory persistence, context budgets, tool-permission safety, and multi-agent coordination. Use this whenever a coding agent is…

walkinglabs/learn-harness-engineering · 142 tokens