Skip to main content

LangGraph and CrewAI adapter for Entire checkpoint tracking.

Project description

Entire Adapter

Python adapter that lets LangGraph/LangChain and CrewAI agents participate in Entire checkpoint tracking.

The package provides:

  • EntireCallbackHandler for LangChain and LangGraph callback configs.
  • EntireCrewAIListener for CrewAI's event bus.
  • entire-agent-entire-adapter, an Entire external-agent protocol executable discovered as entire-adapter.

Why

Custom Python agents often edit files through tools, but their prompt/tool context is easy to lose once the final Git diff lands. Entire Adapter bridges those frameworks into Entire's lifecycle hooks so commits can be linked to the agent session and checkpoint history.

Install

For LangGraph/LangChain:

pip install "entire-adapter[langgraph]"

For CrewAI:

pip install "entire-adapter[crewai]"

For local development from this repo:

pip install -e ".[langgraph,crewai,dev]"

Enable the adapter inside a Git repo where Entire is installed:

entire enable --agent entire-adapter --telemetry=false
entire agent list

The adapter does not auto-commit your work. Persistent checkpoint metadata is finalized by Entire's existing Git hooks when you commit.

LangGraph / LangChain

from entire_adapter import EntireCallbackHandler

entire = EntireCallbackHandler(agent_label="reviewer")

result = graph.invoke(
    {"prompt": "Refactor the parser"},
    config={"callbacks": [entire]},
)

print(entire.session_id)

The handler maps:

  • top-level on_chain_start to session-start and turn-start
  • on_agent_action and on_llm_end to transcript reasoning/text records
  • on_tool_start to transcript tool context
  • on_tool_end and on_tool_error to transcript tool result and turn-end
  • top-level on_chain_end and on_chain_error to session-end

See usage_example.py for a minimal graph example.

CrewAI

Create and keep a listener instance alive in the module where your crew or flow runs:

from entire_adapter import EntireCrewAIListener

entire_listener = EntireCrewAIListener(agent_label="research-crew")

The listener registers handlers for crew kickoff, agent execution, and tool usage events. Tool completions trigger Entire turn-end hooks so file changes can become checkpoints.

External-Agent Protocol

Entire discovers external agents from executables named:

entire-agent-<name>

This package installs:

entire-agent-entire-adapter

So the Entire agent identity is:

entire-adapter

Protocol commands include:

entire-agent-entire-adapter info
entire-agent-entire-adapter detect
entire-agent-entire-adapter parse-hook --hook turn-end < payload.json
entire-agent-entire-adapter read-transcript --session-ref .git/entire-adapter/sessions/demo.jsonl
entire-agent-entire-adapter compact-transcript --session-ref .git/entire-adapter/sessions/demo.jsonl

Metadata And Reasoning

The adapter writes an append-only JSONL transcript outside the worktree when possible:

.git/entire-adapter/sessions/<session-id>.jsonl

Each record includes:

  • framework
  • agent_label
  • session_id
  • callback/event metadata
  • prompt text
  • tool name
  • tool input
  • tool output or error
  • assistant/LLM text when available

Entire reads this transcript through the external-agent protocol so reasoning context can be displayed alongside file changes.

Agent Identity

Entire sees one external agent:

entire-adapter

Distinct user agents are separated by generated session IDs and metadata:

langgraph-reviewer-77f263df4f684baf
crewai-research-crew-77f263df4f684baf

Use agent_label to identify the specific agent or workflow in your project.

Graceful Degradation

By default, the adapter never crashes your agent if Entire is unavailable. It logs one warning and continues when:

  • entire is not installed or not on PATH
  • the current directory is not an Entire-enabled Git repo
  • an Entire hook command exits non-zero
  • a hook call times out

Use strict=True if you want those failures to raise:

EntireCallbackHandler(strict=True)
EntireCrewAIListener(strict=True)

Verification

Run tests:

python -m pytest -q

Build and check the package:

python -m build
python -m twine check dist/*

Manual live checkpoint test commands are in adapter_live_test/README.md.

After running an agent that edits files:

git status
git add .
git commit -m "test entire adapter"
entire checkpoint list --session "$SESSION_ID"

Use the real session ID printed by the adapter, not an angle-bracket placeholder.

Live MVP Result

A local live test validated the full path:

LangGraph callback -> Entire Adapter -> Entire hook -> Git commit linkage -> Entire checkpoint list

The successful checkpoint output included:

branch       master
session      langgraph-live-test-77f263df4f684baf
checkpoints  1

● e23a3f26c8c4  "Create a visible file change for Entire checkpoint testing."

Development

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[langgraph,crewai,dev]"
python -m pytest -q

Release notes are in CHANGELOG.md. Architecture/interview notes are in docs/INTERVIEW_BRIEF.md.

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

entire_adapter-0.1.0.tar.gz (23.9 kB view details)

Uploaded Source

Built Distribution

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

entire_adapter-0.1.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file entire_adapter-0.1.0.tar.gz.

File metadata

  • Download URL: entire_adapter-0.1.0.tar.gz
  • Upload date:
  • Size: 23.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for entire_adapter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 feb592ca497e89bfed56fe01af25690425894adc1e5b7b7761d7928982d35dad
MD5 b3cfaecb0c2626e6d0e5120ea4346d72
BLAKE2b-256 c58581771a5af12489b75ac2d999b2a9c6890f3f8231359ce16149297656a393

See more details on using hashes here.

Provenance

The following attestation bundles were made for entire_adapter-0.1.0.tar.gz:

Publisher: publish.yml on suhaanthayyil/entire-adapter

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

File details

Details for the file entire_adapter-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: entire_adapter-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for entire_adapter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 355851d159d6490b9cbe6a637ff4e0d9f553e4623ffc04051a6815079c3bd99e
MD5 7aa7f39d1cac31fca9ccb35c562af243
BLAKE2b-256 747027ee3a48f099f16a985e4e2ccff39cba29fc70544789883be5159a85aad4

See more details on using hashes here.

Provenance

The following attestation bundles were made for entire_adapter-0.1.0-py3-none-any.whl:

Publisher: publish.yml on suhaanthayyil/entire-adapter

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