local-development
Operate the Airweave local Docker stack safely: start, reuse, restart, recreate, destroy, seed environment, check ports, and recover health failures.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- local-development
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Operate the Airweave local Docker stack safely: start, reuse, restart, recreate, destroy, seed environment, check ports, and recover health failures.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/local-stack.md7.8 KB
- 参考文档references/troubleshooting.md7.9 KB
- 脚本scripts/local-stack.sh25.2 KB
03 SKILL.md 正文
Airweave Local Development
Use this sub-skill when a future Airweave task needs the local Docker stack running or diagnosed. It owns stack bootstrap, restart/recreate/destroy decisions, .env seeding, service profiles, port checks, and health recovery.
Do not use this sub-skill for backend endpoint details, connector implementation, frontend page logic, MCP transport behavior, or Monke connector orchestration. After the stack is healthy, route search, collection, source-connection, connect-session, and webhook workflows to ../backend-api/SKILL.md.
Safe operating rules
- Work from an explicit repository root. The bundled helper accepts
--repo-root /path/to/airweaveand works from any current directory. - Prefer
statusbefore mutation:bash skills/disco/airweave/sub-skills/local-development/scripts/local-stack.sh \ --repo-root "$AIRWEAVE_REPO" status - A plain
startis state-preserving: it seeds.envonly when needed, starts missing/stopped services, and reuses running containers instead of deleting data. - Use
restartfor already-created containers when you want to preserve Postgres/Redis/Vespa volumes. - Use
recreateonly when container state is stale or service definitions changed; it removes compose containers and volumes, then starts fresh from the current.env. - Use
destroyonly with explicit user intent. It removes compose containers and Docker volumes; it does not intentionally edit.envor purge manually managed host files.
Common commands
# Fresh or reuse-safe start, including backend, frontend, connect widget, Vespa, Temporal, Redis, Postgres, Svix.
bash skills/disco/airweave/sub-skills/local-development/scripts/local-stack.sh \
--repo-root "$AIRWEAVE_REPO" start
# Backend/service stack without frontend UI.
bash skills/disco/airweave/sub-skills/local-development/scripts/local-stack.sh \
--repo-root "$AIRWEAVE_REPO" start --skip-frontend
# Preserve data; restart existing containers and rerun health checks.
bash skills/disco/airweave/sub-skills/local-development/scripts/local-stack.sh \
--repo-root "$AIRWEAVE_REPO" restart
# Recreate containers and compose volumes from current repo config.
bash skills/disco/airweave/sub-skills/local-development/scripts/local-stack.sh \
--repo-root "$AIRWEAVE_REPO" recreate
# Destructive cleanup; add --yes for noninteractive confirmation.
bash skills/disco/airweave/sub-skills/local-development/scripts/local-stack.sh \
--repo-root "$AIRWEAVE_REPO" destroy
Equivalent environment toggles are supported for automation: NONINTERACTIVE=1, SKIP_FRONTEND=1, SKIP_CONNECT=1, SKIP_LOCAL_EMBEDDINGS=1, ENABLE_DOCLING=1, VERBOSE=1, and QUIET=1.
Startup decisions
- Fresh checkout with no
.env: the helper copies.env.example, generates missingENCRYPTION_KEY,STATE_SECRET,SVIX_JWT_SECRET,FIRST_SUPERUSER_PASSWORD, andPOSTGRES_PASSWORD, fills safe local defaults such asFIRST_SUPERUSER=admin@example.com,POSTGRES_USER=airweave,SKIP_AZURE_STORAGE=true,STORAGE_BACKEND=filesystem, andSPARSE_EMBEDDER=fastembed_bm25. - Embeddings: OpenAI keys prefer
openai_text_embedding_3_smallwith 1536 dimensions and skip the local embeddings container. Mistral keys prefermistral_embedwith 1024 dimensions. No API key on a freshly seeded env useslocal_minilmwith 384 dimensions and starts the local embeddings container. An existing.envis not overwritten except for missing required values. - Reusing containers: if Airweave containers already run,
startreports status instead of recreating them. If containers exist but are stopped,startbrings them back up and runs health checks. - Optional profiles:
--skip-frontend,--skip-connect,--skip-local-embeddings, and--enable-doclingmap to the compose profiles for frontend, connect widget, local embeddings, and Docling OCR.
Expected local service surface
See references/local-stack.md for the service graph, ports, startup modes, and health commands. The primary expected endpoints are:
- Backend API:
http://localhost:8001, health at/healthand readiness at/health/ready - Frontend UI:
http://localhost:8080unless skipped - Connect widget:
http://localhost:8082unless skipped - Vespa document/query API:
http://localhost:8081, config server on19071 - Temporal gRPC/UI:
7233,8233, andhttp://localhost:8088 - PostgreSQL:
localhost:5432; Redis:localhost:6379; Svix:http://localhost:8071 - Local embeddings: host
9878whenDENSE_EMBEDDER=local_minilm; Docling:5001only when enabled
Verification hooks
For command-level checks before a real stack run:
bash -n skills/disco/airweave/sub-skills/local-development/scripts/local-stack.sh
bash skills/disco/airweave/sub-skills/local-development/scripts/local-stack.sh --help
bash skills/disco/airweave/sub-skills/local-development/scripts/local-stack.sh --repo-root "$AIRWEAVE_REPO" status
For a backend-native smoke after the stack is healthy and a Python 3.13 backend environment with pytest/pytest-asyncio is active:
cd "$AIRWEAVE_REPO/backend"
TEST_ENV=local python -m pytest tests/e2e/smoke/test_storage_backend.py -q
This storage smoke verifies the backend health endpoint, stub-source sync, ARF files, manifests, and entity files. If it fails because stub is unavailable, check whether internal sources are enabled for the local test environment before treating storage as broken.
Troubleshooting entry points
- Docker or Compose missing, daemon down, or port conflicts:
references/troubleshooting.md#docker-compose-and-port-failures - Missing or invalid env values, including
STATE_SECRETandSVIX_JWT_SECRETlength validation:references/troubleshooting.md#environment-and-settings-failures - Vespa init or schema dimension mismatch:
references/troubleshooting.md#vespa-failures - Backend, Temporal worker, Svix, or storage smoke failures:
references/troubleshooting.md#backend-worker-svix-and-storage-failures
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).