{"categories":[{"label":"Artificial Intelligence","url":"https://skillfed.io/packages/category/scientific-engineering-artificial-intelligence/4"}],"enrichment":{"capability":"Trustcall helps LLMs reliably generate and update complex JSON structures by using JSON patch operations instead of full regeneration, with built-in retry logic for validation errors.","skillfed_tags":["llm-tool-calling","json-extraction","structured-output"],"use_cases":["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."],"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.\n\nThe core use case is tool calling workflows\u2014extraction, routing, and multi-step agent tasks\u2014where 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.","worth_installing":"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."},"id":"trustcall","links":{"html":"https://skillfed.io/packages/trustcall","md":"https://skillfed.io/packages/trustcall.md","pypi":"https://pypi.org/project/trustcall/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-04-14","license_spdx":null,"license_treatment":"permissive","name":"trustcall","python_support":"supports_current","summary":"Tenacious & trustworthy tool calling built on LangGraph."},"popularity":{"monthly_downloads":1007549,"position":4522,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.0.39"}
