$npx skillfedfor your agent

trustcall

Tenacious & trustworthy tool calling built on LangGraph.

With conditionsPyPI Artificial IntelligenceReleased Apr 20251.0M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — trustcall-0.0.39-py3-none-any.whl
v0.0.39 · released 2025-04-14 · Python <4.0,>=3.10 · 3 runtime deps: langgraph, dydantic, jsonpatch

Yes, if you're building LLM-driven extraction or tool-calling workflows with complex nested schemas. The patch-based approach genuinely solves real problems (validation failures on nested structures, information loss on updates) that naive regeneration doesn't handle well. Install friction is low and there are no known vulnerabilities. Monitor the aging maintenance status, but the last release is recent enough that the package is not abandoned.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later and a configured LLM provider with API credentials.
  • Low install friction with a pure-Python wheel.
  • Maintenance status is aging—last release was 2025-04-14 and the package is 487 days old—so monitor for updates, but no critical signals present.

License · maintenance · safety

MIT (permissive) — MIT license is permissive; you can use, modify, and distribute trustcall freely in commercial and private projects with minimal restrictions.

last release 2025-04-14 (487 days)

0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,007,549 downloads/mo, #4,522 on PyPI

Verify before relying

pip install trustcall

from trustcall import create_extractor

extractor = create_extractor(llm, tools=[YourSchema])
result = extractor.invoke("Extract data from: ...")
  • Whether the aging maintenance status (487 days since first release) signals active maintenance or dormancy.
  • Performance characteristics when handling deeply nested schemas or very large JSON structures.
  • Compatibility with LLM providers other than those shown in documentation examples.
Same gist for agents: .md · .json

What it is and what it does

Trustcall is a LangGraph-based tool for making LLM-driven structured data extraction and updates more reliable and cost-effective. It works by asking LLMs to generate JSON patch operations (RFC 6902) instead of full JSON blobs, which simplifies the generation task and enables iterative, resilient error recovery. The package handles complex, nested Pydantic schemas, schema dictionaries, and Python functions as validation targets, and automatically retries failed extractions by prompting the LLM to generate only the patches needed to fix validation errors.

The core use case is tool calling workflows—extraction, routing, and multi-step agent tasks—where naive LLM JSON generation often fails on complex nested structures or when updating existing objects. By using patches, trustcall reduces both failure rates and token costs: only the parts that failed are regenerated, not the entire output. It depends on langgraph, dydantic, and jsonpatch.

Use it for

  • Extract complex nested user preferences or configuration objects from conversational input without validation errors.
  • Update existing JSON documents (e.g., user profiles, memory records) when an LLM receives new information, avoiding unintended deletions.
  • Build multi-step LLM agent workflows that route between tools or call multiple tools in sequence with reliable structured output.
  • Reduce token costs in extraction tasks by retrying only the failed portions of a schema rather than regenerating the entire output.
  • Handle LLM tool calling where the schema is too complex for strict mode or standard JSON schema parsers.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you're building LLM-driven extraction or tool-calling workflows with complex nested schemas.

The patch-based approach genuinely solves real problems (validation failures on nested structures, information loss on updates) that naive regeneration doesn't handle well. Install friction is low and there are no known vulnerabilities. Monitor the aging maintenance status, but the last release is recent enough that the package is not abandoned.

Install

trustcall on PyPI

Before you install

Low install friction with a pure-Python wheel. Maintenance status is aging—last release was 2025-04-14 and the package is 487 days old—so monitor for updates, but no critical signals present.

Requires Python 3.10 or later and a configured LLM provider with API credentials.

License in practice

MIT license is permissive; you can use, modify, and distribute trustcall freely in commercial and private projects with minimal restrictions.

Quickstart

pip install trustcall

from trustcall import create_extractor

extractor = create_extractor(llm, tools=[YourSchema])
result = extractor.invoke("Extract data from: ...")

Verify before relying

  • Whether the aging maintenance status (487 days since first release) signals active maintenance or dormancy.
  • Performance characteristics when handling deeply nested schemas or very large JSON structures.
  • Compatibility with LLM providers other than those shown in documentation examples.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release <4.0,>=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
3 packages
langgraphdydanticjsonpatch
MaintenanceAging 487 days since the last release
First released
Downloads1,007,549 / month, #4,522 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14

Evidence: trustcall-0.0.39-py3-none-any.whl

Tags

Capabilities
llm json schema extractionstructured output generationjson patch tool callinglanggraph structured extractionllm validation error recovery
Topics
llm-tool-callingjson-extractionstructured-output

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “llm json schema extraction”

  • trustcallTrustcall helps LLMs reliably generate and update complex JSON…
  • instructorInstructor wraps LLM APIs to extract validated, typed structured data…
  • outlinesOutlines constrains LLM generation to produce structured outputs…

Give your agent the search over MCP, or paste the wish link into any chat.

More Artificial Intelligence packages

litellm With conditions
PyPI · Artificial Intelligence · released Aug 2026

LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.

Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.

MITcompiled wheel
682.8Mdownloads / mo
huggingface-hub Worth it
PyPI · Artificial Intelligence · released Aug 2026

Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.

Install it if you work with Hugging Face Hub models or datasets.

Apache-2.0pure Python · 3.10.0+
442.4Mdownloads / mo
langchain Worth it
PyPI · Python Modules · released Aug 2026

LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.

MITpure Python
315.4Mdownloads / mo
hf-xet With conditions
PyPI · Artificial Intelligence · released Aug 2026

hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.

Apache-2.0compiled wheel · 3.8+
258.4Mdownloads / mo
tokenizers Worth it
PyPI · Artificial Intelligence · released Apr 2026

Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.

Apache-2.0compiled wheel · 3.10+
222.9Mdownloads / mo
transformers Worth it
PyPI · Artificial Intelligence · released Aug 2026

Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.

Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.

permissive licensepure Python · 3.10.0+
186.6Mdownloads / mo

See also instructor · outlines · langextract · lm-format-enforcer · voluptuous-serialize · jsonquerylang · jambo · langchain-together · cleanlab-tlm · agentevals

Further reading