Skip to content

Commit b93966f

Browse files
Fabio Marcello Salvadorimadeinplutofabio
authored andcommitted
docs(phase-3.A.3): sync front-door docs to ncp-langgraph v0.1.0 (PR G)
- README.md: add PyPI badge, name ncp-langgraph v0.1.0 in Status, add "Use NCP from LangGraph (Python)" section parallel to MCP. - docs/ADOPTION_GUIDE.md: add "Use NCP graphs in LangGraph workflows" section; update §10 production-readiness lead + next-adoption-work line. - docs/ROADMAP.md: flip §3A.3 Status to Complete with PyPI link. - docs/INSTALL.md: add "Install the LangGraph adapter" section. - docs/LANGGRAPH_ADAPTER.md: update §15 install command to use PyPI. - examples/langgraph/README.md, lead_qualification_agent.py, requirements.txt: drop pre-publish editable-install language. Stale-marker audit (case-insensitive, run before commit) Equivalent search over PR G scope for: 0.1.0.dev0, editable ncp-langgraph installs, pre-publish wording, in-development LangGraph wording, stale Phase 3A.3 "in progress" markers, and old "Next adoption work: LangGraph" phrasing. Scope: README.md docs/ADOPTION_GUIDE.md docs/INSTALL.md docs/ROADMAP.md docs/LANGGRAPH_ADAPTER.md examples -> zero matches (PR G scope; the pre-publish hotfix PR will clean python/ncp-langgraph/README.md before the ceremony, after which the final audit also covers it + CHANGELOG.md). Closes Phase 3A.3 front-door doc sync (per locked plan, mandatory PR G). Tracking #36. Signed-off-by: Fabio Marcello Salvadori <fabiorebe@gmail.com>
1 parent dcbce5d commit b93966f

8 files changed

Lines changed: 148 additions & 35 deletions

File tree

README.md

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
</p>
1616

1717
<p align="center">
18-
<a href="https://github.com/madeinplutofabio/neural-computation-protocol/actions/workflows/validate.yml"><img alt="CI" src="https://github.com/madeinplutofabio/neural-computation-protocol/actions/workflows/validate.yml/badge.svg" /></a>&nbsp;<a href="https://crates.io/crates/ncp-runtime"><img alt="ncp-runtime on crates.io" src="https://img.shields.io/crates/v/ncp-runtime?logo=rust&label=ncp-runtime" /></a>&nbsp;<a href="https://crates.io/crates/ncp-mcp-server"><img alt="ncp-mcp-server on crates.io" src="https://img.shields.io/crates/v/ncp-mcp-server?logo=rust&label=ncp-mcp-server" /></a>&nbsp;<a href="https://docs.rs/ncp-runtime"><img alt="docs.rs" src="https://img.shields.io/docsrs/ncp-runtime" /></a>&nbsp;<a href="https://github.com/madeinplutofabio/neural-computation-protocol/blob/main/rust-toolchain.toml"><img alt="MSRV" src="https://img.shields.io/crates/msrv/ncp-runtime" /></a>&nbsp;<a href="https://opensource.org/licenses/Apache-2.0"><img alt="License" src="https://img.shields.io/badge/License-Apache_2.0-blue.svg" /></a>&nbsp;<a href="https://doi.org/10.5281/zenodo.19570209"><img src="https://zenodo.org/badge/DOI/10.5281/zenodo.19570209.svg?v=1" alt="DOI"></a>&nbsp;<a href="https://github.com/madeinplutofabio/neural-computation-protocol/releases"><img alt="Release" src="https://img.shields.io/github/v/release/madeinplutofabio/neural-computation-protocol?display_name=tag&include_prereleases" /></a>&nbsp;<a href="https://github.com/madeinplutofabio/neural-computation-protocol/stargazers"><img alt="Stars" src="https://img.shields.io/github/stars/madeinplutofabio/neural-computation-protocol?style=social" /></a>
18+
<a href="https://github.com/madeinplutofabio/neural-computation-protocol/actions/workflows/validate.yml"><img alt="CI" src="https://github.com/madeinplutofabio/neural-computation-protocol/actions/workflows/validate.yml/badge.svg" /></a>&nbsp;<a href="https://crates.io/crates/ncp-runtime"><img alt="ncp-runtime on crates.io" src="https://img.shields.io/crates/v/ncp-runtime?logo=rust&label=ncp-runtime" /></a>&nbsp;<a href="https://crates.io/crates/ncp-mcp-server"><img alt="ncp-mcp-server on crates.io" src="https://img.shields.io/crates/v/ncp-mcp-server?logo=rust&label=ncp-mcp-server" /></a>&nbsp;<a href="https://pypi.org/project/ncp-langgraph/"><img alt="ncp-langgraph on PyPI" src="https://img.shields.io/pypi/v/ncp-langgraph?logo=python&label=ncp-langgraph" /></a>&nbsp;<a href="https://docs.rs/ncp-runtime"><img alt="docs.rs" src="https://img.shields.io/docsrs/ncp-runtime" /></a>&nbsp;<a href="https://github.com/madeinplutofabio/neural-computation-protocol/blob/main/rust-toolchain.toml"><img alt="MSRV" src="https://img.shields.io/crates/msrv/ncp-runtime" /></a>&nbsp;<a href="https://opensource.org/licenses/Apache-2.0"><img alt="License" src="https://img.shields.io/badge/License-Apache_2.0-blue.svg" /></a>&nbsp;<a href="https://doi.org/10.5281/zenodo.19570209"><img src="https://zenodo.org/badge/DOI/10.5281/zenodo.19570209.svg?v=1" alt="DOI"></a>&nbsp;<a href="https://github.com/madeinplutofabio/neural-computation-protocol/releases"><img alt="Release" src="https://img.shields.io/github/v/release/madeinplutofabio/neural-computation-protocol?display_name=tag&include_prereleases" /></a>&nbsp;<a href="https://github.com/madeinplutofabio/neural-computation-protocol/stargazers"><img alt="Stars" src="https://img.shields.io/github/stars/madeinplutofabio/neural-computation-protocol?style=social" /></a>
1919
</p>
2020

