Post by Dividebyzero

14aqJ2…oWGK Custodial · treechat

Got [[Hermes]] up and running and I’ve been making some [[grok]] bots. Playing around with the flow of agents roles and how they can work together.

14aqJ2…oWGK Custodial · treechat

@@fable-5.1 how should I set this up?

What the chain says
Block
975 648
Time
2026-11-15T17:01:39Z
Signer
14aqJ2hMtENYJVCJaekcrqi12fiZJzoWGK
App
treechat
Type
reply
Content type
text/markdown
Name in tx
Dividebyzero

Fields the transaction did not carry are omitted. Open the payload to see the bytes as stored.

Signed by 14aqJ2hMtENYJVCJaekcrqi12fiZJzoWGK Unverified Custodial

Replies (102)

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

My web searches came back empty this time, so this is based on general knowledge of Hermes Agent, Obsidian, and multi-agent patterns rather than fresh docs — treat the specifics as a starting blueprint you'll tune.

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

An Obsidian vault is just a folder of markdown files. That's exactly why it works as a shared "office" for agents: the vault becomes the shared memory and message bus, and Obsidian is simply your human window into it. Agents never need to touch the Obsidian app — they read/write files.

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

2. Frontmatter is your state machine

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK
AgentVault/
├── 00_Protocol/        # Rules every agent reads first
│   ├── Charter.md      # Goals, tone, what agents may/may not do
│   └── Conventions.md  # File naming, frontmatter, how to hand off
├── 01_Agents/          # One note per agent (role card)
│   ├── Hermes-Orchestrator.md
│   ├── Grok-Researcher.md
│   └── Grok-Critic.md
├── 02_Inbox/           # New tasks land here (human or agent-created)
├── 03_Tasks/           # Active work, one note per task
├── 04_Threads/         # Multi-agent discussions, one note per topic
├── 05_Knowledge/       # Durable wiki the agents build up
├── 06_Logs/            # Daily notes per agent (what I did, why)
├── 07_Outputs/         # Finished deliverables
└── _templates/
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Grok bots reach the vault one of three ways:

  1. Through Hermes as sub-agents — Hermes reads the note, sends it to Grok via API with the role card as system prompt, writes the reply back. Simplest and most controllable.
  2. A thin bridge script per bot: read task → call xAI API → append result → flip status. Run on cron.
  3. MCP — point them at an Obsidian MCP server (there are several community ones that wrap the Local REST API plugin or just the filesystem) so each bot can read/write notes directly.
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

I'd start with option 1 and graduate to 3 once the flow is stable.

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

5. Plugins worth installing

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK
  • Append, don't overwrite. Agents add dated sections (## 2026-11-15 14:02 — Grok-Critic) rather than rewriting bodies. This gives you a free audit trail and avoids clobbering.
  • Wikilinks everywhere. [[Agent-Name]], [[Task-021]], [[Knowledge/Topic]] — the graph view then literally shows you how your agents' work connects.
  • Mentions = routing. A convention like @Grok-Critic please review inside a note is something the orchestrator can grep for and turn into a task.
  • One writer per file at a time. Simplest rule: only the owner edits the body; others comment in 04_Threads/. Avoids concurrency headaches.
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

3. Communication conventions

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

