Halo host adapter for LangChain agents and LangGraph graphs (Python): a wrap_tool_call encode middleware plus a halo_fetch navigation tool. install_halo() wires it in one call.
Project description
halo-format-langgraph
Halo host adapter for LangChain agents and
LangGraph graphs (Python). install_halo() wires it in
one call:
- a
wrap_tool_callencode middleware — the deterministic wrap-the-tool-call hook, LangChain's analog of the Claude SDK's PostToolUse — that replaces a large tool result with a halo shape map (root kind + one line per field: ref, kind, and a bounded preview), so the payload stays out of the model's context while it still sees what's there. The full envelope rides in theToolMessageartifact(kept in graph state, never sent to the model) for audit/replay; - a single plain LangChain
halo_fetchtool the model uses to pull back only the leaves it needs, verified on read — a ref that lands on a branch returns that branch's sub-refs, so one batch API both pulls and expands (there is no separatehalo_walk).
from langchain.agents import create_agent
from halo_format_langgraph import install_halo
result = install_halo(tools=my_tools)
agent = create_agent(model, tools=result.tools, middleware=result.middleware)
# result.session holds the shared store for audit/inspection
For hand-built StateGraphs, use halo_tool_node(tools=...) instead — it returns a ToolNode with the
same wrapper attached as wrap_tool_call / awrap_tool_call, plus the tools list (to bind to your
model) and the session.
The middleware is deterministic plumbing (it always fires, for every tool); the Halo Skill (or
prompt-mode guidance) is the navigation behavior. Pass store=FileStore(dir) for the heavy/persistent
deployment. The core engine is halo-format; this package is
only the shim.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file halo_format_langgraph-0.2.0.tar.gz.
File metadata
- Download URL: halo_format_langgraph-0.2.0.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f10cc5602361b4e809c80aa9d02382b383d8d5b0d809032bffc92b4b5d4472b
|
|
| MD5 |
afa77d1f276e3024381f42cc431ded94
|
|
| BLAKE2b-256 |
aab8d7589a2233d2ae58285698b9e4b69b263f50a07d5e7c470d5364367d744a
|
Provenance
The following attestation bundles were made for halo_format_langgraph-0.2.0.tar.gz:
Publisher:
publish-python-langgraph.yml on halo-format/halo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
halo_format_langgraph-0.2.0.tar.gz -
Subject digest:
2f10cc5602361b4e809c80aa9d02382b383d8d5b0d809032bffc92b4b5d4472b - Sigstore transparency entry: 1739916326
- Sigstore integration time:
-
Permalink:
halo-format/halo@e2e617e5fcb7b176663121ca5fc126426347c749 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/halo-format
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python-langgraph.yml@e2e617e5fcb7b176663121ca5fc126426347c749 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file halo_format_langgraph-0.2.0-py3-none-any.whl.
File metadata
- Download URL: halo_format_langgraph-0.2.0-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2dd606d6c838b0becc71ea4564aa81f48a1d757d85808e10b7517de87a2b7502
|
|
| MD5 |
b383ddba128ec470e678e05c210852b8
|
|
| BLAKE2b-256 |
61a7180f01b31bea3708cbcc21e75afb8bb446bf73a770e6f851ff18e4611218
|
Provenance
The following attestation bundles were made for halo_format_langgraph-0.2.0-py3-none-any.whl:
Publisher:
publish-python-langgraph.yml on halo-format/halo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
halo_format_langgraph-0.2.0-py3-none-any.whl -
Subject digest:
2dd606d6c838b0becc71ea4564aa81f48a1d757d85808e10b7517de87a2b7502 - Sigstore transparency entry: 1739916331
- Sigstore integration time:
-
Permalink:
halo-format/halo@e2e617e5fcb7b176663121ca5fc126426347c749 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/halo-format
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python-langgraph.yml@e2e617e5fcb7b176663121ca5fc126426347c749 -
Trigger Event:
workflow_run
-
Statement type: