Skip to content

full_demo

Level 7 · Full Demo — a complete web application exercising every subsystem.

full_demo is the reference application: a multi-tenant chat UI with SSE streaming, all five HMS memory layers, Deep Sleep consolidation, spreading activation, domain-plugin configuration, an anomaly-detection sub-agent, report and chart generation tools, and full observability (traces, analytics, session replay). It runs fully in-memory with no infrastructure, or against Postgres + MongoDB for real persistence and graph visualization.

This is a large, multi-package example. This page orients you to its structure and run modes; read the code under examples/full_demo/ and its README.md for the full walkthrough.

  • Prerequisites: pip install -e ".[agent-api,anthropic,mongodb]"
  • Key concepts: 5-layer HMS, consolidation, spreading activation, domain plugins, sub-agents, SSE streaming, observability

Run modes

# 1. In-memory — zero infrastructure
python -m examples.full_demo.server

# 2. With Postgres + MongoDB — full persistence + graph visualization
docker compose up -d
POSTGRES_DSN=postgresql://symfonic:symfonic_dev@localhost:5432/symfonic \
  MONGODB_URI=mongodb://localhost:27018/symfonic \
  python -m examples.full_demo.server

# 3. Real LLM, no infrastructure
ANTHROPIC_API_KEY=sk-ant-... python -m examples.full_demo.server

Then open http://localhost:8000.

Entry point

# examples/full_demo/__main__.py
"""Allow running as: python -m examples.full_demo"""

from examples.full_demo.server import main

main()

server.py builds the FastAPI app, wires the memory backends (in-memory or Postgres/Mongo depending on env), registers the tools, and mounts the chat UI.

Project layout

examples/full_demo/
├── server.py            # FastAPI app: routes, SSE streaming, agent wiring
├── domain_config.py     # DomainTemplate + SOUL schema (the agent's persona)
├── seed.py              # seed data for a runnable-out-of-the-box demo
├── mock_provider.py     # deterministic provider for the no-API-key path
├── observability.py     # trace / analytics / session-replay wiring
├── models/              # persistence models
│   ├── chat.py  billing.py  finding.py  trace.py
│   ├── prompt_versions.py   migrations.py
├── tools/               # the agent's tool suite
│   ├── knowledge_search.py  demo_knowledge.py
│   ├── chart_gen.py  pdf_report.py  multimodal_report.py
│   ├── anomaly_detection.py  executor.py  resolvers.py
│   └── langchain_tools.py
└── infra/               # background processing
    ├── celery_app.py  celery_adapter.py  tasks.py
    └── telemetry.py

What each area demonstrates

Area Files Shows
HTTP + UI server.py create_agent_router, SSE token streaming, multi-tenant headers
Persona domain_config.py DomainTemplate with a SOUL schema driving agent identity
Memory models/, backends All 5 HMS layers; Postgres primary + MongoDB secondary for the memory graph
Consolidation infra/tasks.py Deep Sleep 7-phase consolidation and spreading activation
Tools tools/ Charts, PDF and multimodal reports, knowledge search, an executor
Sub-agents tools/anomaly_detection.py A delegated specialist (see sub_agents)
Background work infra/celery_* InProcessScheduler and optional Celery tasks
Observability observability.py, infra/telemetry.py Traces, analytics, session replay

How to read it

  1. Start at server.py — follow how the request enters, the agent runs, and tokens stream back over SSE.
  2. Read domain_config.py to see how persona/SOUL shapes the agent.
  3. Pick one file in tools/ (e.g. knowledge_search.py) to see a real tool end to end.
  4. Turn on the Postgres/Mongo mode to watch the memory graph populate and consolidation run.

Because it touches every subsystem, full_demo doubles as an integration test of the framework — if it runs clean, the stack is wired correctly.

What to try next

See also