A bioregional knowledge commoning agent for the Salish Sea
Octo is an AI agent built on OpenClaw (our fork of openclaw/openclaw) that serves as an organ of perception for the Salish Sea bioregion. It combines a knowledge graph backend with a formal ontology for bioregional knowledge commoning β enabling it to reason about practices, patterns, discourse, and the relationships between them.
Octo is also a KOI-net federation coordinator β it aggregates knowledge from leaf-node agents (Greater Victoria, Cowichan Valley, etc.) into a unified Salish Sea knowledge commons using the KOI-net protocol for authenticated, event-driven federation.
- Knowledge Commoning: Tracks bioregional practices, identifies trans-bioregional patterns, and documents case studies using a formal ontology grounded in the work of David Bollier & Silke Helfrich
- Discourse Graph: Manages questions, claims, and evidence with typed relationships (supports, opposes, informs) β enabling progressive formalization of bioregional knowledge
- Entity Resolution: Multi-tier entity resolution (exact β fuzzy β semantic β create) with OpenAI embeddings and pgvector
- Web Content Curation: Users share URLs via Telegram/Discord, Octo previews (with Playwright for JS-rendered sites), evaluates bioregional relevance, and ingests into the knowledge graph with entity linking
- Vault Integration: Bidirectional linking between an Obsidian-style vault and a PostgreSQL knowledge graph
- KOI-net Federation: Authenticated event-driven protocol for cross-bioregional knowledge sharing with ECDSA-signed envelopes, background polling, and cross-reference resolution
The Salish Sea Knowledge Garden is Octo's public-facing knowledge site β a browsable, searchable view of the knowledge graph with an interactive D3.js visualization and a chatbot for asking Octo questions directly.
- Canonical URL:
https://45.132.245.30.sslip.io - Legacy/raw-IP URL:
http://45.132.245.30
[Greater Victoria] [Cowichan Valley] β leaf nodes (bioregional agents)
β β
[Octo / Salish Sea Coordinator] β federation coordinator
β β
[Front Range] [Cascadia Coordinator] β future meta-coordinator
port 8355 (local) β separate bioregional network
(peer of Cascadia, not under it)
Each node runs the same KOI API codebase with its own database, vault, and identity. Nodes exchange events via the KOI-net protocol β when a practice is registered in Greater Victoria, it appears as a cross-reference in Octo within seconds.
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
β OpenClaw Runtime β
β (Telegram / Discord / CLI) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Workspace: IDENTITY.md, SOUL.md, KNOWLEDGE.md β
ββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β bioregional-koi plugin (OpenClaw) β
β ββ Entity resolution (resolve, register, search) β
β ββ Web content curation (preview_url, ingest_url)β
β ββ Vault read/write β
β ββ Relationship sync β
β ββ 15 tools per koi-tool-contract β
β OR: MCP server (personal-koi-mcp) β same 15 toolsβ
β for Claude Code / Cursor / MCP hosts β
ββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β KOI Processor API (uvicorn) β
β ββ entity_schema.py (15 entity types) β
β ββ vault_parser.py (27 predicates, aliases) β
β ββ web_fetcher.py (URL fetch + Playwright) β
β ββ personal_ingest_api.py β
β ββ KOI-net protocol (feature flag) β
β ββ koi_net_router.py (8 protocol endpoints) β
β ββ koi_envelope.py (ECDSA P-256 signing) β
β ββ koi_poller.py (background poller) β
β ββ event_queue.py (DB-backed queue) β
β ββ node_identity.py (keypair + RID) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β PostgreSQL + pgvector + Apache AGE β
β (Docker, localhost:5432) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Agent | Port | Node RID | Entities | KOI-net |
|---|---|---|---|---|
| Octo (Salish Sea) | 8351 | orn:koi-net.node:octo-salish-sea+f0655... |
70 | Enabled (coordinator) |
| Greater Victoria | 37.27.48.12:8351 (remote, poly) | orn:koi-net.node:greater-victoria+81ec4... |
4 | Enabled (leaf node) |
| Front Range | 127.0.0.1:8355 (localhost on Octo) | orn:koi-net.node:front-range+b5429... |
4 | Enabled (peer node) |
The formal ontology (ontology/bkc-ontology.jsonld) defines 9 entity types and 17 predicates for bioregional knowledge commoning:
| Phase | Type | Description |
|---|---|---|
| Knowledge Commoning | Practice | Bioregional-specific activity or approach |
| Pattern | Trans-bioregional generalization from practices | |
| CaseStudy | Documented real-world example | |
| Bioregion | Named ecological/cultural region | |
| Discourse Graph | Protocol | General coordination pattern |
| Playbook | Local implementation of a protocol | |
| Question | Inquiry or hypothesis | |
| Claim | Assertion or conclusion | |
| Evidence | Data, observations, or results |
Plus 6 base types inherited from the KOI system: Person, Organization, Project, Location, Concept, Meeting.
Knowledge Commoning: aggregates_into (Practice β Pattern), suggests (Pattern β Practice), documents (CaseStudy β Practice), practiced_in (Practice β Bioregion)
Discourse Graph: supports, opposes, informs, generates, implemented_by, synthesizes, about
SKOS + Hyphal: broader, narrower, related_to, forked_from, builds_on, inspired_by
See ontology/bkc-ontology.jsonld for the formal OWL/RDFS definitions.
βββ workspace/ # Octo's OpenClaw workspace (agent identity & config)
β βββ IDENTITY.md # Who Octo is
β βββ SOUL.md # Philosophy and values
β βββ KNOWLEDGE.md # BKC domain expertise
β βββ TOOLS.md # Environment-specific tool config
βββ vendor/ # Vendored KOI runtime code (pinned SHA)
β βββ pin.txt # Canonical commit SHA to deploy
β βββ sync.sh # Fetch + vendor at pinned SHA (GitHub fallback)
β βββ koi-processor/ # Vendored code (api/, migrations/, requirements.txt)
βββ docker/ # Docker stack (PostgreSQL + KOI API)
β βββ docker-compose.yml # Full stack: postgres + koi-api
β βββ Dockerfile.koi-api # KOI API image (Python 3.12, from vendored code)
β βββ Dockerfile.postgres-age # PostgreSQL with pgvector + Apache AGE
β βββ init-extensions.sql
β βββ create-additional-dbs.sh
βββ scripts/ # Setup + management
β βββ bootstrap.sh # One-command VPS bootstrap (curl|bash)
β βββ setup-node.sh # Interactive setup wizard (Docker-based)
β βββ connect-koi-peer.sh # Idempotent peer/coordinator connect helper
β βββ manage-agents.sh # Start/stop/status for all agents
β βββ test-federation.sh # End-to-end federation test
βββ deploy.sh # Vendor sync β rsync β migrate β restart β health check
βββ gv-agent/ # Greater Victoria leaf node config
βββ fr-agent/ # Front Range peer node config
βββ plugins/
β βββ bioregional-koi/ # OpenClaw plugin connecting to KOI API
βββ ontology/ # Formal BKC ontology (JSON-LD)
β βββ bkc-ontology.jsonld
βββ vault-seed/ # Seed entity notes exercising the full predicate chain
βββ docs/ # Guides and strategy
βββ new-bioregion-quickstart.md # Quick-start guide (~30 min)
βββ join-the-network.md # Comprehensive reference (all paths)
βββ ...
curl -sSL https://raw.githubusercontent.com/BioregionalKnowledgeCommons/Octo/main/scripts/bootstrap.sh | bashThis installs Docker and git, clones the repo, and launches the interactive setup wizard. Everything runs in Docker β no Python/pip/venv on the host.
git clone https://github.com/BioregionalKnowledgeCommons/Octo.git && cd Octo
bash scripts/setup-node.shThe wizard handles: vendor sync, Docker build, database creation, migrations, keypair generation, workspace files, and federation connection.
See docs/new-bioregion-quickstart.md for the full walkthrough.
- Docker (installed automatically by
bootstrap.shif missing) - Git
- An embedding provider (OpenAI API key or local Ollama β optional, for semantic entity resolution)
Enable federation by setting KOI_NET_ENABLED=true in the agent's env file. This activates:
- Protocol endpoints at
/koi-net/*(handshake, poll, broadcast, confirm, etc.) - ECDSA P-256 signed envelopes for authenticated communication
- Background poller for event-driven cross-reference creation
- Time-based exponential retry backoff with automatic recovery when peers come back online (no service restart required)
- Auto-generated node identity (keypair stored in
/root/koi-state/)
Federation readiness checklist (critical):
- Set
KOI_BASE_URLto a peer-reachable URL (not localhost), e.g.http://<public-ip>:8351. - Ensure peers can reach
/koi-net/*on that URL (direct bind or reverse proxy). - Use edge semantics correctly for polling:
source_node= node being polled (data provider)target_node= node doing the polling
- Ensure each peer's
public_keyis present inkoi_net_nodeson the other side. - Use
POST /koi-net/events/poll(legacyPOST /koi-net/pollis not supported). - Prefer
bash scripts/connect-koi-peer.sh --db <db> --peer-url <url>for idempotent local setup. - Keep strict validation disabled during bootstrap:
KOI_STRICT_MODE=falseKOI_REQUIRE_SIGNED_ENVELOPES=falseKOI_REQUIRE_SIGNED_RESPONSES=falseKOI_ENFORCE_TARGET_MATCH=falseKOI_ENFORCE_SOURCE_KEY_RID_BINDING=false
- Enable strict mode only after peer coordination confirms signed-envelope compatibility.
KOI endpoint model:
- Core protocol endpoints:
/koi-net/events/broadcast,/koi-net/events/poll,/koi-net/manifests/fetch,/koi-net/bundles/fetch,/koi-net/rids/fetch - Octo extensions:
/koi-net/handshake,/koi-net/events/confirm,/koi-net/health
Quick federation sanity checks:
# Local node identity and advertised base URL
curl -s http://127.0.0.1:8351/koi-net/health | python3 -m json.tool
# Check edge orientation
docker exec regen-koi-postgres psql -U postgres -d <db_name> -c \
"SELECT edge_rid, source_node, target_node, status FROM koi_net_edges;"
# Check peer keys
docker exec regen-koi-postgres psql -U postgres -d <db_name> -c \
"SELECT node_rid, node_name, length(public_key) AS key_len FROM koi_net_nodes;"Current KOI-net discovery is introduction-based, not automatic gossip/discovery:
- Nodes discover each other by sharing
KOI_BASE_URL+node_ridout-of-band (human coordination, registry docs, trusted intros). - Each side verifies identity from
/koi-net/health(node_rid,public_key) before creating edges.
How nodes decide who to connect to:
- Leaf nodes connect to one coordinator for their bioregion.
- Peer networks connect to a small set of trusted peers with overlapping goals/ontology.
- Edge
rid_typesdefine the exchange scope (principle of least exposure). - Prefer explicit trust/governance agreements over broad, automatic peering.
Practical bootstrap pattern:
# Run on each side (or at least on the initiating side)
bash scripts/connect-koi-peer.sh --db <local_db> --peer-url http://<peer-ip>:8351bash scripts/manage-agents.sh status # Health, RAM, PG connections
bash scripts/manage-agents.sh restart # Restart all agents
bash scripts/test-federation.sh # End-to-end federation testOcto is an agent that aims to help the BKC CoIP (Bioregional Knowledge Commons Community of Inquiry & Practice) β a collaborative initiative focused on building shared knowledge infrastructure for bioregional organizing worldwide.
The ontology is grounded in:
- Bollier & Helfrich β Free, Fair & Alive (pattern mining from commoning practices)
- Joel Chan β Discourse Graphs (progressive formalization: Question β Claim β Evidence)
- OpenCivics β Protocol/Playbook extension (general patterns + local implementations)
- SKOS β Concept hierarchies (broader/narrower/related)
- Hyphal Tips β Genealogical relationships (forked_from, builds_on, inspired_by)
MIT