Alexandria system flow

Interactive map of write, ingest, index, retrieve, and answer paths — grounded in SPEC.md, ORCHESTRATOR.md, and the current monorepo.

Setup guide
Client API / MCP Pub/Sub Worker Store / index Shipped in code Partial / evolving Ops infra required

Functional flow

Click any node for responsibilities, I/O, repo paths, and operational notes. Dual-publish fan-out is the center of the write path.

1 · Manual agent write → index → query

REST source creation returns 202 after registry + publish; MCP write tools also return before workers finish. Indexing is async; query via Search primitives (LLM-free) or Ask (planner → executor → synthesizer).

2 · Slack event ingestion (Socket Mode)

Ops Connector creation stores config only. Deploy the persistent worker via infra/08-deploy-slack-connector.sh. New activity refetches a thread; bulk history backfill is not implemented. Credentials: Secret Manager alexandria-ws-{ws}-connector-{id}-*.

3 · GitHub scheduled / poll ingestion

Ops This is not a webhook. Connector creation stores config only; deploy via infra/09-deploy-github-connector.sh, trigger the first /sync, and schedule later calls. Initial sync is capped at 200 eligible files. Live PR listing goes through ACL-filtered connectors (github-acl.ts).

4 · Fan-out pipeline (source-ingested · document-ready · evidence-ready)

Shipped Embeddings listens only on evidence-ready. Legacy sub-embeddings on source-ingested is deleted by infra/01-pubsub-subscriptions.sh.

5 · Evidence records + embeddings + Pinecone / FTS

Partial VECTOR_BACKEND=pgvector adapter exists for benchmarks; production default is Pinecone. See infra/10-vector-notes.md.

6 · Wiki maintainer + lint

7 · Search vs Ask

MCP/REST: search, search_context, search_code, recent_prs, and wiki tools. MCP has no single Ask tool; clients orchestrate.

8 · Projects + ACL

Projects never grant access. Visibility: workspace | restricted (grants) | project (only when attached). Agents without userId see workspace-visible sources only. Standalone MCP search_code, recent_prs, and fetch_source have no project_id argument; Ask passes project scope to its retrievers.