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.1

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.1
File Size Uploaded
langchain_loadout-0.2.1.tar.gz 18.0 kB Details

Built distribution (wheel)

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

Total release size: 41.4 kB

Release files / langchain_loadout-0.2.1.tar.gz

Download URL langchain_loadout-0.2.1.tar.gz
Size 18.0 kB
Tags Source
SHA-256 checksum
How to use checksums
70872ba9c9a3f37173f204fbfa8877c7ab73581a52555dea70b1aa75ecbb3d28
BLAKE2b-256 checksum
How to use checksums
a5001e5a63a54e285b5db49a99301239b525759b91d203e88378f730bc4b3915
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.1-py3-none-any.whl

Download URL langchain_loadout-0.2.1-py3-none-any.whl
Size 23.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aea3f99a935944de4a5827182a83878b028a547448d548643bc1c551d2b11985
BLAKE2b-256 checksum
How to use checksums
ee3dfc9ee1dbb35ce5afd3fa949b55ba29cb9f39cced24b59e077dbb64f8bce0
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