Imported from odpi/egeria-workspaces (
AGENTS.md). Install upstream withnpx skills add odpi/egeria-workspaces. Copyright stays with the author.
AGENTS Guide for egeria-workspaces
What this repo is
- This repo is primarily Docker Compose orchestration for Egeria workspaces, not a single app binary.
- Two isolated deployments are first-class: quickstart (
9443/7888/8085) and freshstart (8443/7889/8086), both sharing Kafka/Postgres/proxy. - Start from root scripts, not direct compose, unless debugging compose behavior.
System architecture (read these together)
- Root overview and topology:
README.md. - Quickstart stack definition:
compose-configs/egeria-quickstart/egeria-quickstart.yaml. - Freshstart stack definition:
compose-configs/egeria-freshstart/egeria-freshstart.yaml. - Shared infra boundary:
compose-configs/shared-infra/shared-infra.yamlandcompose-configs/shared-infra/ensure-shared-infra.sh. - Runtime/exchange data flow:
exchange-*/landing-area-> integration daemon cataloging; Egeria outputs toexchange-*/distribution-hub; runtime state persists inruntime-volumes/*.
Critical workflows
- Preferred startup paths: local scripts for single-machine dev, multi-host scripts for real DNS/FQDN routing.
- Startup scripts always call
compose-configs/shared-infra/ensure-shared-infra.shfirst; do not duplicate shared Kafka/Postgres startup logic elsewhere. - Rebuild behavior is intentional: scripts use
docker compose build --pullandup -d --pull always;NO_CACHE=1adds--no-cacheviacompose-configs/shared-infra/compose-build-flags.sh;--refresh-platformon*-start-localforces platform image refresh;--refresh-pyegeriaon*-start-localbusts the cached pyegeria pip-install layer for pyegeria-web + jupyter (seecompose-configs/shared-infra/pin-latest-digest.shand each Dockerfile'sPYEGERIA_BUSTARG for why a plain rebuild alone doesn't pick up a newer pyegeria release). - Synchronization workflow:
user-syncandquick-start-local --sync-*automate exporting/importing demo DB schemas (demo_auth,demo) via SSH/SCP. They useREMOTE_USERandREMOTE_PASSWORDenv vars or flags, and rely onsshpassif passwords are provided.
Project-specific conventions
quick-start-*andfresh-start-*repopulate runtime server configs on each start fromcompose-configs/egeria-quickstart/serversintoruntime-volumes/*/data/servers.- Freshstart secrets are seeded from templates in
compose-configs/egeria-freshstart/secrets/only when files are missing (never overwrite existing runtime secrets). gen-env.shin each deployment rewritesexchange-*/config/config.jsonwith currentHOST_FQDN, server names (qs-*vsfs-*), and savesconfig.json.bakonce.- Local vs multi-host overlays differ mainly by
extra_hostshost-gateway mapping (*-local.yamlvs*-cluster.yaml); keep this behavior symmetric across quickstart/freshstart. - When changing one flavor, check the sibling flavor for parity (
egeria-quickstart<->egeria-freshstart).
PyegeriaWebHandler and MCP integration
- Main backend entrypoint:
compose-configs/egeria-quickstart/PyegeriaWebHandler/pyegeria_handler.py(FastAPI + router modules by domain). - MCP server entrypoint:
compose-configs/egeria-quickstart/PyegeriaWebHandler/mcp_server.py; Obsidian MCP plugin is inobsidian-plugins/call-dr-egeria/. - Token-gated SSE/messages endpoints rely on
MCP_ACCESS_TOKEN(see middleware inpyegeria_handler.py). pyegeria-webis mounted read-write to workspace folders (/app,/config,/work, templates, demo data), so path changes must preserve container mount assumptions.- Async invariant:
async defFastAPI routes must use*_asyncclient factories (e.g._runtime_manager_async,_security_officer_async) that callawait async_apply_token(mgr)fromegeria_auth.py. Never call syncapply_token()orcreate_egeria_bearer_token()from an async route — they callrun_until_complete()internally and raiseRuntimeErroron Python 3.10+. See CLAUDE.md for the full pattern andoperations_handler.py/audit_handler.pyfor reference implementations. dr_egeria_md.py'ssetup_dispatcheris imported directly from pyegeria'smd_processing.dr_egeria— do not reintroduce a local copy. It carried a hand-duplicated fork of that function for ~3+ months (same structure, no app-specific processors) that silently drifted out of sync as pyegeria added new command families upstream, missingCreate Report/Update Reportand the entire Dashboard Sheet family entirely (fixed 2026-07-31). A local command unrecognized here doesn't necessarily mean pyegeria lacks it — checkpython3 -c "from md_processing.dr_egeria import setup_dispatcher; ..."against the real one before concluding a feature isn't released yet.- When adding a new Dr.Egeria command/processor in egeria-python, verify it actually works through this app's
/api/dr-egeria/execute-document(or/api/dr-egeria/execute) endpoint, not just the egeria-python dev venv CLI. This app has its own request path intomd_processing; a workingdr_egeria --processin the dev checkout does not by itself prove the deployed web app can run the same command (see thesetup_dispatchernote above for exactly this failure mode). - A new local (non-Egeria) persisted store in pyegeria/Dr.Egeria (e.g.
~/.pyegeria/dashboard_sheets.json) needs aruntime-volumes/*-pyegeria-statebind mount added to bothegeria-quickstart.yamlandegeria-freshstart.yamlat the same time it's introduced — otherwise it's container-local ephemeral state, silently wiped on the nextdocker compose up -d --build/--force-recreate, with no error to signal it.
Tests and diagnostics
- Focused Python tests exist in
compose-configs/egeria-quickstart/PyegeriaWebHandler/tests/. - Typical targeted test run:
python -m pytest compose-configs/egeria-quickstart/PyegeriaWebHandler/tests. - Useful logs/artifacts: root
build*.log,compose-configs/debug_log.log, andcompose-configs/egeria-quickstart/PyegeriaWebHandler/debug_log.log. - For infra readiness, use
docker compose -p egeria-shared-infra -f compose-configs/shared-infra/shared-infra.yaml ps.
Change safety checklist for agents
- Keep service names and server-name prefixes consistent (
qs-quickstart,fs-freshstart). - Do not break shared network/ports contract (
egeria_network, Kafka9192/9193/9194, Postgres5442, proxy6000/6001). - Preserve host-mounted persistence paths under
runtime-volumes/andexchange-*. - If editing compose/env generation, verify both startup scripts and matching README sections remain aligned.
- Never write an absolute, machine-specific filesystem path (e.g.
/Users/<name>/...,/home/<user>/...) into anything committed — compose bind mounts, docs, scripts, CLAUDE.md/AGENTS.md notes. This repo is cloned onto multiple machines with different absolute paths (see CLAUDE.md's "If you're Claude running on a different machine than usual"). Compose bind mounts must stay relative to the compose file's own directory (../../runtime-volumes/..., matching every existing mount) — never the checkout's absolute path on whichever machine happened to write them.