Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

Loadout — selects the skills each turn needs from a larger catalog

Per-turn skill selection for deepagents. Load the instructions each turn needs, instead of the full catalog.

CI PyPI Python License: MIT

Quick start · Results · Documentation · Contributing


Why Loadout

Large skill catalogs take up context on every model call. Loadout ranks and verifies skills for each user turn, then loads the relevant instructions or suggests candidates. The agent can also search the catalog with find_skill.

Loadout extends deepagents through LangChain middleware. Its routing core can also be used independently of either framework.

Focused context
Confidence determines what gets loaded or suggested. Every threshold is configurable.

Independent turns
No skill state to carry between turns. No checkpointer or additional storage required.

Your choice of judge
Use the included Jev adapter or implement the small Judge interface.

Graceful fallback
Decision timeouts and transient judge failures restore the full catalog. Configuration errors surface explicitly.

Quick start

1. Install. Requires Python 3.11+. The jev extra includes the judge adapter and its SDK.

pip install "langchain-loadout[jev]"

2. Connect your skills. Place them in ./skills/<name>/SKILL.md with name and description in YAML front matter. Set TYPESAFE_API_KEY and your model provider's credentials (ANTHROPIC_API_KEY for this example).

from deepagents import create_deep_agent
from deepagents.backends import FilesystemBackend

from langchain_loadout.langchain import LoadoutSkillsMiddleware
from langchain_loadout.providers.jev import JevJudge

backend = FilesystemBackend(root_dir=".", virtual_mode=True)
loadout = LoadoutSkillsMiddleware(backend=backend, sources=["/skills/"], judge=JevJudge())

agent = create_deep_agent(
    model="anthropic:claude-sonnet-4-5",
    backend=backend,
    skills=["/skills/"],
    middleware=[loadout],
)
await agent.ainvoke({"messages": [{"role": "user", "content": "I need a statement for the embassy"}]})

Run the example in an async context. Selection runs on ainvoke and astream; synchronous calls use the ordinary skills middleware. Tune thresholds and questions through Settings.

The public API is evolving: minor releases may introduce breaking changes while the version is 0.x.

Results

Latest benchmark on a bank-statement assistant using deepagents and langchain-loadout 0.1.0 from PyPI: 236 skills, 50 conversations × 5 turns per variant (250 turns each).

Metric With Loadout Full catalog
Correct skill selected 82% 61%
Skills section per model call 5,174 characters 89,150 characters
Input tokens per turn 34,630 113,541
Answer accuracy 88% 86%
Cost per turn $0.0056 $0.0039

The skills section was 17.2× smaller, with 3.3× fewer input tokens, but cost per turn was 44% higher. Smaller prompts do not necessarily mean lower cost when cache reuse changes.

These results use generated data, one judge and one agent model; the two-point accuracy difference alone does not establish an accuracy improvement. Fit thresholds to your own data. Earlier measurements and design trade-offs →

Documentation

Read Covers
How it works Selection flow, judge interface, settings and trade-offs
Development guide Architecture, Python conventions and testing
Contributing Local setup, checks, issues and pull requests
Changelog Release history

License

MIT © 2026 Ivan Deyna

Release files for langchain-loadout 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-loadout 0.2.2
File Size Uploaded
langchain_loadout-0.2.2.tar.gz 18.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-loadout 0.2.2
File Interpreter ABI Platform
langchain_loadout-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 42.7 kB

Release files / langchain_loadout-0.2.2.tar.gz

Download URL langchain_loadout-0.2.2.tar.gz
Size 18.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e652474fdfacf7cd3e5e8ca3253834fa313cc971c36cbdb65dc705db0377b8e6
BLAKE2b-256 checksum
How to use checksums
d74adc40376138fc91212bb697be6f7de3a84df609b6900d76b7425d8431448c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.

Transparency log

Release files / langchain_loadout-0.2.2-py3-none-any.whl

Download URL langchain_loadout-0.2.2-py3-none-any.whl
Size 24.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33d2d529a11b06fe9c877f8251357264fa4a219eeff3eb8de9e2ea2802be4037
BLAKE2b-256 checksum
How to use checksums
dc42cf7d39bc03cd6c6af26d56fa229d739009b4aca330a162feabf62f5ea82a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page