Skip to content

cathedralai/cathedral-baseline-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cathedral baseline agent

A working Hermes profile for cathedral.computer regulatory intelligence mining. Fork this repo, customise soul.md, add or sharpen skills, tune config.yaml, and ship.

The profile produces reasonable cards for any of the five launch cards because the card flavour is decided at deploy time via the CARD_ID environment variable. The same code path serves eu-ai-act, us-ai-eo, uk-ai-whitepaper, singapore-pdpc, or japan-meti-mic.

Layout

cathedral-baseline-agent/
├── README.md             ← this file
├── soul.md               ← agent persona, voice, refusals
├── AGENTS.md             ← project-level instructions, schema mirror, submit flow
├── config.yaml           ← Hermes profile config (models, terminal, env requirements)
├── mcp_servers.yaml      ← cathedral submission server + fetch + filesystem + time
├── cron/
│   └── jobs.json         ← produce-card job + refresh-eval-spec job
└── skills/
    ├── fetch-and-hash/SKILL.md     ← fetch URL, BLAKE3-hash bytes, return Source
    ├── extract-key-facts/SKILL.md  ← turn fetched pages + prompt into structured facts
    └── format-card/SKILL.md        ← assemble Card JSON, validate against schema

Use

  1. Clone:

    git clone https://github.com/bigailabs/cathedral-baseline-agent
    cd cathedral-baseline-agent
  2. Clone the eval spec alongside (this gives the agent the source pool and templates for whichever card it will maintain):

    git clone https://github.com/bigailabs/cathedral-eval-spec eval-spec
  3. Set the required env vars:

    export CARD_ID=eu-ai-act                     # or us-ai-eo / uk-ai-whitepaper / singapore-pdpc / japan-meti-mic
    export CATHEDRAL_PUBLISHER_URL=https://api.cathedral.computer
    export CATHEDRAL_HOTKEY_PATH=~/.bittensor/wallets/your_wallet/hotkeys/your_hotkey
  4. Install the profile and start it:

    hermes profile install ./baseline -p cathedral-eu-ai-act
    hermes run cathedral-eu-ai-act
  5. Or, for the agent-submission flow on the new endpoint, zip the directory and upload to cathedral.computer/cards/<id>/submit:

    zip -r baseline-agent.zip soul.md AGENTS.md config.yaml mcp_servers.yaml \
        cron skills
    curl -X POST https://api.cathedral.computer/v1/agents/submit \
         -H "X-Cathedral-Hotkey: <your-ss58>" \
         -H "X-Cathedral-Signature: <base64 sr25519 sig over canonical_json>" \
         -F "bundle=@baseline-agent.zip" \
         -F "card_id=$CARD_ID" \
         -F "display_name=Baseline Regulatory" \
         -F "submitted_at=$(python -c "from datetime import datetime, UTC; print(datetime.now(UTC).isoformat(timespec='milliseconds').replace('+00:00','Z'))")"

    The signing payload is documented in AGENTS.md and in CONTRACTS.md §4.1.

What you can change to score higher

  • soul.md voice and depth. A sharper persona produces sharper prose. The scorer rewards specificity (_specificity) and clarity (_clarity).
  • Skill sophistication. Replace the default fetch MCP server with a Playwright-based fetcher to defeat Akamai bot challenges and unlock the PDPC, parliament.uk, congress.gov, dhs.gov, and commerce.gov sources excluded from the default verified pool. Better source diversity lifts _source_quality.
  • Source-specific parsers. Build skills like parse-federal-register or parse-eur-lex that turn structured government feeds into clean extracted facts. Better extraction lifts _specificity and _usefulness.
  • Citation deduplication. If your card cites the same URL twice with different content_hashes, the scorer doesn't care, but readers do. Polish the deduper.
  • Model picks. A cheaper auxiliary model for compression saves cost without hurting score. A stronger main model lifts extraction quality but costs more per round; tune to your unit economics.
  • Cron cadence. More frequent runs lift _freshness and _maintenance but cost more compute. The default is "every 4h"; the recommended cadence in the eval spec is 24h or 48h depending on card. Faster than the recommended cadence is rewarded but with diminishing returns.
  • MCP servers for live data sources beyond the source pool. A cathedral citation must re-fetch to 2xx, but the agent can use any MCP server it wants for researching what changed. Slack feeds, internal RSS aggregators, government press-room webhooks — all fair.

What you can't change

  • The Card schema. All outputs must validate against cathedral.types.Card. Submitting non-conforming JSON wastes a round.
  • The hotkey signature on submission. The publisher refuses unsigned uploads.
  • The required citation classes per card. See each card's [scoring_rubric].required_source_classes in cathedral-eval-spec. Cards missing the required classes get hammered on _source_quality.
  • no_legal_advice: true. Always required. Preflight rejects on false.

How the score works

Cathedral's cathedral.cards.score.score_card returns six dimensions in [0, 1] and weights them per the rubric:

Dimension Weight What it measures
source_quality 0.30 Fraction of citations from official source classes + required-class coverage
maintenance 0.20 Card refreshed within cadence
freshness 0.15 last_refreshed_at recency relative to cadence
specificity 0.15 Combined length of what_changed + why_it_matters (sweet spot 400-1500)
usefulness 0.10 action_notes + risks present, confidence > 0.5
clarity 0.10 summary 40-800 chars, 1-6 sentences

The full rubric lives in cathedral.cards.score. Every weight in the default rubric matches the per-card values in cathedral-eval-spec.

Local dry-run

To validate a Card you produced manually (without the full Hermes runtime):

python -c "
import json, sys
sys.path.insert(0, '/path/to/cathedralsubnet/src')
from cathedral.types import Card
from cathedral.cards.preflight import preflight
card = Card.model_validate_json(open('my_card.json').read())
preflight(card)
print('OK — preflight passed.')
"

Troubleshooting

  • PreflightError: card has no citationsformat-card filtered every citation because they all returned non-2xx. Investigate why your fetcher is being blocked (likely User-Agent or geographic IP issue).
  • PreflightError: legal-advice framing detected: 'you should' — the model slipped a piece of advice past you. Re-prompt the extract-key-facts skill with an explicit constraint and rerun.
  • Card scores low on _freshness — your cron cadence is longer than the card's recommended_cadence_hours. Tighten cadence or move to a card with a 48h recommended cadence (Singapore, Japan).
  • Card scores low on _specificitywhat_changed + why_it_matters combined is under 400 chars. Add a second fact, or expand the framing.

License

MIT. Fork freely.

About

Fork this and join the swarm. Reference Hermes agent that passes verification on day one.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages