Repo: github.com/CascadiaTech/agentic-workflows
Training platform for Kubernetes + guardrails + Temporal + LangGraph — building toward event-driven code agents on GitHub that open PRs under policy gates.
North star: A GitHub event starts a durable Temporal mission → a delegator decomposes a DAG of scoped tasks → parallel LangGraph subagents edit the repo → results fan in to a consolidated report → (future) open a PR checked by Lunar/Conftest.
Working today:
| Capability | Description |
|---|---|
| Single agent | AgentRunWorkflow — plan → RAG retrieve → propose/apply edits with guardrails |
| Multi-agent missions (F2) | MissionWorkflow — scope JSON in, DAG execution, Postgres board, parallel child workflows |
| Shared memory | sqlite-vec or pgvector — mission-scoped RAG + observations after each task |
| Agent dashboard | Local web UI — mission board, live step timeline, start missions (not a Temporal UI replacement) |
| Repair sweep | Scan failed runs, restart transient failures |
| K8s worker | Temporal worker in cluster (local Mac worker for iteration) |
Next: F3 role graphs (doc-agent, review-agent), then git clone + PR flow (D2).
Deep dive: docs/multi-agent.md · docs/agent-roadmap.md
| Layer | Purpose | Location |
|---|---|---|
| Kubernetes (kind) | Run infra + workers | deploy/ |
| Temporal | Durable orchestration — missions, retries, audit, repair | temporal/workflows/ |
| LangGraph | Agent loop inside Temporal activities | temporal/graph/, temporal/nodes/ |
| Guardrails | Conftest (infra) + Python content checks (agent output) | policies/, guardrails-alternatives.md |
Rule: Temporal orchestrates. LangGraph reasons. Guardrails gate what gets written and deployed.
Docs: docs/README.md · Local dev · Agent skills
A — Temporal server:
temporal server start-dev --db-filename /tmp/temporal-training.dbTemporal UI: http://localhost:8233 (workflow history — use the dashboard below for agent-level visibility)
B — Postgres port-forward (missions require Postgres):
kubectl port-forward svc/postgres -n lunar 5432:5432C — worker (env vars must be here, not in D):
export DATABASE_URL=postgresql://lunar:PASSWORD@localhost:5432/lunar
export OPENAI_API_KEY=$(kubectl get secret openai-api-key -n lunar \
-o jsonpath='{.data.OPENAI_API_KEY}' | base64 -d)
cd temporal && uv sync --extra local && uv run worker.pyScale K8s temporal-worker to 0 replicas while developing locally.
D — agent dashboard:
export DATABASE_URL=postgresql://lunar:PASSWORD@localhost:5432/lunar
./scripts/visibility/start-dashboard.shStatic UI + small Python API (scripts/visibility/) — complements Temporal UI with agent-level progress.
| Panel | Shows |
|---|---|
| Missions | Postgres mission board — status, goals, click to drill in |
| Mission detail | Task cards, DAG blocked_by, per-task step pipeline |
| Step timeline | Live feed of Plan → Retrieve → Refine → … → Memory (expandable rows) |
| Workflow events | Mission/task completions, synthesis, failures |
| Start form | Paste scope JSON or plain goal → starts MissionWorkflow |
Progress is written to local/agent-runs/progress.jsonl as each LangGraph node runs. Poll interval: 1.5s.
CLI alternatives:
./scripts/temporal/start-mission.sh --wait --scope-file docs/examples/mission-scope.json
./scripts/temporal/show-mission.sh mission-<id>Example scope: docs/examples/mission-scope.json
Scope JSON → MissionWorkflow
→ decompose_mission (LLM DAG)
→ Postgres board (agent_missions / agent_mission_tasks)
→ wave scheduler (blocked_by deps)
→ parallel AgentRunWorkflow children (path-scoped)
→ task_outputs + mission RAG fan-in
→ consolidate_mission (LLM report)
Each child runs the repo-agent graph:
draft_plan → retrieve_context → refine_plan → prepare_edits → propose_edits
→ apply_edits → write_observation
- Memory: sqlite-vec + Ollama (default) or pgvector — memory/README.md
- Guardrails: path allowlist + forbidden/required strings — temporal/tests/
- Doc goals: skip execute step; mission tasks get scoped
allowed_paths
Seed memory (optional if baseline present):
ollama pull nomic-embed-text
./scripts/seed-memory.sh./scripts/temporal/start-agent.sh --wait \
"Rewrite docs/local-dev.md with the three-terminal Python/uv Temporal quick start" \
agent-$(date +%s)Run summary: local/agent-runs/latest.json · agent-run-logs.md
./scripts/ci-check.sh # Conftest + Temporal import smoke + pytestGitHub Actions runs the same on push/PR to main.
Build from repo root (includes memory/, docs/, REPO_ROOT=/app):
./scripts/build-worker-image.sh
./scripts/deploy-temporal-worker.shWorker env: REPO_ROOT=/app, OLLAMA_HOST=http://host.docker.internal:11434, OpenAI secret.
Verify durability (no LLM required):
temporal workflow start --task-queue training-queue \
--type DurabilityDemoWorkflow --workflow-id k8s-worker-test./scripts/temporal/repair-sweep.sh 5
cat local/agent-runs/repair-log.jsonl| Variable | Purpose |
|---|---|
DATABASE_URL |
Required for missions + dashboard mission board |
OPENAI_API_KEY |
Worker terminal only — LLM in activities |
MEMORY_BACKEND |
sqlite (default) or postgres for concurrent multi-agent |
MAX_PARALLEL_AGENTS |
Mission child concurrency cap (default 3) |
AGENT_PONYTAIL / AGENT_CAVEMAN |
Prompt shaping — agent-skills.md |
REPO_ROOT |
Override repo root (set to /app in container) |
DASHBOARD_PORT |
Dashboard listen port (default 8765) |
deploy/ Kubernetes manifests (postgres, minio, temporal worker)
docs/ Roadmap, multi-agent design, examples/mission-scope.json
memory/ RAG seed chunks + Ollama baseline sqlite
policies/ Conftest Rego + Lunar policy stubs
scripts/
temporal/ start-agent, start-mission, show-mission, repair-sweep
visibility/ Agent dashboard (index.html + server.py)
temporal/ Worker, workflows, LangGraph graph, memory module, tests
local/ gitignored run logs (agent-runs/, progress.jsonl)