2121
---
2222

2323
**Docs:** [Adoption guide](https://github.com/madeinplutofabio/neural-computation-protocol/blob/main/docs/ADOPTION_GUIDE.md) · [Benchmarks](https://github.com/madeinplutofabio/neural-computation-protocol/blob/main/BENCHMARK.md) · [Cost model](https://github.com/madeinplutofabio/neural-computation-protocol/blob/main/COST_MODEL.md) · [Roadmap](https://github.com/madeinplutofabio/neural-computation-protocol/blob/main/docs/ROADMAP.md) · [Spec](https://github.com/madeinplutofabio/neural-computation-protocol/blob/main/spec/ncp-v0.2.3.md) · [Contributing](https://github.com/madeinplutofabio/neural-computation-protocol/blob/main/CONTRIBUTING.md) · [Security](https://github.com/madeinplutofabio/neural-computation-protocol/blob/main/SECURITY.md)
2424

25-
**Status:** Protocol v0.2.3 + validator are stable. Reference runtime is available via [GitHub Releases](https://github.com/madeinplutofabio/neural-computation-protocol/releases/latest), [GHCR](https://github.com/madeinplutofabio/neural-computation-protocol/pkgs/container/ncp), and [crates.io](https://crates.io/crates/ncp-runtime) (Phase 3A.1 complete). [`ncp-mcp-server v0.1.0`](https://crates.io/crates/ncp-mcp-server) is live on crates.io (Phase 3A.2 complete). Next adoption work: LangGraph wrapper + SDKs.
25+
**Status:** Protocol v0.2.3 + validator are stable. Reference runtime is available via [GitHub Releases](https://github.com/madeinplutofabio/neural-computation-protocol/releases/latest), [GHCR](https://github.com/madeinplutofabio/neural-computation-protocol/pkgs/container/ncp), and [crates.io](https://crates.io/crates/ncp-runtime) (Phase 3A.1 complete). [`ncp-mcp-server v0.1.0`](https://crates.io/crates/ncp-mcp-server) is live on crates.io (Phase 3A.2 complete). [`ncp-langgraph v0.1.0`](https://pypi.org/project/ncp-langgraph/0.1.0/) is live on PyPI (Phase 3A.3 complete). Next adoption work: brick packs + SDKs.
2626

2727
## What is NCP?
2828

@@ -214,7 +214,56 @@ Each `--graph` becomes one MCP tool. The host sends a `tools/call`; NCP runs the
214214

215215
For ready-to-customize examples, see [examples/mcp/](https://github.com/madeinplutofabio/neural-computation-protocol/tree/main/examples/mcp).
216216

217-
For the in-development LangGraph wrapper (Phase 3A.3), see [`docs/LANGGRAPH_ADAPTER.md`](https://github.com/madeinplutofabio/neural-computation-protocol/blob/main/docs/LANGGRAPH_ADAPTER.md).
217+
---
218+
219+
## Use NCP from LangGraph (Python)
220+
221+
If your agent stack is Python and uses [LangGraph](https://github.com/langchain-ai/langgraph), wrap any NCP graph as a LangGraph node with `ncp-langgraph`. The adapter spawns `ncp-mcp-server` under the hood; you write idiomatic LangGraph `StateGraph` code.
222+
223+
Install both:
224+
225+
```bash
226+
cargo install ncp-mcp-server --version 0.1.0 --locked
227+
python -m pip install ncp-langgraph
228+
```
229+
230+
Minimal LangGraph integration:
231+
232+
```python
233+
from typing import Any, TypedDict
234+
235+
from langgraph.graph import END, START, StateGraph
236+
237+
from ncp_langgraph import NCPNode
238+
239+
240+
class State(TypedDict, total=False):
241+
company_url: str
242+
qualification: dict[str, Any]
243+
ncp_trace: dict[str, Any]
244+
245+
246+
qualify_lead = NCPNode.from_subprocess(
247+
graph="/abs/path/to/lead-qualification.yaml",
248+
brick_dir="/abs/path/to/bricks",
249+
output_key="qualification",
250+
timeout=30.0,
251+
)
252+
253+
builder = StateGraph(State)
254+
builder.add_node("qualify_lead", qualify_lead)
255+
builder.add_edge(START, "qualify_lead")
256+
builder.add_edge("qualify_lead", END)
257+
compiled = builder.compile()
258+
259+
result = compiled.invoke({"company_url": "https://example.com"})
260+
# result["qualification"] -- the NCP graph's output_json
261+
# result["ncp_trace"] -- {"result_type", "trace_id", "trace_path"}
262+
```
263+
264+
`NCPNode.__call__` returns a partial state update; LangGraph merges it according to your `StateGraph`'s schema + reducers. State is not mutated.
265+
266+
For ready-to-run examples, see [examples/langgraph/](https://github.com/madeinplutofabio/neural-computation-protocol/tree/main/examples/langgraph). For the full design contract (locked signature, exception model, v0.1.0 limitations), see [`docs/LANGGRAPH_ADAPTER.md`](https://github.com/madeinplutofabio/neural-computation-protocol/blob/main/docs/LANGGRAPH_ADAPTER.md).
218267

219268
---
220269

docs/ADOPTION_GUIDE.md

Lines changed: 61 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,57 @@ For host config examples and smoke-test recipes, see [`examples/mcp/README.md`](
106106

107107
---
108108

109+
## Use NCP graphs in LangGraph workflows
110+
111+
If your agent stack is Python and uses [LangGraph](https://github.com/langchain-ai/langgraph), the `ncp-langgraph` adapter lets you wrap an NCP graph as a LangGraph node directly. Same NCP graph, no glue code; you write idiomatic LangGraph `StateGraph` code.
112+
113+
Install both:
114+
115+
```bash
116+
cargo install ncp-mcp-server --version 0.1.0 --locked
117+
python -m pip install ncp-langgraph
118+
```
119+
120+
Minimal integration:
121+
122+
```python
123+
from typing import Any, TypedDict
124+
125+
from langgraph.graph import END, START, StateGraph
126+
127+
from ncp_langgraph import NCPNode
128+
129+
130+
class State(TypedDict, total=False):
131+
company_url: str
132+
qualification: dict[str, Any]
133+
ncp_trace: dict[str, Any]
134+
135+
136+
qualify_lead = NCPNode.from_subprocess(
137+
graph="/abs/path/to/graph.yaml",
138+
brick_dir="/abs/path/to/bricks",
139+
output_key="qualification",
140+
timeout=30.0,
141+
)
142+
143+
builder = StateGraph(State)
144+
builder.add_node("qualify_lead", qualify_lead)
145+
builder.add_edge(START, "qualify_lead")
146+
builder.add_edge("qualify_lead", END)
147+
compiled = builder.compile()
148+
149+
result = compiled.invoke({"company_url": "https://example.com"})
150+
```
151+
152+
`NCPNode.__call__` returns a partial state update; LangGraph merges it according to your `StateGraph`'s schema + reducers. State is not mutated.
153+
154+
Use this when an agent repeats a workflow often enough that it should not re-plan the same steps in the LLM conversation every time. Good fits include lead qualification, support-ticket routing, document triage, content research pipelines, code-change risk review, and data normalization before an agent acts. (Same use-case family as the MCP integration above; pick whichever surface your stack already has.)
155+
156+
For ready-to-run examples, see [`examples/langgraph/README.md`](../examples/langgraph/README.md). For the binding design contract, see [`docs/LANGGRAPH_ADAPTER.md`](LANGGRAPH_ADAPTER.md).
157+
158+
---
159+
109160
## 3) Understand the moving parts (2 minutes)
110161

111162
- **Brick**: a sandboxed WASM module that implements the NCP ABI (`alloc/free/invoke`).
@@ -266,13 +317,15 @@ It **does** replace or harden:
266317

267318
## 10) Production readiness (current scope and what’s next)
268319

269-
The reference runtimes distribution channels are live as of Phase 3A.1 available
320+
The reference runtime's distribution channels are live as of Phase 3A.1, available
270321
through [GitHub Releases](https://github.com/madeinplutofabio/neural-computation-protocol/releases/latest),
271322
[GHCR](https://github.com/madeinplutofabio/neural-computation-protocol/pkgs/container/ncp),
272323
and [crates.io](https://crates.io/crates/ncp-runtime). The MCP adapter is live as
273-
of Phase 3A.2 — install with `cargo install ncp-mcp-server --locked` (see
274-
[crates.io](https://crates.io/crates/ncp-mcp-server)). Together they’re a
275-
strong base for evaluation and internal pilots:
324+
of Phase 3A.2, install with `cargo install ncp-mcp-server --version 0.1.0 --locked`
325+
(see [crates.io](https://crates.io/crates/ncp-mcp-server)). The LangGraph adapter
326+
is live as of Phase 3A.3, install with `python -m pip install ncp-langgraph` (see
327+
[PyPI](https://pypi.org/project/ncp-langgraph/0.1.0/)). Together they're a strong
328+
base for evaluation and internal pilots:
276329
- deterministic routing + mapping
277330
- sandboxed WASM invokes
278331
- trace output and safety budgets
@@ -284,9 +337,10 @@ But **production hardening** typically needs:
284337
- real LLM adapters + token accounting
285338
- threat model + security review checklist
286339

287-
Next adoption work focuses on the LangGraph wrapper, brick packs, and
288-
SDKs (Phase 3A.3–3A.5; the MCP adapter shipped as Phase 3A.2). Deeper
289-
hardening lands in Phase 3C, and the production wrapper in Phase 4. See
340+
Next adoption work focuses on brick packs and SDKs (Phase 3A.4–3A.5; the
341+
MCP adapter shipped as Phase 3A.2 and the LangGraph adapter as Phase
342+
3A.3). Deeper hardening lands in Phase 3C, and the production wrapper in
343+
Phase 4. See
290344
[`docs/ROADMAP.md`](https://github.com/madeinplutofabio/neural-computation-protocol/blob/main/docs/ROADMAP.md)
291345
for the full track breakdown.
292346

docs/INSTALL.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,34 @@ For host configuration and smoke-test examples, see
164164

165165
---
166166

167+
## Install the LangGraph adapter
168+
169+
`ncp-langgraph` is a separate published Python package that lets you
170+
wrap any NCP graph as a LangGraph node. It spawns `ncp-mcp-server`
171+
under the hood, so install both:
172+
173+
```bash
174+
# 1. The NCP MCP adapter binary (Rust crate)
175+
cargo install ncp-mcp-server --version 0.1.0 --locked
176+
177+
# 2. The Python adapter (this package)
178+
python -m pip install ncp-langgraph
179+
180+
# Or pin to a specific version for reproducibility
181+
python -m pip install ncp-langgraph==0.1.0
182+
```
183+
184+
`ncp-langgraph` does NOT bundle the `ncp-mcp-server` binary; the
185+
binary is distributed separately as a Rust crate. Keep it on `PATH`
186+
or pass its absolute path via `NCPNode.from_subprocess(binary=...)`.
187+
188+
For end-to-end examples (LangGraph `StateGraph` with one `NCPNode`),
189+
see [`examples/langgraph/README.md`](../examples/langgraph/README.md).
190+
For the binding design contract, see
191+
[`docs/LANGGRAPH_ADAPTER.md`](LANGGRAPH_ADAPTER.md).
192+
193+
---
194+
167195
## Next steps
168196

169197
- **Adopting NCP in your stack:** [`docs/ADOPTION_GUIDE.md`](ADOPTION_GUIDE.md)

docs/LANGGRAPH_ADAPTER.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ Run end-to-end from a workspace clone:
625625

626626
```bash
627627
cargo install ncp-mcp-server --version 0.1.0 --locked
628-
python -m pip install -e python/ncp-langgraph
628+
python -m pip install ncp-langgraph
629629
python -m pip install -r examples/langgraph/requirements.txt
630630
python examples/langgraph/lead_qualification_agent.py
631631
```

docs/ROADMAP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ This section reflects the latest released state. Keep it honest and specific; up
187187

188188
### 3A.3 LangGraph wrapper (Python)
189189

190-
**Status:** In progress (Phase 3A.3). Design locked in [`docs/LANGGRAPH_ADAPTER.md`](LANGGRAPH_ADAPTER.md); implementation in flight.
190+
**Status:** ✅ Complete (shipped 2026-05-29, [`ncp-langgraph v0.1.0`](https://pypi.org/project/ncp-langgraph/0.1.0/) on PyPI). Design locked in [`docs/LANGGRAPH_ADAPTER.md`](LANGGRAPH_ADAPTER.md); publish ceremony documented in [`docs/PUBLISHING.md`](PUBLISHING.md) "Python adapter publish (`ncp-langgraph`)".
191191

192192
**Deliverables**
193193
- Python package that exposes an `NCPNode` usable inside LangGraph

examples/langgraph/README.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
This directory shows how to drop an [NCP] graph into a
99
[LangGraph] workflow using
10-
[`ncp-langgraph`](https://github.com/madeinplutofabio/neural-computation-protocol/tree/main/python/ncp-langgraph),
10+
[`ncp-langgraph`](https://pypi.org/project/ncp-langgraph/),
1111
the Python adapter that wraps `ncp-mcp-server` as a LangGraph node.
1212

1313
**One NCP graph = one LangGraph node.**
@@ -63,15 +63,6 @@ spawns as a subprocess.
6363

6464
### 2. Install the Python adapter
6565

66-
Until `ncp-langgraph` v0.1.0 is published to PyPI in Phase 3A.3 PR F,
67-
install editable from a workspace clone:
68-
69-
```bash
70-
python -m pip install -e python/ncp-langgraph
71-
```
72-
73-
After publish, the same package will be installable from PyPI directly:
74-
7566
```bash
7667
python -m pip install ncp-langgraph
7768
```

examples/langgraph/lead_qualification_agent.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@
3636
echo-pipeline graph + bricks via relative paths from this file.
3737
- ``cargo install ncp-mcp-server --version 0.1.0 --locked`` (or build
3838
from source).
39-
- ``pip install -e python/ncp-langgraph`` (or
40-
``pip install ncp-langgraph`` once published to PyPI in PR F).
39+
- ``python -m pip install ncp-langgraph``.
4140
- See ``examples/langgraph/requirements.txt`` for the Python deps.
4241
"""
4342

examples/langgraph/requirements.txt

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,12 @@
33
#
44
# Python dependencies for examples/langgraph/lead_qualification_agent.py.
55
#
6-
# Note: ncp-langgraph is intentionally NOT listed here. It must be
7-
# installed separately because Phase 3A.3 PR E lands before PyPI
8-
# publish (PR F), and the editable workspace install is `0.1.0.dev0`
9-
# which would not satisfy a `>=0.1.0` pin. Install it explicitly:
6+
# Note: ncp-langgraph is intentionally NOT listed here because the
7+
# README installs it explicitly in a separate step:
108
#
11-
# # Pre-publish (from workspace clone):
12-
# python -m pip install -e python/ncp-langgraph
13-
#
14-
# # Post-publish:
159
# python -m pip install ncp-langgraph
1610
#
1711
# Also note: `cargo install ncp-mcp-server --version 0.1.0 --locked`
18-
# is a separate prerequisite (the Rust binary that ncp-langgraph
19-
# spawns); it is not a pip dependency. The version is pinned so the
20-
# example stays reproducible against ncp-langgraph v0.1.x.
12+
# is a separate prerequisite.
2113

2214
langgraph>=1.0.0,<2.0.0

0 commit comments

Comments
 (0)