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.2.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.2.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

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

Hashes for halo_format_langgraph-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2f10cc5602361b4e809c80aa9d02382b383d8d5b0d809032bffc92b4b5d4472b
MD5 afa77d1f276e3024381f42cc431ded94
BLAKE2b-256 aab8d7589a2233d2ae58285698b9e4b69b263f50a07d5e7c470d5364367d744a

See more details on using hashes here.

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

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.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for halo_format_langgraph-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2dd606d6c838b0becc71ea4564aa81f48a1d757d85808e10b7517de87a2b7502
MD5 b383ddba128ec470e678e05c210852b8
BLAKE2b-256 61a7180f01b31bea3708cbcc21e75afb8bb446bf73a770e6f851ff18e4611218

See more details on using hashes here.

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

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