WayGate is a modular platform for building Generation-Augmented Retrieval (GAR) workflows. It provides a plugin-based runtime for ingesting content via webhooks, storing and managing documents, driving LLM generation pipelines, and scheduling recurring jobs — all wired together through a shared configuration and plugin registry.
apps/
web/ — Unified FastAPI web app for UI, auth, and mounted webhook ingress
scheduler/ — Background job runner for cron-style workflows
worker-app/ — Single transport-agnostic worker app for workflow execution
libs/
core/ — Shared framework: plugin system, config registry, bootstrap, logging
webhooks/ — Mountable FastAPI webhook ingress app and OpenAPI helpers
worker/ — Shared worker runtime helpers and JetStream consumer loop
workflows/ — Shared workflow entrypoints executed by workers
plugins/
local-storage/ — StoragePlugin backed by the local filesystem
provider-ollama/ — LLMProviderPlugin backed by a local Ollama server
communication-http/ — CommunicationClientPlugin for HTTP worker dispatch
communication-nats/ — CommunicationClientPlugin for JetStream worker dispatch
communication-rq/ — CommunicationClientPlugin for RQ worker dispatch
webhook-generic/ — WebhookPlugin for generic HTTP webhook ingestion
-
Bootstrap — call
bootstrap_app()fromwaygate-core. It loads all installed plugins via setuptools entry points, discovers their config schemas, builds a merged Pydantic settings object (populated from environment variables), and instantiates each plugin with its config injected. -
Configuration — all settings live under the
WAYGATE_env prefix. Core settings useWAYGATE_CORE__*; each plugin gets its own namespace derived from its plugin name (e.g.WAYGATE_LOCAL_STORAGE__BASE_PATH). -
Plugins — plugins implement one or more pluggy hook specs defined in
waygate-core. Installing a plugin package and declaring its entry point is sufficient; no code changes to the core are needed.
Requires Python 3.14+ and uv.
# Install all packages
uv sync --all-packages
# Run the unified web app
uv run waygate-web
# Run the scheduler
uv run waygate-schedulerCopy env.example to .env and set values appropriate for your environment before starting.
Use env.compose.example as the template for your local
.env.compose file before starting either Compose workflow.
The default compose.yml is the local development path. It builds
the images from the workspace, keeps web and worker on the default
stack, and runs a one-shot migration container before application services
start.
docker compose up -dOptional development-only profiles:
scheduleradds the scheduler process.- switch
WAYGATE_CORE__COMMUNICATION_PLUGIN_NAMEtocommunication-rqorcommunication-httpwhen you want the singleworkerservice to listen on a different transport.
Use compose.prod.yml when you want an explicit runtime shape selected via profiles.
NATS-backed runtime with local Ollama and Chroma:
docker compose -f compose.prod.yml --profile nats --profile chroma --profile ollama up -d web workerRQ-backed runtime with local Ollama and Chroma:
# First set WAYGATE_CORE__COMMUNICATION_PLUGIN_NAME=communication-rq in .env.compose
docker compose -f compose.prod.yml --profile rq --profile chroma --profile ollama up -d web workerAdd --profile scheduler to either production-style command when you want the
cron scheduler in the stack.
Important runtime details:
- env.compose.example defaults to
communication-nats, so thenatsprofile is the matching production-style transport unless you change the env file. - env.compose.example also points
WAYGATE_WEB_AUTH__DEFAULT_DATABASE_URIat the Compose Postgres service so AuthTuna does not fall back to an in-container SQLite path. - env.compose.example includes
WAYGATE_OLLAMAPROVIDER__BASE_URL=http://ollama:11434, so theollamaprofile is required unless you point that setting at an external provider. - The one-shot
migrateservice now runsalembic upgrade headbefore the web app and workers start.
Use the profiled production-style Compose stack when you want to exercise the generic webhook -> web app -> JetStream -> worker pipeline with the Ollama provider.
- Start the profiled smoke stack.
docker compose -f compose.prod.yml --profile nats --profile chroma --profile ollama up -d db valkey chromadb nats ollama- Pull the models required by the local smoke test before starting the worker.
docker compose -f compose.prod.yml --profile nats --profile chroma --profile ollama exec ollama ollama pull qwen3.5:9b
docker compose -f compose.prod.yml --profile nats --profile chroma --profile ollama exec ollama ollama pull hermes3:8b- Start the web app and worker service. The migration service runs automatically.
docker compose -f compose.prod.yml --profile nats --profile chroma --profile ollama up -d web worker- Post the sample generic webhook payload.
curl -X POST http://127.0.0.1:8080/webhooks/generic-webhook \
-H "Content-Type: application/json" \
--data @scripts/fixtures/generic-webhook.sample.json- Verify the result in the bind-mounted wiki directory.
Raw webhook artifacts are written under ./wiki/raw/. Successful compile runs
write published markdown under ./wiki/published/. If the workflow stops for a
human decision, the review record is written under ./wiki/review/.
- The worker validates the configured compile models at startup. If you change
WAYGATE_CORE__METADATA_MODEL_NAME,WAYGATE_CORE__DRAFT_MODEL_NAME, orWAYGATE_CORE__REVIEW_MODEL_NAME, pull those models into Ollama before restarting it. mise run test:compose:nats-smokeruns the same workflow in an isolated Compose project using the profiled production-style stack and a lightweight Ollama smoke-model profile so end-to-end verification completes faster.
| Package | Description |
|---|---|
waygate-core |
Plugin system, config registry, bootstrap |
waygate-web |
Unified FastAPI web app |
waygate-scheduler |
Cron job runner |
waygate-worker-app |
Primary transport-agnostic worker app |
waygate-webhooks |
Mountable webhook ingress app |
waygate-worker |
Shared worker runtime helpers |
waygate-plugin-local-storage |
Filesystem storage plugin |
waygate-plugin-provider-ollama |
Ollama LLM provider plugin |
waygate-plugin-communication-http |
HTTP communication client plugin |
waygate-plugin-communication-nats |
JetStream communication client plugin |
waygate-plugin-communication-rq |
RQ communication client plugin |
waygate-workflows |
Shared workflow entrypoints |
waygate-plugin-webhook-generic |
Generic webhook ingestion plugin |
Implement the relevant abstract base class from waygate-core, register a waygate_plugin_config hookimpl to expose your config schema, and declare the entry point in your pyproject.toml. See any plugin under plugins/ for a working example.
This repository uses Conventional Commits. All commit messages must follow the <type>(<scope>): <summary> format — see .github/copilot-instructions.md for the full convention used here.