langgraph-multi-agent-engineering
/langgraph-multi-agent-engineering
Buduje silnik agentów w LangGraph: typowany stan, routing do specjalistów, równoległe rozgałęzienia, checkpointy w Postgresie i limity pętli.
- Autor
- arcange-dev ↗
- Repozytorium
- veritas-bot ↗
- Licencja
- Apache-2.0
- Ostatnia zmiana repozytorium
- 12.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 12.11.2026, bez odwołań do wycofanych modeli i API.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
Co robi i kiedy
Buduje silnik agentów w LangGraph: typowany stan, routing do specjalistów, równoległe rozgałęzienia, checkpointy w Postgresie i limity pętli.
Oryginalny opis (EN)
Building the user-facing agent engine with LangGraph - typed graph state, supervisor routing to specialist agents, parallel fan-out with reducers, Postgres checkpointing, retries and resumability, human-in-the-loop approvals, and hard limits against runaway loops. Use when adding an agent, a node, an edge, or a run lifecycle behaviour.
Jak działa
- When to use
- Graph state (single source of truth)
- Topology
- Checkpointing and resume
- Loop and cost guards
- Retries
- Human in the loop
- Testing agents without burning tokens
- Checklist
Podgląd SKILL.md
---
name: langgraph-multi-agent-engineering
description: Building the user-facing agent engine with LangGraph - typed graph state, supervisor routing to specialist agents, parallel fan-out with reducers, Postgres checkpointing, retries and resumability, human-in-the-loop approvals, and hard limits against runaway loops. Use when adding an agent, a node, an edge, or a run lifecycle behaviour.
---
# LangGraph Multi-Agent Engineering
## When to use
Any change to `apps/api/orchestration/graphs/**`, agent prompts, routing, or run state.
## Graph state (single source of truth)
```python
# orchestration/state.py
from typing import Annotated, Literal, TypedDict
from operator import add
def merge_plan(left: list[Task], right: list[Task]) -> list[Task]:
by_id = {t.id: t for t in left}
by_id.update({t.id: t for t in right})
return list(by_id.values())
class RunState(TypedDict, total=False):
run_id: str
organization_id: str
objective: str
repository_summary: str
plan: Annotated[list[Task], merge_plan]
active_task_id: str | None
messages: Annotated[list[Message], add]
artifacts: dict[str, str]
approvals: Annotated[list[Approval], add]
findings: Annotated[list[Finding], add]
budget: Budget # tokens, usd_remaining, wall_clock_remaining
iteration: int
needs_human: bool
next: str
```
Rules: state is JSON-serialisable (no ORM objects, no bytes); every list written by more
than one node has a reducer; anything large (file contents, diffs) lives in a blob store
and state carries a reference.
## Topology
```
┌──────────────┐
objective→│ orchestrator │──plan──┐
└──────┬───────┘ │
│ route ▼
┌──────────┼──────────┬─────────────┐
▼ ▼ ▼ ▼
analyst architect engineer(s) qa (parallel where independent)
└──────────┴──────────┴─────────────┘
▼
reviewer ──► orchestrator (re-plan / finish)
│
▼ (destructive or gated action)
approval ── interrupt ──► resume
```
- `orchestrator` owns the plan and the routing decision. It does not edit files.
- Specialists: `analyst`, `architect`, `frontend`, `backend`, `database`, `integration`,
`qa`, `security`, `devops`. Each has one system prompt, one tool subset, one definition
of done.
- Parallelism only for tasks whose `depends_on` are all `done` and whose `write_scope`
sets are disjoint. Two agents may not hold the same file scope concurrently.
## Checkpointing and resume
Use `PostgresSaver` keyed by `thread_id = run_id`. Every node boundary commits state, so a
worker crash resumes at the last completed node. `interrupt()` is used only for approval
gates; on resume, re-validate that the approved action still matches the pending one
(hash the action payload into the approval row).
## Loop and cost guards
- `recursion_limit` set from config, default 60.
- `iteration` increments per orchestrator pass; over `max_iterations` (default 12) the run
ends `needs_review` with a plan diff, not a silent stop.
- Budget is decremented by real usage records, not estimates. On exhaustion, checkpoint and
emit `budget_exhausted`.
## Retries
Retry only transient failures (network, 429, 5xx, sandbox timeout). Never retry a
non-idempotent tool (PR creation, push) without an existence check first. Max 3 attempts
with jitter, then mark the step `failed` with a structured error and let the orchestrator
decide whether to re-plan.
## Human in the loop
Approval request rows carry: action type, a human-readable summary, the exact payload, a
payload hash, an expiry, and the requesting step. Approving sets `approved_by`,
`approved_at`; the graph resumes with the approval id and recomputes the hash before
executing. Any mismatch fails the resume.
## Testing agents without burning tokens
Fake the model with a scripted responder that returns canned tool calls, and assert on
graph transitions and state diffs. Have at least one opt-in integration test against a real
provider, gated by an env var, that runs a single cheap task.
## Checklist
- [ ] New node returns a partial state dict, never mutates input.
- [ ] New list field has a reducer.
- [ ] Failure path handled: raise a typed error and let the router decide.
- [ ] Step/tool rows written for observability.
- [ ] Graph test asserts the happy path and one failure path.
Wersje
W bazie nie ma innych skilli o nazwie langgraph-multi-agent-engineering.
Migawka bazy z 13.11.2026 · wersja paczki f039c33de5ff (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100langgraph
Podpowiada wzorce pracy LangGraph 1.x: stan, równoległość, supervisor, wywołania narzędzi, checkpointy i strumieniowanie. - 100langgraph
Dostarcza wzorce przepływów pracy LangGraph 1.x w Pythonie: stan, odporność na błędy, routing, wykonanie równoległe, supervisor i worker, checkpointing, udział człowieka, streaming, podgrafy i functional API. - 100langgraph-workflows
Buduje przepływy agentów jako maszyny stanów w LangGraph 1.0: węzły, krawędzie warunkowe i wzorzec ReAct. - 98langgraph-rag
Buduje maszyny stanów LangGraph dla RAG i przepływów agentowych: typowany stan, warunkowe krawędzie, checkpointing, przerwania human-in-the-loop, nadzorca wielu agentów oraz Self-RAG i CRAG. - 100langgraph
Buduje wieloetapowe przepływy agentów w LangGraph: stan, węzły, routing warunkowy, punkty kontrolne i pętlę z człowiekiem. - 100building-langgraph-agents
Wspiera rozwój w LangGraph dla stanowych aplikacji wieloagentowych: przepływy cykliczne, routing warunkowy, wzorce human-in-the-loop i trwałe zarządzanie stanem w złożonej orkiestracji AI.