This project has been archived by its maintainers, and is no longer receiving any updates.
Per-turn skill selection for deepagents. Load the instructions each turn needs, instead of the full catalog.
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 |
Independent turns |
|
Your choice of judge |
Graceful fallback |
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.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| langchain_loadout-0.2.0.tar.gz | 17.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langchain_loadout-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 40.7 kB
Release files / langchain_loadout-0.2.0.tar.gz
| Download URL | langchain_loadout-0.2.0.tar.gz |
|---|---|
| Size | 17.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cfbff356e353a44de26ab54ca6752b0227eb2970741be019d279b7d98e25c8a5
|
|
BLAKE2b-256 checksum How to use checksums |
9d1d0aa8f73d53508100624de15af4c63ce9eca14b46f30a13f897585996a609
|
| 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 logRelease files / langchain_loadout-0.2.0-py3-none-any.whl
| Download URL | langchain_loadout-0.2.0-py3-none-any.whl |
|---|---|
| Size | 23.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1808e5ade218b02df1d0f628fb4c67a4791cc9407c5632b48fece25799291047
|
|
BLAKE2b-256 checksum How to use checksums |
383b695d5c3480309d37591542312947bbcaa98cb32f2ab5aa28fa0e63ecc791
|
| 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