Drop Aethis into a LangGraph flow as a deterministic decision node. ~10 lines via langchain-mcp-adapters.
You’re building a LangGraph agent and you want a deterministic decision node — same inputs, same answer, every time, traceable to source. Aethis is already an MCP server (aethis-mcp), and LangGraph has first-class MCP support via the official langchain-mcp-adapters package. No custom adapter needed — register aethis-mcp as a stdio MCP server and its tools become LangChain Tools your graph nodes can call.The runtime decision path stays in formal logic. The LLM still drives the conversation; the eligibility step does not.
You also need aethis-mcp reachable on your PATH. Either install it once:
npm install -g aethis-mcp
…or let npx resolve it on first call (slower cold start, no global install).
The recipe
import asynciofrom langchain_mcp_adapters.client import MultiServerMCPClientfrom langchain_anthropic import ChatAnthropicfrom langchain.agents import create_agentasync def main(): # 1. Register aethis-mcp as a stdio MCP server. client = MultiServerMCPClient({ "aethis": { "transport": "stdio", "command": "npx", "args": ["-y", "aethis-mcp"], } }) # 2. Pull Aethis tools as LangChain Tools. tools = await client.get_tools() # 3. Build a LangGraph agent that can call them. agent = create_agent( ChatAnthropic(model="claude-opus-4-7"), tools, ) # 4. Ask the agent a question that requires a deterministic check. result = await agent.ainvoke({ "messages": [{ "role": "user", "content": ( "I'm 10, year 6, at a state-funded school, my household " "receives Universal Credit with £5,000 annual net earnings. " "Am I eligible for UK Free School Meals? Use the Aethis " "ruleset aethis/uk-fsm/child-eligibility." ), }] }) print(result["messages"][-1].content)asyncio.run(main())
create_agent lives in the langchain package as of LangChain 1.x. The
older langgraph.prebuilt.create_react_agent still imports but is
deprecated in favour of it, so it emits a deprecation warning on every run.
Same prebuilt tool-calling agent; the argument for a system prompt is
system_prompt= rather than prompt=.
The agent will call aethis_schema (to discover fields), then aethis_decide (to evaluate), and report the result. The decision itself never touches the LLM — it’s evaluated by the constraint solver on api.aethis.ai and returns a stable decision_id + inputs_hash you can store for audit.
What just happened
The LLM picks the ruleset, parses the user’s free-text, and presents the result. The decision is made by formal logic on the server and is byte-stable across runs.
Anonymous vs keyed paths
aethis_decide / aethis_schema / aethis_explain on a public ruleset — anonymous, no API key. Works in the recipe above as-is.
aethis_decide on a composed Rulebook (rulebook_id=...) — always scope-gated. Pass an API key via the MCP server env:
Authoring tools (aethis_create_ruleset, aethis_generate_and_test, aethis_publish) — require a key and are in private beta. Request access at aethis.ai/developer-access.
When to use this vs an LLM-only node
Use Aethis when:
The decision must be stable across runs (audit, compliance, regulated decisions).
You need a trace back to the source clause for every result.
The rule is encodable (legislation, policy, contract, internal SOP) — anything where “the answer is in this document” rather than “the answer requires judgment.”
Stay LLM-only when:
The decision genuinely requires open-ended reasoning.
The cost of a wrong answer is low.
The rule changes every conversation.
The right pattern is usually both: LLM nodes for routing, summarisation, and user interaction; Aethis nodes for the regulated check at the centre of the flow.
See also
Evaluate a case — the four-call pattern (schema → fields → decide → explain) without LangGraph.
Decision envelope — what’s in the response, and how to use inputs_hash + decision_id for audit.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Aethis","colors":{"primary":"#B96A2C","light":"#C67549","dark":"#934216"},"favicon":"https://mintcdn.com/aethis/WVUU0hqcSmi3YkHO/favicon.svg?fit=max\u0026auto=format\u0026n=WVUU0hqcSmi3YkHO\u0026q=85\u0026s=14e7490c211076b474314db45e0dc490","api":{"openapi":"api-reference/openapi.json"},"navbar":{"links":[{"href":"https://aethis.ai","label":"aethis.ai"},{"icon":"github","href":"https://github.com/Aethis-ai/aethis-mcp","label":"Star on GitHub"}],"primary":{"type":"button","label":"Request access","href":"https://aethis.ai/developer-access"}},"footer":{"socials":{"github":"https://github.com/Aethis-ai"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"aethis","hasAudioNarration":false,"actualSubdomain":"aethis","customDomains":["docs.aethis.ai"],"gitSource":{"type":"github","owner":"aethis-ai","repo":"docs","deployBranch":"main","isPrivate":true,"contentDirectory":"","mountPath":"","label":""},"feedback":{"agentFeedback":true,"thumbs":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6afb6f4894bd5dbeb450724a","clientVersion":"0.0.4167","searchFilterCounts":[{"language":"default","tag":"Reference","count":8},{"language":"default","tag":"Authoring (invite-only)","count":7},{"language":"default","tag":"Getting started (no key)","count":7},{"language":"default","tag":"Interfaces","count":6},{"language":"default","tag":"Recipes","count":4},{"language":"default","tag":"AI coding agents","count":3},{"language":"default","tag":"Changelog","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"recipes/langgraph-integration","slug":"/recipes/langgraph-integration","pageMetadata":{"title":"LangGraph integration","description":"Drop Aethis into a LangGraph flow as a deterministic decision node. ~10 lines via langchain-mcp-adapters.","href":"/recipes/langgraph-integration"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Drop Aethis into a LangGraph flow as a deterministic decision node. ~10 lines via langchain-mcp-adapters.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Mermaid,Note}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Mermaid)_missingMdxReference(`Mermaid`,true);if(!Note)_missingMdxReference(`Note`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`You’re building a LangGraph agent and you want a deterministic decision node`}),` — same inputs, same answer, every time, traceable to source. Aethis is already an MCP server (`,_jsx(_components.code,{children:`aethis-mcp`}),`), and LangGraph has first-class MCP support via the official `,_jsx(_components.a,{href:`https://pypi.org/project/langchain-mcp-adapters/`,children:_jsx(_components.code,{children:`langchain-mcp-adapters`})}),` package. No custom adapter needed — register `,_jsx(_components.code,{children:`aethis-mcp`}),` as a stdio MCP server and its tools become LangChain Tools your graph nodes can call.`]}),`\n`,_jsx(_components.p,{children:`The runtime decision path stays in formal logic. The LLM still drives the conversation; the eligibility step does not.`}),`\n`,_jsx(Heading,{level:`2`,id:`install`,children:`Install`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`uv`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` add`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` langgraph`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` langchain`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` langchain-mcp-adapters`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` langchain-anthropic`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`You also need `,_jsx(_components.a,{href:`/mcp-server/overview`,children:_jsx(_components.code,{children:`aethis-mcp`})}),` reachable on your PATH. Either install it once:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -g`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` aethis-mcp`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`…or let `,_jsx(_components.code,{children:`npx`}),` resolve it on first call (slower cold start, no global install).`]}),`\n`,_jsx(Heading,{level:`2`,id:`the-recipe`,children:`The recipe`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`39`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`39`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` asyncio`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` langchain_mcp_adapters.client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` MultiServerMCPClient`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` langchain_anthropic `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ChatAnthropic`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` langchain.agents `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` create_agent`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # 1. Register aethis-mcp as a stdio MCP server.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` MultiServerMCPClient({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"aethis\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"transport\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"stdio\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"command\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"npx\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"args\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"-y\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"aethis-mcp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # 2. Pull Aethis tools as LangChain Tools.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` tools `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.get_tools()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # 3. Build a LangGraph agent that can call them.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` agent `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` create_agent(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ChatAnthropic(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`model`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"claude-opus-4-7\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` tools,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # 4. Ask the agent a question that requires a deterministic check.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` agent.ainvoke({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"messages\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: (`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"I'm 10, year 6, at a state-funded school, my household \"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"receives Universal Credit with £5,000 annual net earnings. \"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Am I eligible for UK Free School Meals? Use the Aethis \"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"ruleset aethis/uk-fsm/child-eligibility.\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"messages\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`-`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].content)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`asyncio.run(main())`})}),`\n`]})})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`create_agent`}),` lives in the `,_jsx(_components.code,{children:`langchain`}),` package as of LangChain 1.x. The\nolder `,_jsx(_components.code,{children:`langgraph.prebuilt.create_react_agent`}),` still imports but is\ndeprecated in favour of it, so it emits a deprecation warning on every run.\nSame prebuilt tool-calling agent; the argument for a system prompt is\n`,_jsx(_components.code,{children:`system_prompt=`}),` rather than `,_jsx(_components.code,{children:`prompt=`}),`.`]})}),`\n`,_jsxs(_components.p,{children:[`The agent will call `,_jsx(_components.code,{children:`aethis_schema`}),` (to discover fields), then `,_jsx(_components.code,{children:`aethis_decide`}),` (to evaluate), and report the result. The decision itself never touches the LLM — it’s evaluated by the constraint solver on `,_jsx(_components.code,{children:`api.aethis.ai`}),` and returns a stable `,_jsx(_components.code,{children:`decision_id`}),` + `,_jsx(_components.code,{children:`inputs_hash`}),` you can store for audit.`]}),`\n`,_jsx(Heading,{level:`2`,id:`what-just-happened`,children:`What just happened`}),`\n`,_jsx(Mermaid,{chart:`%%{init: {\"theme\": \"dark\"}}%%\nsequenceDiagram\n autonumber\n actor U as User\n participant A as LangGraph agent (LLM)\n participant S as aethis_schema\n participant D as aethis_decide\n\n U->>A: question / facts\n A->>S: discover fields (anonymous)\n S-->>A: field schema\n Note over A: parse user message,\u003cbr/>collect field values\n A->>D: decide (no LLM in path)\n D-->>A: decision + trace\n A-->>U: response with audit fields\u003cbr/>(decision_id, inputs_hash)`}),`\n`,_jsxs(_components.p,{children:[`The LLM picks the ruleset, parses the user’s free-text, and presents the result. The `,_jsx(_components.strong,{children:`decision`}),` is made by formal logic on the server and is byte-stable across runs.`]}),`\n`,_jsx(Heading,{level:`2`,id:`anonymous-vs-keyed-paths`,children:`Anonymous vs keyed paths`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`aethis_decide`}),` / `,_jsx(_components.code,{children:`aethis_schema`}),` / `,_jsx(_components.code,{children:`aethis_explain`}),` on a public ruleset`]}),` — anonymous, no API key. Works in the recipe above as-is.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`aethis_decide`}),` on a composed `,_jsx(_components.a,{href:`/concepts/nomenclature`,children:`Rulebook`}),` (`,_jsx(_components.code,{children:`rulebook_id=...`}),`)`]}),` — always scope-gated. Pass an API key via the MCP server env:`,`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` MultiServerMCPClient({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"aethis\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"transport\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"stdio\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"command\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"npx\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"args\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"-y\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"aethis-mcp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"env\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"AETHIS_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ak_live_...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Authoring tools`}),` (`,_jsx(_components.code,{children:`aethis_create_ruleset`}),`, `,_jsx(_components.code,{children:`aethis_generate_and_test`}),`, `,_jsx(_components.code,{children:`aethis_publish`}),`) — require a key and are in private beta. Request access at `,_jsx(_components.a,{href:`https://aethis.ai/developer-access`,children:`aethis.ai/developer-access`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`when-to-use-this-vs-an-llm-only-node`,children:`When to use this vs an LLM-only node`}),`\n`,_jsx(_components.p,{children:`Use Aethis when:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`The decision must be `,_jsx(_components.strong,{children:`stable`}),` across runs (audit, compliance, regulated decisions).`]}),`\n`,_jsxs(_components.li,{children:[`You need a `,_jsx(_components.strong,{children:`trace`}),` back to the source clause for every result.`]}),`\n`,_jsx(_components.li,{children:`The rule is encodable (legislation, policy, contract, internal SOP) — anything where “the answer is in this document” rather than “the answer requires judgment.”`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Stay LLM-only when:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`The decision genuinely requires open-ended reasoning.`}),`\n`,_jsx(_components.li,{children:`The cost of a wrong answer is low.`}),`\n`,_jsx(_components.li,{children:`The rule changes every conversation.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The right pattern is usually `,_jsx(_components.strong,{children:`both`}),`: LLM nodes for routing, summarisation, and user interaction; Aethis nodes for the regulated check at the centre of the flow.`]}),`\n`,_jsx(Heading,{level:`2`,id:`see-also`,children:`See also`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/recipes/evaluate-a-case`,children:`Evaluate a case`}),` — the four-call pattern (`,_jsx(_components.code,{children:`schema → fields → decide → explain`}),`) without LangGraph.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/mcp-server/overview`,children:`MCP server overview`}),` — full tool list and stdio config.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/concepts/decision-envelope`,children:`Decision envelope`}),` — what’s in the response, and how to use `,_jsx(_components.code,{children:`inputs_hash`}),` + `,_jsx(_components.code,{children:`decision_id`}),` for audit.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"LangGraph integration","description":"Drop Aethis into a LangGraph flow as a deterministic decision node. ~10 lines via langchain-mcp-adapters.","href":"/recipes/langgraph-integration"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Install","slug":"install","depth":2,"children":[]},{"title":"The recipe","slug":"the-recipe","depth":2,"children":[]},{"title":"What just happened","slug":"what-just-happened","depth":2,"children":[]},{"title":"Anonymous vs keyed paths","slug":"anonymous-vs-keyed-paths","depth":2,"children":[]},{"title":"When to use this vs an LLM-only node","slug":"when-to-use-this-vs-an-llm-only-node","depth":2,"children":[]},{"title":"See also","slug":"see-also","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"aethis","siteName":"Aethis","title":"LangGraph integration - Aethis","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-26T03:15:13.423Z","originalFileLocation":"recipes/langgraph-integration.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Drop Aethis into a LangGraph flow as a deterministic decision node. ~10 lines via langchain-mcp-adapters.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Aethis\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/aethis/SGGPUd8DU2bg6KYY/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/aethis/SGGPUd8DU2bg6KYY/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/aethis/SGGPUd8DU2bg6KYY/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/aethis/SGGPUd8DU2bg6KYY/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/aethis/SGGPUd8DU2bg6KYY/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/aethis/SGGPUd8DU2bg6KYY/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/aethis/SGGPUd8DU2bg6KYY/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/aethis/SGGPUd8DU2bg6KYY/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/aethis/SGGPUd8DU2bg6KYY/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"LangGraph integration - Aethis\">\u003cmeta data-mint-head property=\"og:description\" content=\"Drop Aethis into a LangGraph flow as a deterministic decision node. ~10 lines via langchain-mcp-adapters.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Aethis\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.aethis.ai/recipes/langgraph-integration\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://aethis.mintlify.site/_mintlify/api/og/v2?division=Recipes\u0026amp;title=LangGraph+integration\u0026amp;description=Drop+Aethis+into+a+LangGraph+flow+as+a+deterministic+decision+node.+%7E10+lines+via+langchain-mcp-adapters.\u0026amp;theme=8bf0f477e473398bba2ffd21\u0026amp;signature=d0f9d79b3c7f517ab8d2beedd15d445a587d780b8ff01454c4322f106d234bf2\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"LangGraph integration - Aethis\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Drop Aethis into a LangGraph flow as a deterministic decision node. ~10 lines via langchain-mcp-adapters.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://aethis.mintlify.site/_mintlify/api/og/v2?division=Recipes\u0026amp;title=LangGraph+integration\u0026amp;description=Drop+Aethis+into+a+LangGraph+flow+as+a+deterministic+decision+node.+%7E10+lines+via+langchain-mcp-adapters.\u0026amp;theme=8bf0f477e473398bba2ffd21\u0026amp;signature=d0f9d79b3c7f517ab8d2beedd15d445a587d780b8ff01454c4322f106d234bf2\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/aethis/SGGPUd8DU2bg6KYY/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Aethis\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#B96A2C\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.aethis.ai/recipes/langgraph-integration\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/recipes/langgraph-integration.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.aethis.ai/#organization\",\"name\":\"Aethis\",\"url\":\"https://docs.aethis.ai\"},{\"@type\":\"WebSite\",\"@id\":\"https://docs.aethis.ai#website\",\"name\":\"Aethis\",\"url\":\"https://docs.aethis.ai\",\"publisher\":{\"@id\":\"https://docs.aethis.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.aethis.ai/recipes/langgraph-integration#webpage\",\"url\":\"https://docs.aethis.ai/recipes/langgraph-integration\",\"name\":\"LangGraph integration\",\"description\":\"Drop Aethis into a LangGraph flow as a deterministic decision node. ~10 lines via langchain-mcp-adapters.\",\"dateModified\":\"2026-07-26T03:15:13.423Z\",\"isPartOf\":{\"@id\":\"https://docs.aethis.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.aethis.ai/recipes/langgraph-integration#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.aethis.ai/recipes/langgraph-integration#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Recipes\",\"item\":\"https://docs.aethis.ai/recipes/evaluate-a-case\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"LangGraph integration\",\"item\":\"https://docs.aethis.ai/recipes/langgraph-integration\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.aethis.ai/recipes/langgraph-integration#article\",\"headline\":\"LangGraph integration\",\"name\":\"LangGraph integration\",\"description\":\"Drop Aethis into a LangGraph flow as a deterministic decision node. ~10 lines via langchain-mcp-adapters.\",\"url\":\"https://docs.aethis.ai/recipes/langgraph-integration\",\"mainEntityOfPage\":{\"@id\":\"https://docs.aethis.ai/recipes/langgraph-integration#webpage\"},\"dateModified\":\"2026-07-26T03:15:13.423Z\",\"publisher\":{\"@id\":\"https://docs.aethis.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.aethis.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Aethis\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Aethis\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/recipes/langgraph-integration.md","siteName":"Aethis","nav":{"global":null,"groups":[{"group":"Getting started (no key)","pages":[{"title":"Introduction","href":"/getting-started/introduction"},{"title":"Your first decision","href":"/getting-started/first-decision"},{"title":"Try it","href":"/getting-started/try-it"},{"title":"How Aethis works","href":"/concepts/how-it-works"},{"title":"When to use Aethis","href":"/concepts/when-to-use"},{"title":"Nomenclature","href":"/concepts/nomenclature"},{"title":"Worked examples","href":"/getting-started/examples"}]},{"group":"AI coding agents","pages":[{"title":"AI coding agents","href":"/agents/index"},{"title":"Your first 20 minutes with an AI coding agent","href":"/agents/onboarding"},{"title":"Versions, regression and pinned replay","href":"/agents/versions-and-replay"}]},{"group":"Interfaces","pages":[{"title":"Which interface?","href":"/interfaces/which-to-use"},{"title":"MCP server overview","href":"/mcp-server/overview"},{"title":"Tools reference","href":"/mcp-server/tools"},{"title":"CLI","href":"/interfaces/cli"},{"title":"Python SDK","href":"/interfaces/python-sdk"},{"title":"REST API","href":"/interfaces/rest-api"}]},{"group":"Recipes","pages":[{"title":"Evaluate a case","href":"/recipes/evaluate-a-case"},{"title":"Author a rule from legislation","href":"/recipes/author-a-rule"},{"title":"Debug a failing decide","description":"Agent recipe: when /decide returns the wrong answer, or an error, or undetermined — what to check and in what order.","href":"/recipes/debug-a-decide"},{"title":"LangGraph integration","href":"/recipes/langgraph-integration"}]},{"group":"Authoring (invite-only)","pages":[{"title":"Author your first ruleset","description":"Create, review, generate, test, publish and decide a small private ruleset through the Aethis authoring API.","href":"/getting-started/author-first-ruleset"},{"title":"Phase 1 — Section discovery","href":"/authoring/section-discovery"},{"title":"Phase 2 — Field vocabulary","href":"/authoring/field-vocabulary"},{"title":"Phase 3 — Rule generation","href":"/authoring/rule-generation"},{"title":"Input invariants","href":"/authoring/input-invariants"},{"title":"Provenance and citations","href":"/authoring/provenance"},{"title":"Review checks","href":"/authoring/review-checks"}]},{"group":"Reference","pages":[{"title":"Capabilities and access","href":"/reference/capabilities"},{"title":"Deployed contract status","href":"/reference/deployed-contract"},{"title":"API Reference","href":"/api-reference/introduction"},{"title":"Authentication \u0026 API keys","href":"/reference/authentication"},{"title":"Decision envelope","href":"/concepts/decision-envelope"},{"title":"Ruleset \u0026 rulebook graphs","href":"/reference/graph"},{"title":"Errors reference","href":"/reference/errors"},{"title":"Troubleshooting","href":"/getting-started/troubleshooting"}]},{"group":"Changelog","pages":[{"title":"Changelog","href":"/changelog/index"}]}]},"basePath":"","title":"LangGraph integration - Aethis","buildId":"dpl_9RFrWkXdFTJCytfx6jAofvAaEXr6","deploymentId":"dpl_9RFrWkXdFTJCytfx6jAofvAaEXr6","dynamics":[],"chunks":[]}