A universal, embeddable agentic harness for any SaaS enterprise.
Status (2026-05-12): MVP build complete β Phases 0β9 land per INIT-003. 38 ADRs accepted, 5 invention disclosures drafted, polyglot data plane (PG + Qdrant + Redpanda + ClickHouse + Neo4j), three-tier capability model (Skills / Tools / Sub-Agents), per-capability eval dashboard, tier/quota enforcement, proactive engine with attention-budget cap. Read PLOT.md for the one-page narrative.
# Prereqs: Node 20+, pnpm 9+
pnpm install
pnpm demoThat's it. pnpm demo builds the required packages, starts all three
services (runtime + sub-agent + host page), waits for them to be
healthy, then opens Chrome to the embedded agent in the mock Expedia
host page. Press Ctrl-C to tear everything down β the launcher kills
the full process tree, so no orphaned Vite or Node processes are left
behind.
Useful URLs after launch:
http://localhost:5175/β the embedded agent in a host sitehttp://localhost:8080/dashboardβ auto-generated eval metrics per capabilityhttp://localhost:8080/healthβ runtime config + mode + dev hints
Flags:
pnpm demo --no-build # skip the up-front build (if you just ran pnpm build)
pnpm demo --no-open # don't auto-launch Chrome (URLs are still printed)
pnpm demo --port-runtime 9000 --port-host 5500 # override default portsThe three services individually, if you prefer separate terminals:
node apps/demo-expedia/server/start-runtime.mjs # :8080
node apps/demo-expedia/server/start-trip-planner.mjs # :8082
pnpm --filter @saasagent/demo-expedia dev # :5175Without an ANTHROPIC_API_KEY the runtime falls back to StubPlanner β
the UI shell still loads, DOM observation flows, eval signals are recorded,
the quota banner displays, and the proactive engine fires. To exercise
skills directly without a planner:
curl -X POST -H 'content-type: application/json' \
-d '{"origin":"SFO","destination":"NRT","cabin":"economy"}' \
http://localhost:8080/executor/skill/expedia.search-flights/health includes a devHint block with the full direct-dispatch surface
when in stub mode.
Host page (any SaaS web app)
β
βββ <saas-agent runtime="http://localhost:8080" mode="side-panel">
β β’ SSE: server β shell layouts (composeCycleId on every layout)
β β’ WS: shell β server emits (envelopes echo cycleId β P-001)
β β’ DOM observer: MutationObserver + IntersectionObserver +
β document-level `saasagent:event` semantic relay (ADR-022)
β
βββ Runtime (single Node process)
βββ Planner (StubPlanner / SonnetPlanner β claude-sonnet-4-6)
βββ Composer (StubComposer / HaikuComposer + Sonnet fallback)
βββ Three-tier registries: Skills / Tools / Sub-Agents
βββ Polyglot memory: PG / Qdrant / ClickHouse / Neo4j (per ADR-008)
βββ EvalProvider (user signals) + ChurnRiskCalculator
βββ CapabilityEvalRunner (per-skill quality, dashboard at /dashboard)
βββ TierProvider (per-user request quotas, "X remaining" banner)
βββ ProactiveEngine (multi-signal scoring + attention budget)
βββ Sub-agent federation: POST /federate (symmetric β every
runtime can both call and be called)
apps/demo-expedia/ is the reference. Three files, ~30 LoC of glue:
server/start-runtime.mjsβ construct aRuntimewith your skills, tools, sub-agents, tier definitions, proactive config. ~30 LoC.server/start-trip-planner.mjsβ a federated specialist sub-agent via@saasagent/sdkdefineSubAgent.index.html+src/main.tsβ your existing app, plus an embedded<saas-agent>Web Component andsaasagent:eventcustom events on semantic moments (cart-item-added, flight-shortlisted, etc.).
See apps/demo-expedia/ β every line is annotated.
| Area | Path |
|---|---|
| Vision (one-pager) | PLOT.md |
| Vision (long form) | docs/vision.md |
| Architecture overview | docs/architecture/overview.md |
| Tech stack choices | docs/architecture/tech-stack.md |
| Performance / scaling | docs/architecture/optimization.md |
| Non-functional requirements | docs/requirements/non-functional.md |
| Decision log (38 ADRs) | docs/architecture/adr/ |
| Patents track (5 inventions) | docs/patents/ |
| Work tracking | docs/work/ |
| OSS readiness + getting-started | docs/getting-started.md |
| NFR validation | docs/operations/nfr-validation.md |
This project is licensed under Apache License 2.0. Β§3 of the license grants every user of the code a royalty-free patent license under the standard terms. See NOTICE for additional context and docs/patents/ for the invention disclosures and filing strategy (ADR-035).
Two project-local skills run after each Claude Code conversation:
extract-insightsβ scans the conversation, updates docs.work-managementβ maintains the initiative β epic β story β task hierarchy underdocs/work/.
Both are wired via the Stop hook in .claude/settings.json.