Entity Graph And Service Control
AlphaSwarm now treats the entity graph as the canonical relationship layer for
instruments, companies, datasets, pipeline assets, and service metadata.
Postgres remains the compatibility store for existing APIs, while Neo4j is
the graph backend when ALPHASWARM_GRAPH_STORE=neo4j.
Local Services
Start the local stack with the visualization overlay:
docker compose -f alphaswarm_platform/compose/docker-compose.yml -f alphaswarm_platform/compose/docker-compose.viz.yml --profile visualization up -d
Neo4j is part of the base compose file and is exposed on:
- Browser:
http://localhost:7474 - Bolt:
bolt://localhost:7687
Relevant env keys:
ALPHASWARM_GRAPH_STORE=neo4j
ALPHASWARM_NEO4J_URI=bolt://localhost:7687
ALPHASWARM_NEO4J_USER=neo4j
ALPHASWARM_NEO4J_PASSWORD=aqpneo4j
ALPHASWARM_NEO4J_DATABASE=neo4j
ALPHASWARM_ENTITY_GRAPH_SYNC_ENABLED=true
Entity Sync
The active instrument cache reads from the existing instruments table and
upserts each instrument as a security entity with identifiers for
vt_symbol, ticker, and any instrument metadata identifiers.
Dataset registration for market-bar datasets links dataset versions to the instrument entities they describe. Airbyte and Dagster metadata syncs also write service nodes and relationships so the graph can show ingestion and pipeline context around datasets.
Useful endpoints:
GET /registry/entities/graphGET /registry/entities/instruments/activePOST /registry/entities/instruments/syncPOST /registry/entities/instruments/load-template
Service Manager
The service manager aggregates health/config/logs for:
- Trino
- Polaris
- Iceberg
- Superset
- Airbyte
- Dagster
- Neo4j
Useful endpoints:
GET /service-manager/healthGET /service-manager/{service}/healthGET /service-manager/{service}/logsPOST /service-manager/{service}/actions
Lifecycle actions and logs are guarded by ALPHASWARM_SERVICE_CONTROL_ENABLED=true
because they invoke Docker Compose from inside the API process.
UI
/data/entity-graphexposes the Neo4j-backed entity graph and active instrument list./data/servicesexposes service health cards, guarded lifecycle actions, and log tails./workflows/dataincludes Dagster assets, runs, schedules, and sensors.