Galeed
The cross-project trace/log spine — "heap of witness" (Genesis 31:48).
Galeed is the family's shared logging capability: a structured event stream that separates process telemetry (what the system did, step by step) from the final output (the answer). It is intentionally dependency-free (pure stdlib) so any project can adopt it.
In Genesis 31, Laban and Jacob raise one memorial heap and give it two names — Galeed ("heap of witness", the record itself) and Mizpah ("watchtower", the one who watches over it). The family keeps the pair: Galeed records; Mizpah views.
What it provides
events— a structured event vocabulary (EventType,TraceEvent, stable ids). Self-contained and extensible.recorder—Tracer: created once per request/operation; emits events, persists them, and exposes query helpers.bus— a process-wide in-process pub/sub (TraceBus) for live streaming (e.g. SSE to a process panel or a dev-log window).feedback— lightweight feedback events tied to a trace.cairn—emit_cairn_observation(...), a tiny bridge for events that Huldah can analyse as human-load and agent-effectiveness evidence. The module andcairn_kindkey keep the Cairn name: it is the observation format, not the analyser (which was renamed in the Deborah/Huldah split).llm_calls— the LLM debugging layer: one document per model call with the COMPLETE input (prompt or messages list) and COMPLETE output, a humanstep_name, andparent_call_idchains for recursive flows. Spine events stay lean; the heavy payloads live here. Wrap direct calls withcapture_llm_call(...); Hoglah records every job automatically.
from galeed import Tracer, EventType, get_bus, record_llm_call, capture_llm_call
from galeed import emit_cairn_observation
Viewers
galeed trace(CLI,pip install galeed[cli]) — the clean In→Out call tree for every source: chains nested,--verbosefor the technical layer, filters (--session/--trace/--source/--step/--call/--status/--since),--followlive tail,--jsonexport (works without the extra).galeed sessions/galeed events— spine summaries and raw events.galeed serve(pip install galeed[web], default port 8785) — the HTTP trace API browser viewers read: Tirzah-compatible/api/trace/*shapes,/api/llm-calls, and an SSE tail. Mizpah points here by default.
Connection: --mongo-uri/--mongo-db or GALEED_MONGO_URI / GALEED_MONGO_DB
(default mongodb://localhost:27017 / mnemosyne_dev).
Who emits into it
Any family project — Tirzah, Mahalath, Hoglah, Deborah, Huldah, Milcah — emits its process telemetry through Galeed. Mizpah is the viewer over what Galeed records.
When a product wants Huldah to read an event as human-facing observation evidence, emit it through the Cairn-format bridge:
emit_cairn_observation(
tracer,
kind="agent_output",
message="Generated recommendation without authority citation.",
tags=["missing_evidence"],
human_systems=["trust calibration", "uncertainty management"],
duration_ms=4200,
)
This stores a normal Galeed trace event with metadata.cairn_kind, tags,
human_systems, duration_ms, and the standard correlation ids already carried
by the tracer.
Schema discipline
Events carry a schema_version (galeed.SCHEMA_VERSION); bump it only on a
backwards-incompatible change to the event shape (new event types are additive and
need no bump). For cross-repo joins, populate the standard CORRELATION_KEYS
(request_id, session_id, trace_id, plan_id, job_id) — galeed.correlation_ids(event)
reads them back from fields + metadata so a trace can be stitched across projects.
Develop
Works the same on native Linux and WSL — stdlib-only, no platform-specific steps.
pip install -e ".[dev]" # pytest lives in the dev extra
pytest
Hook bridges for coding agents
Galeed includes bridges so external coding agents (Codex CLI, Claude Code, Cursor) can stream their lifecycle into the family trace spine.
Install the hook command (requires the cli extra for Mongo):
pip install "galeed[cli]"
Example Codex config (~/.codex/config.toml):
[hooks]
SessionStart = ["galeed-codex-hook", "SessionStart"]
PreToolUse = ["galeed-codex-hook", "PreToolUse"]
PostToolUse = ["galeed-codex-hook", "PostToolUse"]
Stop = ["galeed-codex-hook", "Stop"]
The handler reads JSON from stdin (Codex hook payload) and emits events with
source="codex" (types like codex.sessionstart, codex.posttooluse,
codex.tool.started, etc.). Use the same GALEED_MONGO_* env vars.
See the integration plan in the Noa docs for full context and phased rollout
(Phase 0 is a minimal trace spike using a single PostToolUse hook).
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file galeed-0.3.2.tar.gz.
File metadata
- Download URL: galeed-0.3.2.tar.gz
- Upload date:
- Size: 46.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9952ae4127b33995cdc675e7cb47a0685e4e9d70c33cf068ca761480939ca84e
|
|
| MD5 |
77911ab0ff27b723a2a002154a96d6dc
|
|
| BLAKE2b-256 |
392e0576208f75bd75080bf4d9d894b5ee09e2448155fd30dfcecbc8e2d1abcc
|
File details
Details for the file galeed-0.3.2-py3-none-any.whl.
File metadata
- Download URL: galeed-0.3.2-py3-none-any.whl
- Upload date:
- Size: 39.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31b9873cf21d5576cd5c82e88207e104e603a9f94dd0a9755a7f1d3d73f1692c
|
|
| MD5 |
0ec3ba7c0df3aad2e431121c3f954267
|
|
| BLAKE2b-256 |
791f5b4551b429b3cb20ebe33bff4e5fb62375875845665198e86b6f1905ca09
|