Skip to main content

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_call encode 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 the ToolMessage artifact (kept in graph state, never sent to the model) for audit/replay;
  • a single plain LangChain halo_fetch tool 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 separate halo_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

halo_format_langgraph-0.4.0.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

halo_format_langgraph-0.4.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file halo_format_langgraph-0.4.0.tar.gz.

File metadata

  • Download URL: halo_format_langgraph-0.4.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

Hashes for halo_format_langgraph-0.4.0.tar.gz
Algorithm Hash digest
SHA256 118647825c76fea38689e9834cd9457d117be442ee381a823b78fc65b24e1eb1
MD5 de340a9d639b09d953affba06b0ebf0d
BLAKE2b-256 584a067bb5ff6c7255eb3dea2901ff6f139872f476d86ab9e5308062e4a0ab44

See more details on using hashes here.

Provenance

The following attestation bundles were made for halo_format_langgraph-0.4.0.tar.gz:

Publisher: publish-python-langgraph.yml on halo-format/halo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file halo_format_langgraph-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for halo_format_langgraph-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd1bc0f014d085889d6ac986c1e9238c76ef6a67450b93dfdf4922c1d0cdfd0f
MD5 720e351de83fe4c11f52ed6b41bc280e
BLAKE2b-256 1df4cf440f28174f184dde7a7c6744aa7062d7825d54d81ea51e19fb36c3431d

See more details on using hashes here.

Provenance

The following attestation bundles were made for halo_format_langgraph-0.4.0-py3-none-any.whl:

Publisher: publish-python-langgraph.yml on halo-format/halo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page