langgraph-macp 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,39 @@
1
+ """LangGraph integration for MACP: add a binding multi-agent decision to a graph."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from importlib.metadata import version as _version
6
+
7
+ from .llm import DEFAULT_SYSTEM_PROMPT, UNPARSEABLE, llm_evaluator, parse_evaluation
8
+ from .node import (
9
+ AUTHORITY_SCOPE,
10
+ DECISION_PROPOSAL_ID,
11
+ DEFAULT_ACTION,
12
+ DEFAULT_TTL_MS,
13
+ QUORUM_REQUEST_ID,
14
+ ConsensusParticipant,
15
+ ConsensusResult,
16
+ MacpConsensusNode,
17
+ consensus_receipt,
18
+ normalize_recommendation,
19
+ )
20
+
21
+ __version__ = _version("langgraph-macp")
22
+
23
+ __all__ = [
24
+ "AUTHORITY_SCOPE",
25
+ "DECISION_PROPOSAL_ID",
26
+ "DEFAULT_ACTION",
27
+ "DEFAULT_SYSTEM_PROMPT",
28
+ "DEFAULT_TTL_MS",
29
+ "QUORUM_REQUEST_ID",
30
+ "UNPARSEABLE",
31
+ "ConsensusParticipant",
32
+ "ConsensusResult",
33
+ "MacpConsensusNode",
34
+ "__version__",
35
+ "consensus_receipt",
36
+ "llm_evaluator",
37
+ "normalize_recommendation",
38
+ "parse_evaluation",
39
+ ]
langgraph_macp/llm.py ADDED
@@ -0,0 +1,89 @@
1
+ """``llm_evaluator``: a LangChain chat model as an MACP ``EvaluationStrategy``."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import json
6
+ import math
7
+ import re
8
+ from typing import Any
9
+
10
+ from langchain_core.language_models import BaseChatModel
11
+ from langchain_core.messages import HumanMessage, SystemMessage
12
+ from macp_sdk.agent import EvaluationResult, SessionInfo
13
+
14
+ from .node import normalize_recommendation
15
+
16
+ DEFAULT_SYSTEM_PROMPT = (
17
+ "You are one participant in a binding multi-agent decision. Evaluate the proposal "
18
+ "you are given. Answer with a single JSON object and nothing else: "
19
+ '{"recommendation": "APPROVE" | "REJECT" | "REVIEW" | "BLOCK", '
20
+ '"confidence": <number from 0 to 1>, "reason": "<one sentence>"}.'
21
+ )
22
+ UNPARSEABLE = "unparseable model output"
23
+
24
+ _FENCE = re.compile(r"^```[a-zA-Z0-9_-]*\s*\n?(.*?)\n?```$", re.DOTALL)
25
+
26
+
27
+ def parse_evaluation(text: str) -> EvaluationResult:
28
+ """Parse a model's JSON answer. Any defect gives ``REVIEW`` with confidence 0."""
29
+ body = text.strip()
30
+ fenced = _FENCE.match(body)
31
+ if fenced:
32
+ body = fenced.group(1).strip()
33
+ try:
34
+ data = json.loads(body)
35
+ if not isinstance(data, dict):
36
+ raise ValueError("not an object")
37
+ recommendation = normalize_recommendation(data.get("recommendation"))
38
+ confidence = data.get("confidence")
39
+ if (
40
+ isinstance(confidence, bool)
41
+ or not isinstance(confidence, int | float)
42
+ or not math.isfinite(confidence)
43
+ or not 0 <= confidence <= 1
44
+ ):
45
+ raise ValueError("confidence out of range")
46
+ reason = data.get("reason", "")
47
+ return EvaluationResult(
48
+ recommendation=recommendation,
49
+ confidence=float(confidence),
50
+ reason=reason if isinstance(reason, str) else json.dumps(reason),
51
+ )
52
+ except ValueError:
53
+ return EvaluationResult(recommendation="REVIEW", confidence=0.0, reason=UNPARSEABLE)
54
+
55
+
56
+ class _LlmEvaluator:
57
+ __slots__ = ("_model", "_system_prompt")
58
+
59
+ def __init__(self, model: BaseChatModel, system_prompt: str) -> None:
60
+ self._model = model
61
+ self._system_prompt = system_prompt
62
+
63
+ def evaluate(self, proposal: dict[str, Any], context: SessionInfo) -> EvaluationResult:
64
+ question = {
65
+ "session_id": context.session_id,
66
+ "mode": proposal["mode"],
67
+ "option": proposal["option"],
68
+ "rationale": proposal["rationale"],
69
+ "details": proposal["details"],
70
+ }
71
+ answer = self._model.invoke(
72
+ [
73
+ SystemMessage(content=self._system_prompt),
74
+ HumanMessage(content=json.dumps(question, default=str)),
75
+ ]
76
+ )
77
+ return parse_evaluation(answer.text)
78
+
79
+
80
+ def llm_evaluator(model: BaseChatModel, *, system_prompt: str | None = None) -> _LlmEvaluator:
81
+ """Wrap a LangChain chat model as an ``EvaluationStrategy``.
82
+
83
+ The model is asked for ``{recommendation, confidence, reason}`` as JSON.
84
+ A Markdown code fence around the answer is fine. ``ABSTAIN`` becomes
85
+ ``REVIEW``. An answer that cannot be read becomes ``REVIEW`` with
86
+ confidence 0 (reason ``"unparseable model output"``), so a bad answer
87
+ never sinks the session.
88
+ """
89
+ return _LlmEvaluator(model, system_prompt or DEFAULT_SYSTEM_PROMPT)
langgraph_macp/node.py ADDED
@@ -0,0 +1,434 @@
1
+ """``MacpConsensusNode``: a LangGraph node that settles a binding MACP decision.
2
+
3
+ The node's client is the session's initiator: it opens the session, puts the
4
+ proposal, and commits. It never votes. Each participant evaluates through an
5
+ SDK ``EvaluationStrategy`` and casts its ballot under its own auth:
6
+
7
+ - **Decision** (``macp.mode.decision.v1``): the runtime only accepts a
8
+ ``Proposal`` from a declared participant, so the initiator is listed first.
9
+ It sends ``Proposal`` ``p1``. Every participant sends an ``Evaluation``,
10
+ then they vote in list order.
11
+ - **Quorum** (``macp.mode.quorum.v1``): the initiator is not a participant.
12
+ It sends ``ApprovalRequest`` ``r1``, and each participant answers with
13
+ ``Approve`` / ``Reject`` / ``Abstain``.
14
+
15
+ The outcome is approved once ``threshold`` participants approve. It is
16
+ rejected as soon as the approvals plus the participants yet to vote fall
17
+ short of the threshold. The initiator commits that outcome at once, and the
18
+ remaining participants never vote. The Commitment, its hash and the tally
19
+ are written to graph state under ``output_key``.
20
+ """
21
+
22
+ from __future__ import annotations
23
+
24
+ import asyncio
25
+ import contextlib
26
+ import json
27
+ from collections.abc import Callable, Mapping, Sequence
28
+ from dataclasses import dataclass
29
+ from datetime import UTC, datetime
30
+ from typing import Any, Literal, TypedDict
31
+
32
+ from langchain_core.runnables import RunnableLambda
33
+ from macp_sdk import (
34
+ DEFAULT_POLICY_VERSION,
35
+ MODE_DECISION,
36
+ MODE_QUORUM,
37
+ AuthConfig,
38
+ DecisionReceipt,
39
+ DecisionSession,
40
+ MacpClient,
41
+ QuorumSession,
42
+ ReceiptSigner,
43
+ build_receipt,
44
+ commitment_from_projection,
45
+ commitment_hash,
46
+ )
47
+ from macp_sdk.agent import EvaluationResult, EvaluationStrategy, SessionInfo, VotingStrategy
48
+ from macp_sdk.commitment_hash import canonical_projection
49
+ from macp_sdk.validation import validate_confidence, validate_vote
50
+
51
+ Mode = Literal["decision", "quorum"]
52
+ Outcome = Literal["approve", "reject"]
53
+
54
+ DECISION_PROPOSAL_ID = "p1"
55
+ QUORUM_REQUEST_ID = "r1"
56
+ DEFAULT_ACTION = "macp.consensus"
57
+ AUTHORITY_SCOPE = "macp.consensus"
58
+ DEFAULT_TTL_MS = 60_000
59
+
60
+ _MODES: Mapping[str, str] = {"decision": MODE_DECISION, "quorum": MODE_QUORUM}
61
+
62
+ #: A wire-valid Decision ``Evaluation`` recommendation, as the runtime accepts it.
63
+ _RECOMMENDATIONS = frozenset({"APPROVE", "REVIEW", "BLOCK", "REJECT"})
64
+ #: Recommendation → Decision vote. Quorum uses the same map, title-cased.
65
+ _BALLOTS: Mapping[str, str] = {
66
+ "APPROVE": "APPROVE",
67
+ "REVIEW": "ABSTAIN",
68
+ "REJECT": "REJECT",
69
+ "BLOCK": "REJECT",
70
+ }
71
+
72
+ EvaluatorFn = Callable[[dict[str, Any], SessionInfo], "EvaluationResult | Mapping[str, Any]"]
73
+ Evaluator = EvaluationStrategy | EvaluatorFn
74
+
75
+
76
+ @dataclass(frozen=True)
77
+ class ConsensusParticipant:
78
+ """One voter: its agent id, how it evaluates, and how it authenticates.
79
+
80
+ ``auth`` defaults to dev-agent auth for ``id``; pass a bearer
81
+ ``AuthConfig`` in production. ``voter`` (Decision only) overrides the
82
+ default vote, which maps the participant's own recommendation.
83
+ """
84
+
85
+ id: str
86
+ evaluator: Evaluator
87
+ auth: AuthConfig | None = None
88
+ voter: VotingStrategy | None = None
89
+
90
+
91
+ class ConsensusResult(TypedDict):
92
+ """What the node writes under ``output_key``.
93
+
94
+ ``commitment`` is the RFC-MACP-0013 §3 projection of the committed
95
+ ``CommitmentPayload`` (a plain dict, so checkpointers can store it).
96
+ """
97
+
98
+ outcome: Outcome
99
+ session_id: str
100
+ commitment_hash: str
101
+ mode: str
102
+ commitment: dict[str, Any]
103
+ approvals: int
104
+ threshold: int
105
+
106
+
107
+ def normalize_recommendation(value: object) -> str:
108
+ """Uppercase ``value`` and check it is APPROVE / REVIEW / BLOCK / REJECT.
109
+
110
+ ``ABSTAIN`` becomes ``REVIEW``, so every result is a wire-valid Decision
111
+ ``Evaluation``. Anything else raises ``ValueError``.
112
+ """
113
+ if not isinstance(value, str):
114
+ raise ValueError(f"recommendation must be a string, got {type(value).__name__}")
115
+ normalized = value.strip().upper()
116
+ if normalized == "ABSTAIN":
117
+ return "REVIEW"
118
+ if normalized not in _RECOMMENDATIONS:
119
+ raise ValueError(
120
+ f"invalid recommendation {value!r}: must be one of APPROVE, REVIEW, BLOCK, REJECT"
121
+ )
122
+ return normalized
123
+
124
+
125
+ def _as_result(value: EvaluationResult | Mapping[str, Any]) -> EvaluationResult:
126
+ if isinstance(value, Mapping):
127
+ value = EvaluationResult(
128
+ recommendation=value.get("recommendation"), # type: ignore[arg-type]
129
+ confidence=value.get("confidence"), # type: ignore[arg-type]
130
+ reason=str(value.get("reason", "")),
131
+ )
132
+ if not isinstance(value, EvaluationResult):
133
+ raise TypeError(
134
+ f"evaluator returned {type(value).__name__}; expected EvaluationResult or a mapping"
135
+ )
136
+ confidence = value.confidence
137
+ if isinstance(confidence, bool) or not isinstance(confidence, int | float):
138
+ raise ValueError(f"confidence must be a number, got {confidence!r}")
139
+ validate_confidence(float(confidence))
140
+ return EvaluationResult(
141
+ recommendation=normalize_recommendation(value.recommendation),
142
+ confidence=float(confidence),
143
+ reason=str(value.reason),
144
+ )
145
+
146
+
147
+ def _evaluate(
148
+ evaluator: Evaluator, proposal: dict[str, Any], info: SessionInfo
149
+ ) -> EvaluationResult:
150
+ evaluate = getattr(evaluator, "evaluate", None)
151
+ raw = evaluate(proposal, info) if callable(evaluate) else evaluator(proposal, info) # type: ignore[operator]
152
+ return _as_result(raw)
153
+
154
+
155
+ def _default_proposal(state: Mapping[str, Any]) -> Mapping[str, Any] | str:
156
+ if "proposal" not in state:
157
+ raise KeyError("MacpConsensusNode: state has no 'proposal' (or pass proposal=)")
158
+ return state["proposal"] # type: ignore[no-any-return]
159
+
160
+
161
+ def _read_proposal(value: Mapping[str, Any] | str) -> tuple[str, str, Any]:
162
+ option: object
163
+ rationale: object
164
+ if isinstance(value, str):
165
+ option, rationale, details = value, "", None
166
+ elif isinstance(value, Mapping):
167
+ option = value.get("option")
168
+ rationale = value.get("rationale") or ""
169
+ details = value.get("details")
170
+ else:
171
+ raise TypeError(f"proposal must be a string or a mapping, got {type(value).__name__}")
172
+ if not isinstance(option, str) or not option:
173
+ raise ValueError("proposal option must be a non-empty string")
174
+ if not isinstance(rationale, str):
175
+ raise ValueError("proposal rationale must be a string")
176
+ return option, rationale, details
177
+
178
+
179
+ def _initiator_of(client: MacpClient, initiator: str | None) -> str:
180
+ agent = initiator or (client.auth.sender_hint if client.auth else None)
181
+ if not agent:
182
+ raise ValueError(
183
+ "MacpConsensusNode: cannot tell the initiator's agent id from the client's auth; "
184
+ "pass initiator="
185
+ )
186
+ return agent
187
+
188
+
189
+ class _Tally:
190
+ def __init__(self, voters: int, threshold: int) -> None:
191
+ self.voters = voters
192
+ self.threshold = threshold
193
+ self.cast = 0
194
+ self.approvals = 0
195
+
196
+ def add(self, approved: bool) -> None:
197
+ self.cast += 1
198
+ self.approvals += approved
199
+
200
+ def outcome(self) -> Outcome | None:
201
+ if self.approvals >= self.threshold:
202
+ return "approve"
203
+ if self.approvals + (self.voters - self.cast) < self.threshold:
204
+ return "reject"
205
+ return None
206
+
207
+
208
+ class MacpConsensusNode(RunnableLambda[Any, dict[str, ConsensusResult]]):
209
+ """A LangGraph node that settles one MACP Decision or Quorum session.
210
+
211
+ Add it like any node: ``graph.add_node("consensus", MacpConsensusNode(...))``.
212
+ It works under both ``invoke`` and ``ainvoke``. The async path runs the
213
+ blocking gRPC calls in a worker thread.
214
+
215
+ Args:
216
+ client: A ``MacpClient`` authenticated as the initiator.
217
+ participants: The voters, in the order they evaluate and vote.
218
+ mode: ``"decision"`` (default) or ``"quorum"``.
219
+ policy: A registered ``policy_version`` (default ``policy.default``).
220
+ threshold: Approvals required (default a strict majority, ``n // 2 + 1``).
221
+ proposal: ``state -> str | {option, rationale?, details?}``. The
222
+ default reads ``state["proposal"]``.
223
+ output_key: The state key written (default ``"macp"``). Declare it in
224
+ your state schema, or LangGraph drops it.
225
+ ttl_ms: Session TTL (default 60 s).
226
+ action: The commitment action stem, committed as ``<action>.approved``
227
+ or ``<action>.rejected``.
228
+ initiator: The initiator's agent id, when the client's auth does not
229
+ carry it (a production bearer token).
230
+ """
231
+
232
+ def __init__(
233
+ self,
234
+ client: MacpClient,
235
+ participants: Sequence[ConsensusParticipant],
236
+ mode: Mode = "decision",
237
+ policy: str | None = None,
238
+ *,
239
+ threshold: int | None = None,
240
+ proposal: Callable[[Mapping[str, Any]], Mapping[str, Any] | str] | None = None,
241
+ output_key: str = "macp",
242
+ ttl_ms: int = DEFAULT_TTL_MS,
243
+ action: str = DEFAULT_ACTION,
244
+ initiator: str | None = None,
245
+ name: str = "macp_consensus",
246
+ ) -> None:
247
+ if mode not in _MODES:
248
+ raise ValueError(f"mode must be 'decision' or 'quorum', got {mode!r}")
249
+ voters = list(participants)
250
+ if not voters:
251
+ raise ValueError("MacpConsensusNode needs at least one participant")
252
+ ids = [p.id for p in voters]
253
+ if len(set(ids)) != len(ids):
254
+ raise ValueError(f"participant ids must be unique: {ids}")
255
+ self._initiator = _initiator_of(client, initiator)
256
+ if self._initiator in ids:
257
+ raise ValueError(
258
+ f"the initiator {self._initiator!r} commits and cannot also be a participant"
259
+ )
260
+ n = len(voters)
261
+ self._threshold = n // 2 + 1 if threshold is None else threshold
262
+ if isinstance(self._threshold, bool) or not 1 <= self._threshold <= n:
263
+ raise ValueError(f"threshold must be between 1 and {n}, got {threshold!r}")
264
+ if ttl_ms <= 0:
265
+ raise ValueError("ttl_ms must be positive")
266
+ self._client = client
267
+ self._participants = voters
268
+ self._mode = mode
269
+ self._policy = policy or DEFAULT_POLICY_VERSION
270
+ self._proposal = proposal or _default_proposal
271
+ self._output_key = output_key
272
+ self._ttl_ms = ttl_ms
273
+ self._action = action
274
+ super().__init__(self._run, afunc=self._arun, name=name)
275
+
276
+ async def _arun(self, state: Mapping[str, Any]) -> dict[str, ConsensusResult]:
277
+ return await asyncio.to_thread(self._run, state)
278
+
279
+ def _run(self, state: Mapping[str, Any]) -> dict[str, ConsensusResult]:
280
+ option, rationale, details = _read_proposal(self._proposal(state))
281
+ ids = [p.id for p in self._participants]
282
+ session: DecisionSession | QuorumSession
283
+ if self._mode == "decision":
284
+ session = DecisionSession(self._client, policy_version=self._policy)
285
+ members = [self._initiator, *ids]
286
+ proposal_id = DECISION_PROPOSAL_ID
287
+ else:
288
+ session = QuorumSession(self._client, policy_version=self._policy)
289
+ members = ids
290
+ proposal_id = QUORUM_REQUEST_ID
291
+ session.start(intent=option, participants=members, ttl_ms=self._ttl_ms)
292
+ try:
293
+ tally = self._settle(session, proposal_id, option, rationale, details, members)
294
+ outcome = tally.outcome() or "reject"
295
+ session.commit(
296
+ action=f"{self._action}.{'approved' if outcome == 'approve' else 'rejected'}",
297
+ authority_scope=AUTHORITY_SCOPE,
298
+ reason=f"{tally.approvals}/{tally.voters} approvals (threshold {tally.threshold})",
299
+ outcome_positive=outcome == "approve",
300
+ )
301
+ except BaseException:
302
+ with contextlib.suppress(Exception):
303
+ session.cancel(reason="MacpConsensusNode failed")
304
+ raise
305
+ payload = session.projection.commitment
306
+ if payload is None: # pragma: no cover - an acked commit is always projected
307
+ raise RuntimeError("the runtime acked the Commitment but it was not projected")
308
+ result: ConsensusResult = {
309
+ "outcome": outcome,
310
+ "session_id": session.session_id,
311
+ "commitment_hash": commitment_hash(payload),
312
+ "mode": _MODES[self._mode],
313
+ "commitment": json.loads(canonical_projection(payload)),
314
+ "approvals": tally.approvals,
315
+ "threshold": tally.threshold,
316
+ }
317
+ return {self._output_key: result}
318
+
319
+ def _settle(
320
+ self,
321
+ session: DecisionSession | QuorumSession,
322
+ proposal_id: str,
323
+ option: str,
324
+ rationale: str,
325
+ details: Any,
326
+ members: list[str],
327
+ ) -> _Tally:
328
+ wire_details = (
329
+ b"" if details is None else json.dumps(details, separators=(",", ":")).encode()
330
+ )
331
+ if isinstance(session, DecisionSession):
332
+ session.propose(proposal_id, option, rationale=rationale, supporting_data=wire_details)
333
+ else:
334
+ session.request_approval(
335
+ proposal_id,
336
+ option,
337
+ summary=rationale,
338
+ details=wire_details,
339
+ required_approvals=self._threshold,
340
+ )
341
+ mode = _MODES[self._mode]
342
+ proposal = {
343
+ "proposal_id": proposal_id,
344
+ "option": option,
345
+ "rationale": rationale,
346
+ "details": details,
347
+ "mode": mode,
348
+ }
349
+ info = SessionInfo(
350
+ session_id=session.session_id,
351
+ mode=mode,
352
+ participants=list(members),
353
+ mode_version=session.mode_version,
354
+ configuration_version=session.configuration_version,
355
+ policy_version=session.policy_version,
356
+ )
357
+ tally = _Tally(len(self._participants), self._threshold)
358
+ if isinstance(session, DecisionSession):
359
+ results = []
360
+ for p in self._participants:
361
+ result = _evaluate(p.evaluator, proposal, info)
362
+ session.evaluate(
363
+ proposal_id,
364
+ result.recommendation,
365
+ confidence=result.confidence,
366
+ reason=result.reason,
367
+ sender=p.id,
368
+ auth=self._auth(p),
369
+ )
370
+ results.append(result)
371
+ for p, result in zip(self._participants, results, strict=True):
372
+ vote, reason = self._vote(session, p, result)
373
+ if vote is not None:
374
+ session.vote(proposal_id, vote, reason=reason, sender=p.id, auth=self._auth(p))
375
+ tally.add(vote == "APPROVE")
376
+ else:
377
+ tally.add(False) # declined to vote: no approval from it
378
+ if tally.outcome() is not None:
379
+ break
380
+ else:
381
+ for p in self._participants:
382
+ result = _evaluate(p.evaluator, proposal, info)
383
+ ballot = _BALLOTS[result.recommendation]
384
+ send = {"APPROVE": session.approve, "REJECT": session.reject}.get(
385
+ ballot, session.abstain
386
+ )
387
+ send(proposal_id, reason=result.reason, sender=p.id, auth=self._auth(p))
388
+ tally.add(ballot == "APPROVE")
389
+ if tally.outcome() is not None:
390
+ break
391
+ return tally
392
+
393
+ @staticmethod
394
+ def _vote(
395
+ session: DecisionSession, p: ConsensusParticipant, result: EvaluationResult
396
+ ) -> tuple[str | None, str]:
397
+ if p.voter is None:
398
+ return _BALLOTS[result.recommendation], result.reason
399
+ projection = session.decision_projection
400
+ if not p.voter.should_vote(projection):
401
+ return None, ""
402
+ decision = p.voter.decide_vote(projection)
403
+ return validate_vote(decision.vote), decision.reason
404
+
405
+ @staticmethod
406
+ def _auth(p: ConsensusParticipant) -> AuthConfig:
407
+ return p.auth or AuthConfig.for_dev_agent(p.id)
408
+
409
+
410
+ def _now() -> str:
411
+ return datetime.now(UTC).strftime("%Y-%m-%dT%H:%M:%SZ")
412
+
413
+
414
+ def consensus_receipt(
415
+ result: ConsensusResult,
416
+ *,
417
+ issuer: str,
418
+ issued_at: str | None = None,
419
+ signer: ReceiptSigner | None = None,
420
+ ) -> DecisionReceipt:
421
+ """A ``macp-receipt/1`` decision receipt for the node's result, in one call.
422
+
423
+ ``issued_at`` defaults to now (``YYYY-MM-DDTHH:MM:SSZ``). Pass a
424
+ ``ReceiptSigner`` to add an Ed25519 attestation. Without one, the
425
+ receipt verifies as ``integrity_only``.
426
+ """
427
+ return build_receipt(
428
+ commitment_from_projection(result["commitment"]),
429
+ session_id=result["session_id"],
430
+ mode=result["mode"],
431
+ issuer=issuer,
432
+ issued_at=issued_at or _now(),
433
+ signer=signer,
434
+ )
File without changes
@@ -0,0 +1,243 @@
1
+ Metadata-Version: 2.4
2
+ Name: langgraph-macp
3
+ Version: 0.1.0
4
+ Summary: LangGraph node that settles a binding MACP Decision or Quorum session
5
+ Author-email: Multi-Agent Coordination Protocol <macp@multiagentcoordinationprotocol.org>
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://multiagentcoordinationprotocol.io
8
+ Project-URL: Repository, https://github.com/multiagentcoordinationprotocol/macp-sdk-python
9
+ Project-URL: Source, https://github.com/multiagentcoordinationprotocol/macp-sdk-python/tree/main/integrations/langgraph
10
+ Project-URL: Changelog, https://github.com/multiagentcoordinationprotocol/macp-sdk-python/blob/main/integrations/langgraph/CHANGELOG.md
11
+ Project-URL: Bug Tracker, https://github.com/multiagentcoordinationprotocol/macp-sdk-python/issues
12
+ Keywords: langgraph,langchain,macp,multi-agent,consensus,coordination
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: Apache Software License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Software Development :: Libraries
21
+ Requires-Python: >=3.11
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: macp-sdk-python[receipts]<0.20,>=0.19.0
25
+ Requires-Dist: langgraph<2,>=1.0
26
+ Requires-Dist: langchain-core<2,>=1.0
27
+ Provides-Extra: examples
28
+ Requires-Dist: langchain-anthropic<2,>=1.0; extra == "examples"
29
+ Provides-Extra: dev
30
+ Requires-Dist: pytest>=8.0; extra == "dev"
31
+ Requires-Dist: pytest-cov>=5.0; extra == "dev"
32
+ Requires-Dist: mypy>=1.10; extra == "dev"
33
+ Requires-Dist: ruff>=0.5; extra == "dev"
34
+ Requires-Dist: build>=1.0; extra == "dev"
35
+ Requires-Dist: twine>=5.0; extra == "dev"
36
+ Dynamic: license-file
37
+
38
+ # langgraph-macp
39
+
40
+ Add a **binding multi-agent decision** to a LangGraph graph in a few lines.
41
+
42
+ `MacpConsensusNode` is a LangGraph node. It opens a [MACP](https://multiagentcoordinationprotocol.io)
43
+ Decision or Quorum session on the MACP runtime and lets each participant evaluate the proposal,
44
+ usually through its own LLM. It then has them vote, commits the outcome, and writes the
45
+ Commitment back into graph state. Anyone can check the committed outcome later: the runtime
46
+ records it, `commitment_hash` identifies it, and a decision receipt for it takes one call.
47
+
48
+ ```bash
49
+ pip install langgraph-macp
50
+ ```
51
+
52
+ The TypeScript twin is
53
+ [`@multiagentcoordinationprotocol/langgraph`](https://github.com/multiagentcoordinationprotocol/macp-sdk-typescript/tree/main/integrations/langgraph).
54
+ It has the same options, the same flow and the same state keys, in camelCase.
55
+
56
+ ## Quick start
57
+
58
+ ```python
59
+ from typing import TypedDict
60
+
61
+ from langchain_anthropic import ChatAnthropic
62
+ from langgraph.graph import END, START, StateGraph
63
+ from macp_sdk import AuthConfig, MacpClient
64
+
65
+ from langgraph_macp import (
66
+ ConsensusParticipant, ConsensusResult, MacpConsensusNode, consensus_receipt, llm_evaluator,
67
+ )
68
+
69
+
70
+ class State(TypedDict, total=False):
71
+ proposal: str
72
+ macp: ConsensusResult # declare the output key, or LangGraph drops it
73
+
74
+
75
+ client = MacpClient(target="127.0.0.1:50051", allow_insecure=True,
76
+ auth=AuthConfig.for_dev_agent("coordinator"))
77
+ model = ChatAnthropic(model="claude-opus-5-5")
78
+ consensus = MacpConsensusNode(client, [
79
+ ConsensusParticipant("security", llm_evaluator(model, system_prompt="You review security...")),
80
+ ConsensusParticipant("sre", llm_evaluator(model, system_prompt="You review reliability...")),
81
+ ConsensusParticipant("product", llm_evaluator(model, system_prompt="You review user impact...")),
82
+ ])
83
+
84
+ graph = StateGraph(State)
85
+ graph.add_node("consensus", consensus)
86
+ graph.add_edge(START, "consensus")
87
+ graph.add_edge("consensus", END)
88
+
89
+ final = graph.compile().invoke({"proposal": "ship v2 to all users"})
90
+ final["macp"]["outcome"] # "approve" | "reject"
91
+ final["macp"]["commitment_hash"] # "sha256:…"
92
+ receipt = consensus_receipt(final["macp"], issuer="did:web:example.com")
93
+ ```
94
+
95
+ A local runtime for development:
96
+
97
+ ```bash
98
+ docker run -d -p 50051:50051 -e MACP_ALLOW_INSECURE=1 \
99
+ ghcr.io/multiagentcoordinationprotocol/macp-runtime:0.9.0
100
+ ```
101
+
102
+ ## How the node runs a session
103
+
104
+ ```mermaid
105
+ sequenceDiagram
106
+ participant G as Graph (initiator)
107
+ participant R as MACP runtime
108
+ participant A as participant 1..n
109
+ G->>R: SessionStart (participants)
110
+ alt mode="decision"
111
+ G->>R: Proposal p1
112
+ A->>R: Evaluation (each, in order)
113
+ A->>R: Vote (in order, until settled)
114
+ else mode="quorum"
115
+ G->>R: ApprovalRequest r1 (required_approvals = threshold)
116
+ A->>R: Approve / Reject / Abstain (in order, until settled)
117
+ end
118
+ G->>R: Commitment (<action>.approved | <action>.rejected)
119
+ G-->>G: state[output_key] = ConsensusResult
120
+ ```
121
+
122
+ - **The initiator** is the client's identity. It opens the session, sends the proposal and commits.
123
+ It never votes and is not counted.
124
+ - In Decision mode it is listed as the first session participant, because the runtime accepts
125
+ a `Proposal` only from a declared participant.
126
+ - In Quorum mode it is not a session participant.
127
+ - **Participants** each send under their own auth. The default is
128
+ `AuthConfig.for_dev_agent(id)`; pass `auth=AuthConfig.for_bearer(...)` in production.
129
+ - **Evaluation**
130
+ - An evaluator is an SDK `EvaluationStrategy` (`evaluate(proposal, session_info)`), or a plain
131
+ function with that signature.
132
+ - It returns an `EvaluationResult`, or a mapping with `recommendation`, `confidence` and `reason`.
133
+ - `recommendation` must be one of `APPROVE`, `REVIEW`, `BLOCK` or `REJECT` (case-insensitive).
134
+ `ABSTAIN` is read as `REVIEW`. Anything else raises.
135
+ - `proposal` is
136
+ `{"proposal_id", "option", "rationale", "details", "mode"}`.
137
+ - **Ballots**
138
+ - `APPROVE` → approve; `REVIEW` → abstain; `REJECT` or `BLOCK` → reject.
139
+ - In Decision mode a participant may set `voter=`, any SDK `VotingStrategy`, to vote differently
140
+ from its own recommendation.
141
+ - **Settlement**
142
+ - Approved once `threshold` participants approve. The default threshold is a strict majority,
143
+ `n // 2 + 1`.
144
+ - Rejected as soon as approval is out of reach.
145
+ - The initiator commits at once, so the remaining participants never vote.
146
+ - **Errors**
147
+ - If anything fails after the session opens, the node cancels the session and re-raises.
148
+ This covers a NACK, a transport error, an evaluator exception, and `POLICY_DENIED` on commit.
149
+ - Nothing is written to state.
150
+ - **Sync and async.** The node is a `RunnableLambda`, so it works under `invoke` and `ainvoke`.
151
+ The async path runs the blocking gRPC calls in a worker thread.
152
+
153
+ ## Options
154
+
155
+ | Option | Default | |
156
+ |---|---|---|
157
+ | `client` | required | `MacpClient` authenticated as the initiator |
158
+ | `participants` | required | `ConsensusParticipant(id, evaluator, auth=None, voter=None)`, in voting order |
159
+ | `mode` | `"decision"` | `"decision"` or `"quorum"` |
160
+ | `policy` | `"policy.default"` | a registered `policy_version` (RFC-MACP-0012) |
161
+ | `threshold` | `n // 2 + 1` | approvals required, `1..n` |
162
+ | `proposal` | `state["proposal"]` | `state -> str \| {"option", "rationale"?, "details"?}` |
163
+ | `output_key` | `"macp"` | state key written |
164
+ | `ttl_ms` | `60000` | session TTL |
165
+ | `action` | `"macp.consensus"` | committed as `<action>.approved` / `<action>.rejected` |
166
+ | `initiator` | from the client's auth | the initiator's agent id, needed with a bearer token that has no `sender_hint` |
167
+
168
+ ## What lands in state
169
+
170
+ ```python
171
+ {
172
+ "outcome": "approve", # or "reject"
173
+ "session_id": "5a5b7088-…",
174
+ "commitment_hash": "sha256:65f0e9bc…", # RFC-MACP-0013 macp-commitment-hash/1
175
+ "mode": "macp.mode.decision.v1",
176
+ "commitment": { # RFC-MACP-0013 §3 projection, plain JSON
177
+ "commitment_id": "…", "action": "macp.consensus.approved",
178
+ "authority_scope": "macp.consensus", "reason": "2/3 approvals (threshold 2)",
179
+ "mode_version": "1.0.0", "policy_version": "policy.default",
180
+ "configuration_version": "config.default", "outcome_positive": True,
181
+ },
182
+ "approvals": 2,
183
+ "threshold": 2,
184
+ }
185
+ ```
186
+
187
+ `commitment` is plain data, so LangGraph checkpointers can store it.
188
+
189
+ ## Decision receipts
190
+
191
+ `consensus_receipt(result, issuer=..., issued_at=None, signer=None)` returns an RFC-MACP-0013
192
+ Appendix A `macp-receipt/1` receipt. `issued_at` defaults to now, in `YYYY-MM-DDTHH:MM:SSZ` form.
193
+
194
+ - With no signer, `verify_receipt(receipt, {})` gives `integrity_only`.
195
+ - Pass `macp_sdk.ReceiptSigner(kid, private_key=<32-byte seed>)` for an Ed25519 attestation.
196
+ It then verifies `attested` against your trusted keys.
197
+
198
+ ## LLM evaluators
199
+
200
+ `llm_evaluator(chat_model, system_prompt=None)` turns any LangChain chat model into an evaluator.
201
+
202
+ - It asks the model for `{"recommendation", "confidence", "reason"}` as JSON. A Markdown code
203
+ fence around the answer is accepted.
204
+ - An answer it cannot read becomes `REVIEW` with confidence `0` and reason
205
+ `"unparseable model output"`. That is an abstention, so a confused model cannot approve
206
+ anything.
207
+ - Tests and the default example use LangChain's `FakeListChatModel` with canned answers, so they
208
+ need no API key.
209
+
210
+ ## Examples
211
+
212
+ - [`examples/fraud_review_graph.py`](examples/fraud_review_graph.py)
213
+ - A fraud-review graph, shaped like macp-playground's LangGraph worker.
214
+ - It scores signals, then three specialists (fraud, growth, compliance) settle the transaction
215
+ through the node, and the graph routes on the outcome.
216
+ - Its LLMs are stubs, so it needs no key and gives the same result every run. The integration
217
+ test runs it.
218
+ - [`examples/real_llm_review.py`](examples/real_llm_review.py)
219
+ - The same graph with `claude-opus-5-5` specialists.
220
+ - Needs `pip install "langgraph-macp[examples]"` (adds `langchain-anthropic`) and
221
+ `ANTHROPIC_API_KEY`.
222
+
223
+ ## Development
224
+
225
+ ```bash
226
+ cd integrations/langgraph
227
+ python -m venv .venv && .venv/bin/pip install -e "../..[receipts]" -e ".[dev]"
228
+ .venv/bin/pytest tests/unit --cov # no runtime needed
229
+ MACP_RUNTIME_TARGET=127.0.0.1:50051 .venv/bin/pytest tests/integration
230
+ ```
231
+
232
+ The package lives in the SDK repo but has its own version and release tag, `langgraph-macp-vX.Y.Z`.
233
+ It pins `macp-sdk-python[receipts]>=0.19,<0.20`.
234
+
235
+ ## Other frameworks
236
+
237
+ - **Claude Agent SDK**: subagents voting through Decision mode. Next in this repo.
238
+ - **OpenAI Agents SDK**: handoffs mapped to MACP Handoff mode. Deferred, planned after the Claude
239
+ Agent SDK adapter.
240
+
241
+ ## License
242
+
243
+ Apache-2.0
@@ -0,0 +1,9 @@
1
+ langgraph_macp/__init__.py,sha256=inAtLjk0ZxkMAUYvyJKPkFyMWQIMHrR5vEEySQFR99s,936
2
+ langgraph_macp/llm.py,sha256=N66XeHBjbDxzNFyLxg75saUJX9mSIjutE42YQmmug8U,3342
3
+ langgraph_macp/node.py,sha256=Pbw_g9VMG4eKMEQvhG2n5HH-iHOkdzw7nqjjQKVVQ-k,16928
4
+ langgraph_macp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ langgraph_macp-0.1.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
6
+ langgraph_macp-0.1.0.dist-info/METADATA,sha256=QYlVfC_Cw9Fs_JP0WYymq3NJXr6gVpauY03-hIFSoMM,10612
7
+ langgraph_macp-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
8
+ langgraph_macp-0.1.0.dist-info/top_level.txt,sha256=YtiQnCCbeMpWusSUgrn73VVflzRlACegyk5M24d73Ns,15
9
+ langgraph_macp-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1 @@
1
+ langgraph_macp