Add bizeros-knowledge agent skill (Hermes / OpenClaw / Claude Code compatible)#9
Merged
Merged
Conversation
…mpatible)
Packages the brain integration as an agentskills.io-format skill that
Hermes Agent and OpenClaw load natively from .agents/skills/ (or
~/.hermes/skills/) and that Claude Code understands as a skill folder.
Also publishable to ClawHub with the metadata block already in place.
The user-facing experience is now two steps:
1. docker run the bizeros-knowledge image with a /brain volume
2. drop this skill into the agent's skills directory
Contents:
- SKILL.md
Frontmatter: name, description, tags, ClawHub metadata declaring
BRAIN_DIR as the primary env var. Body follows the agentskills.io
section structure: When to Use, Quick Reference, Procedure (capture,
update, recall, restructure), Pitfalls (write_note replaces;
preserve user words; one-topic-one-note; etc.), Verification.
- tools/definitions.json
JSON Schema definitions for the four tools (list_notes, search_notes,
read_note, write_note) in OpenAI/Anthropic-compatible function-calling
shape. Portable to any harness.
- tools/brain_tools.py
Reference Python implementation. Reads BRAIN_DIR env var (default
/srv/bizeros/brain). Path-traversal blocked, atomic writes, returns
consistent {ok, ...} dicts. Exposes a TOOLS dict and a call(name,
args) dispatcher for harnesses that want a single entry point.
- tools/.gitignore
__pycache__ + .pyc
Smoke-tested end-to-end: write daily + two pages with [[wiki links]],
list, search, read existing, read missing, traversal attempts blocked,
dispatcher resolves and rejects unknown tools.
The skill talks to the filesystem directly rather than going through
the file-api's HTTP endpoints. Lower latency, no auth needed, simpler
to set up when the agent runs on the same VM as the brain folder
(which is the deployment shape we've committed to).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Packages the agent integration as a portable skill so the user-facing setup becomes the two steps you outlined:
The skill follows the agentskills.io open standard, which means the same skill works natively in Hermes Agent, OpenClaw, and Claude Code — no per-framework forking. The frontmatter also includes ClawHub publishing metadata, so we can
clawhub skill publishlater and let any ClawHub-connected agent install it by name.Deliverable
SKILL.mdFrontmatter:
name: bizeros-knowledgedescription— when an agent should use this skilltags— knowledge-management, notes, markdown, bizerosmetadata.openclaw— declaresBRAIN_DIRas the primary env var so ClawHub's security analysis sees what the skill actually touchesBody sections (the agentskills.io standard structure):
daily/YYYY-MM-DD.md,pages/<Topic>.md), wiki-link ruleswrite_notereplaces (always read first), preserve user wording, one topic per note, basename wiki links,YYYY-MM-DDdate formatStays under 5 KB so harnesses with a token budget on skill prompts can load it without truncation.
tools/definitions.jsonFour tools as JSON Schema, OpenAI/Anthropic-compatible function-calling shape:
list_notes().mdpathsearch_notes(query, limit?)read_note(path)not_foundon misswrite_note(path, content)tools/brain_tools.pyReference implementation (~150 lines, stdlib only). Reads
BRAIN_DIRenv var, defaults to/srv/bizeros/brain. Properties:Path.resolve()+relative_to()check; null bytes rejectedtmp + replace, so a half-finished write never appears{ok: True, ...}or{ok: False, error: "..."}; never raises through to the modelTOOLSdict andcall(name, args)for harnesses that want a single entry pointArchitectural choice: filesystem, not HTTP
The skill talks to the filesystem directly rather than calling the file-api over HTTP. Three reasons that match the deployment shape:
read_text/write_text.BRAIN_API_URL, no token, no retries.If a future agent runs off the VM, it can use the file-api's HTTP endpoints — same contract, same paths, same conventions. But that's a different deployment shape and not the one we've committed to.
Smoke test (passed locally)
Installation (after this merges)
For each VM that runs Hermes or OpenClaw:
Once published to ClawHub, this collapses to:
Test plan
~/.hermes/skills/on a Hermes VM, give Hermes a capture task, verify the resulting.mdfile appears in/srv/bizeros/brain/and shows up in the notes-app UI within ~1s../../etc/passwd) — verify the tool returns the error rather than executingclawhub skill publish .agents/skills/bizeros-knowledgefrom a maintainer machineOut of scope
delete_noteandmove_notetools — left out by design; agents shouldn't delete or rename without an explicit human-confirmed reason. If you want them later, easy add.brain_toolsfor agents that run off the VM — easy follow-on if needed.Generated by Claude Code