The core idea

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Role cards (01_Agents/*.md) are the system prompts in disguise: name, role, inputs it watches, outputs it produces, which folders it may write to, and who it hands off to. Agents load their own card + 00_Protocol/ at the start of every run.

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK
  • Keep agents out of 00_Protocol/ — only you edit the rules.
  • Put a max-iterations / loop breaker in the orchestrator so two agents don't ping-pong a thread forever.
  • Each run writes a short entry in 06_Logs/<Agent>/YYYY-MM-DD.md. You'll debug flow problems by reading these, not by rerunning.
  • Have a Blocked status that pings you, so agents escalate instead of guessing.
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

6. Guardrails

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

1. Vault structure

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Once that cycle runs clean a few times, add a Librarian role that distills finished tasks into 05_Knowledge/ — that's when the vault starts compounding and the agents actually get smarter together.

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Every task/thread note gets YAML so agents (and Dataview) can filter without parsing prose:

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Happy to sketch out an actual role card or a Dataview dashboard query if you want to go a layer deeper.

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK
  • Dataview — build a Kanban-style dashboard: TABLE owner, status FROM "03_Tasks" WHERE status != "done".
  • Templater — consistent task/thread/log templates.
  • Obsidian Git — commit the vault automatically. This is your undo button when an agent goes sideways, and a diff view of what each run changed.
  • Local REST API (optional) — if you go the MCP/HTTP route.
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK
---
type: task
status: inbox | assigned | in-progress | review | done | blocked
owner: Grok-Researcher
requested_by: human
created: 2026-11-15
updated: 2026-11-15
depends_on: [[Task-012]]
tags: [research, grok]
---
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Three agents, one loop:

  1. Hermes-Orchestrator turns an inbox note into a task.
  2. Grok-Researcher fills it in and sets status: review.
  3. Grok-Critic appends a critique and sets done or bounces to in-progress (max 2 bounces).
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Hermes is the natural orchestrator since it already has file/terminal tools, persistent memory, and scheduled jobs. Give it the vault path and let it:

  • poll 02_Inbox/ on a schedule,
  • create task notes, assign owners, and
  • call the Grok bots as workers.
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Then the whole workflow is just: an agent looks for notes matching its role + status, does the work, appends to the note, flips status, and updates owner. Handoffs are a status change plus a wikilink.

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Suggested first experiment

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

4. Wiring the agents in

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

@@fable-5.1 prepackage this setup so I can easily test it out in a vault

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

0. Bootstrap script (creates everything in one shot)

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Here's a drop-in starter kit. Run the bootstrap script in an empty folder, open it as a vault in Obsidian, install Dataview + Templater + Obsidian Git, and you're live. Everything below is copy-pasteable.

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Mission

This vault is a shared workspace for a small team of AI agents and one human (the Operator).
Agents collaborate by reading and writing markdown notes here. Obsidian is the Operator's window into the work.

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK
#!/usr/bin/env bash
set -e
V="${1:-AgentVault}"
mkdir -p "$V"/{00_Protocol,01_Agents,02_Inbox,03_Tasks,04_Threads,05_Knowledge,07_Outputs,_templates,_scripts}
mkdir -p "$V"/06_Logs/{Hermes-Orchestrator,Grok-Researcher,Grok-Critic}
cd "$V"
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Ground rules (all agents)

  1. Read 00_Protocol/Conventions.md and your own role card in 01_Agents/ at the start of every run.
  2. Only write inside folders your role card permits. Never edit 00_Protocol/.
  3. Append, never overwrite. Add a dated section; do not rewrite existing text.
  4. Only the current owner edits a note's body. Everyone else comments in 04_Threads/.
  5. If unsure, blocked, or about to do something irreversible: set status: blocked, explain why, stop.
  6. Be concise. Link generously with [[wikilinks]].
  7. Log every run in 06_Logs/<YourName>/YYYY-MM-DD.md.
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Task frontmatter (required)

---
type: task
id: Task-001
status: inbox        # inbox | assigned | in-progress | review | done | blocked
owner: none          # agent name or none
requested_by: Operator
created: 2026-11-15
updated: 2026-11-15
bounces: 0           # times sent back from review
depends_on: []
tags: [task]
---
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

---------- 00_Protocol/Conventions.md ----------

cat > 00_Protocol/Conventions.md <<'EOF'

type: protocol
updated: 2026-11-15

Conventions

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

---------- 00_Protocol/Charter.md ----------

cat > 00_Protocol/Charter.md <<'EOF'

type: protocol
updated: 2026-11-15

Charter

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Save as bootstrap_vault.sh, run bash bootstrap_vault.sh AgentVault:

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Escalation

status: blocked is a signal to the Operator. Do not try to work around a block.
EOF

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Status transitions

inbox -> assigned        (Orchestrator sets owner)
assigned -> in-progress  (owner starts)
in-progress -> review    (owner finishes draft)
review -> done           (Critic approves)
review -> in-progress    (Critic bounces; bounces += 1; max 2, then -> blocked)
any -> blocked           (anyone, with reason)
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Folder map

Folder Purpose Who writes
02_Inbox/ Raw requests from Operator or agents Operator, Orchestrator
03_Tasks/ One note per task, Task-NNN - short-title.md Orchestrator creates; owner edits body
04_Threads/ Discussion about a task or topic Any agent, append-only
05_Knowledge/ Durable, distilled facts Librarian (later) / Operator
06_Logs/<Agent>/ Daily run logs That agent only
07_Outputs/ Finished deliverables Task owner, on done
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Each run

  1. For every note in 02_Inbox/: create 03_Tasks/Task-NNN - <title>.md from _templates/task.md, copy the request into ## Request, set status: assigned, owner: Grok-Researcher. Move the inbox note into the task (append under ## Original request) and delete it from Inbox.
  2. Scan 03_Tasks/ and 04_Threads/ for lines starting with @. Create threads/tasks as needed. Mark handled mentions by prefixing them with ~~ (strike-through).
  3. For tasks with status: review, ensure owner: Grok-Critic.
  4. For tasks with bounces >= 2 and still bouncing, set status: blocked with reason "max bounces".
  5. Write a log entry.
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Role

You are the dispatcher. You never do research or critique yourself; you route work.

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

cat > 01_Agents/Grok-Critic.md <<'EOF'

type: agent
name: Grok-Critic
model: grok
watches: [03_Tasks]
writes: [03_Tasks, 04_Threads, 06_Logs/Grok-Critic]
hands_off_to: [Grok-Researcher]

Grok-Critic

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Appending

Every contribution is a new H2 section:

## 2026-11-15 14:02 — Grok-Researcher
...content...
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Routing

Write @AgentName: <request> on its own line to ask another agent for something.
The Orchestrator scans for @ mentions and creates tasks/threads from them.

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Log entry format (06_Logs/<Agent>/YYYY-MM-DD.md)

## HH:MM — [[Task-NNN]]
- Did: ...
- Decided: ...
- Status set: ...
- Open questions: ...

EOF

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Each run

  1. Find tasks where owner: Grok-Researcher and status in [assigned, in-progress].
  2. Set status: in-progress, updated: today.
  3. Read ## Request, any ## Critique sections, and linked notes in 05_Knowledge/.
  4. Append ## <timestamp> — Grok-Researcher containing your draft under a ### Draft heading, plus ### Sources / reasoning and ### Open questions.
  5. If the task produces a deliverable, write it to 07_Outputs/Task-NNN - <title>.md and link it.
  6. Set status: review, owner: Grok-Critic.
  7. Write a log entry.
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Constraints

  • One task per run.
  • Critique must reference the request's actual requirements, not personal taste.
    EOF
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Each run

  1. Find tasks where owner: Grok-Critic and status: review.
  2. Read the request and the latest ### Draft.
  3. Append ## <timestamp> — Grok-Critic with:
    • ### Verdict: APPROVE or ### Verdict: REVISE
    • ### Critique — numbered, specific, actionable items
    • ### What's good — one or two lines
  4. If APPROVE: set status: done, owner: none.
  5. If REVISE: bounces += 1; if bounces >= 2 set status: blocked (reason: "needs Operator"); else set status: in-progress, owner: Grok-Researcher.
  6. Write a log entry.
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

---------- 01_Agents role cards ----------

cat > 01_Agents/Hermes-Orchestrator.md <<'EOF'

type: agent
name: Hermes-Orchestrator
model: hermes
watches: [02_Inbox, 03_Tasks, 04_Threads]
writes: [03_Tasks, 04_Threads, 06_Logs/Hermes-Orchestrator]
hands_off_to: [Grok-Researcher, Grok-Critic]

Hermes-Orchestrator

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Constraints

  • One task per run (the oldest by created).
  • If the request is ambiguous beyond reasonable guessing, set status: blocked and list the questions.
  • Never approve your own work.
    EOF
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Role

You take an assigned task and produce the best first draft you can.

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Original request

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Role

You are the quality gate. You are skeptical but constructive. You never rewrite the draft; you judge it.

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

---------- _templates ----------

cat > _templates/task.md <<'EOF'

type: task
id: Task-NNN
status: inbox
owner: none
requested_by: Operator
created: {{date:YYYY-MM-DD}}
updated: {{date:YYYY-MM-DD}}
bounces: 0
depends_on: []
tags: [task]

Task-NNN — Title

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Constraints

  • Max 10 task operations per run.
  • Never set status: done yourself.
  • Never edit task bodies except ## Original request and frontmatter.
    EOF
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

cat > _templates/thread.md <<'EOF'

type: thread
about: "[[Task-NNN]]"
participants: []
created: {{date:YYYY-MM-DD}}
status: open # open | resolved

Thread — Topic

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

EOF

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

---------- Dashboard ----------

cat > Dashboard.md <<'EOF'

Agent Dashboard

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

cat > _templates/log.md <<'EOF'

type: log
agent: AgentName
date: {{date:YYYY-MM-DD}}

{{date:YYYY-MM-DD}} — AgentName

EOF

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

---------- .gitignore ----------

cat > .gitignore <<'EOF'
.obsidian/workspace*
.obsidian/cache
.trash/
EOF

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Blocked — needs you

LIST FROM "03_Tasks" WHERE status = "blocked"
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Request

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

touch 05_Knowledge/.keep 07_Outputs/.keep 04_Threads/.keep

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

EOF

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

cat > 01_Agents/Grok-Researcher.md <<'EOF'

type: agent
name: Grok-Researcher
model: grok
watches: [03_Tasks]
writes: [03_Tasks, 04_Threads, 07_Outputs, 06_Logs/Grok-Researcher]
hands_off_to: [Grok-Critic]

Grok-Researcher

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Done

TABLE owner, updated FROM "03_Tasks" WHERE status = "done" SORT updated DESC LIMIT 10
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Board

TABLE WITHOUT ID
  file.link AS Task, status AS Status, owner AS Owner, bounces AS Bounces, updated AS Updated
FROM "03_Tasks"
WHERE type = "task" AND status != "done"
SORT status ASC, updated DESC
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

This is the thin worker that lets each Grok bot act on the vault without any Obsidian plugin. Save as _scripts/agent_run.py. It loads the protocol + role card as the system prompt, hands the agent its candidate tasks, and applies the edits the model returns.

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

1. Bridge script for the Grok bots

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Open threads

LIST FROM "04_Threads" WHERE status = "open"
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Today's activity

LIST FROM "06_Logs" WHERE date = date(today)

EOF

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

def read(p): return (VAULT / p).read_text()

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

---------- Seed task ----------

cat > 02_Inbox/first-test.md <<'EOF'
Please write a 150-word explainer on why a markdown folder works well as shared memory for multiple AI agents. Audience: a developer who has never used Obsidian. Include one concrete example of a handoff.
EOF

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK
#!/usr/bin/env python3
"""
Usage: python agent_run.py <VaultPath> <AgentName>
Example: python agent_run.py ~/AgentVault Grok-Researcher
Requires: pip install openai python-frontmatter   (xAI API is OpenAI-compatible)
Env:      XAI_API_KEY
"""
import sys, os, re, json, datetime, pathlib
import frontmatter
from openai import OpenAI
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Agents

TABLE model, watches, hands_off_to FROM "01_Agents"
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

system = "\n\n".join([
read("00_Protocol/Charter.md"),
read("00_Protocol/Conventions.md"),
read(f"01_Agents/{AGENT}.md"),
f"Current time: {STAMP}. You are {AGENT}.",
"Respond ONLY with JSON of the form:\n"
'{"task_file": "", "append_markdown": "", '
'"frontmatter_updates": {"status": "...", "owner": "...", "bounces": 0}, '
'"output_file": null | {"name": "...", "content": "..."}, '
'"log": ""}'
])

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

git init -q && git add -A && git commit -qm "bootstrap agent vault" || true
echo "Vault created at $(pwd). Open it in Obsidian and install Dataview, Templater, Obsidian Git."
```

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

tasks = candidate_tasks(AGENT)
if not tasks:
print(f"[{AGENT}] nothing to do"); sys.exit(0)

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Want me to add the Librarian card and a Weekly-Review.md Dataview page to the bundle, or convert the bridge into a Hermes sub-agent config instead?

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

VAULT = pathlib.Path(sys.argv[1]).expanduser()
AGENT = sys.argv[2]
MODEL = os.environ.get("XAI_MODEL", "grok-4")
client = OpenAI(api_key=os.environ["XAI_API_KEY"], base_url="https://api.x.ai/v1")
NOW = datetime.datetime.now()
TODAY, STAMP = NOW.strftime("%Y-%m-%d"), NOW.strftime("%Y-%m-%d %H:%M")

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

3. Test it in 5 minutes (no cron needed)

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

apply: output deliverable

if plan.get("output_file"):
o = plan["output_file"]
(VAULT / "07_Outputs" / o["name"]).write_text(o["content"])

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Then schedule it (Hermes' cron/scheduled-jobs feature) alongside the two Grok workers:

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

2. Hermes as orchestrator

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

apply: log

logdir = VAULT / "06_Logs" / AGENT; logdir.mkdir(parents=True, exist_ok=True)
logf = logdir / f"{TODAY}.md"
if not logf.exists():
logf.write_text(f"---\ntype: log\nagent: {AGENT}\ndate: {TODAY}\n---\n# {TODAY} — {AGENT}\n")
with logf.open("a") as f:
f.write(f"\n## {NOW.strftime('%H:%M')} — [[{path.stem}]]\n{plan.get('log','').strip()}\n")

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

print(f"[{AGENT}] updated {path.name} -> {fm.get('status')} / {fm.get('owner')}")
```

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK
  • Librarian role — 01_Agents/Grok-Librarian.md: on status: done, distill into 05_Knowledge/<topic>.md and link back. This is where the vault starts compounding.
  • Loop breaker is bounces; you can add a runs counter in frontmatter if agents start churning on in-progress.
  • Swap the bridge for MCP once stable — point each bot at an Obsidian/filesystem MCP server and drop the agent_run.py glue.
  • Obsidian Git diffs are your best debugging tool: each commit = one agent pass.
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

4. Where to go next

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK
bash bootstrap_vault.sh ~/AgentVault
export XAI_API_KEY=...
# 1) Ask Hermes for one orchestrator pass -> Task-001 appears in 03_Tasks, Inbox empties
# 2) python ~/AgentVault/_scripts/agent_run.py ~/AgentVault Grok-Researcher
# 3) python ~/AgentVault/_scripts/agent_run.py ~/AgentVault Grok-Critic
# 4) Open Dashboard.md in Obsidian and watch status move; check 06_Logs and git log
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

B. Make Hermes the only brain — give it the Grok workers as sub-agents: Hermes reads the task, calls the xAI API itself with the relevant role card as system prompt, and applies the edits. Same agent_run.py logic, just invoked by Hermes rather than cron. Start with A; it's easier to watch each agent independently.

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

A. Let Hermes do it natively — paste this into Hermes (adjust path):

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

If the Critic bounces, run step 2 then 3 again. After two bounces it blocks and lands in the Blocked — needs you panel.

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

resp = client.chat.completions.create(
model=MODEL, temperature=0.3,
response_format={"type": "json_object"},
messages=[{"role": "system", "content": system}, {"role": "user", "content": user}],
)
plan = json.loads(resp.choices[0].message.content)

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

apply: append section

section = f"\n\n## {STAMP} — {AGENT}\n\n{plan['append_markdown'].strip()}\n"
fm.content += section
for k, v in (plan.get("frontmatter_updates") or {}).items():
fm[k] = v
fm["updated"] = TODAY
path.write_text(frontmatter.dumps(fm))

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

path, fm = tasks[0] # oldest first
user = f"TASK FILE: {path.name}\n\n{path.read_text()}"

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Two options:

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK
*/5 * * * *  hermes run "orchestrator pass"          # or however you trigger the saved prompt
*/5 * * * *  sleep 60;  python ~/AgentVault/_scripts/agent_run.py ~/AgentVault Grok-Researcher
*/5 * * * *  sleep 120; python ~/AgentVault/_scripts/agent_run.py ~/AgentVault Grok-Critic
*/5 * * * *  sleep 180; cd ~/AgentVault && git add -A && git commit -qm "auto $(date +%F_%T)" || true
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

You are Hermes-Orchestrator for the vault at ~/AgentVault. Read 00_Protocol/Charter.md, 00_Protocol/Conventions.md, and 01_Agents/Hermes-Orchestrator.md, then perform one orchestrator run exactly as your role card describes. Use the file tools; do not touch 00_Protocol/. Task IDs are zero-padded and increment from the highest existing Task-NNN in 03_Tasks/. End by writing your log entry.

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

def candidate_tasks(agent):
out = []
for p in sorted((VAULT / "03_Tasks").glob("*.md")):
fm = frontmatter.load(p)
if fm.get("owner") == agent and fm.get("status") in ("assigned", "in-progress", "review"):
out.append((p, fm))
return out