Pydantic AI Absurd
Durable execution for Pydantic AI agents, on Postgres alone.
Agents run for a while, a model call, a tool call, another model call. When the worker dies in the middle of that, the run is usually lost: you restart from zero and pay for every token again.
Pydantic AI Absurd fixes that. Call agent.run() inside a durable task and every model and MCP call is checkpointed into Postgres. If the worker crashes, a new one resumes from the last completed step, no restart, no re-spent tokens. Same idea as Pydantic AI's Temporal integration, but with no Temporal, no Redis, no broker: just the Postgres you already have.
Installation
pip install pydantic-ai-absurd
Example
import asyncio
from absurd_sdk import AsyncAbsurd
from pydantic_ai import Agent
from pydantic_ai_absurd import AbsurdDurability
absurd = AsyncAbsurd("postgresql://localhost/absurd", queue_name="agents")
agent = Agent("openai:gpt-5.2", name="analyst", capabilities=[AbsurdDurability()])
@absurd.register_task(name="analyse")
async def analyse(params, ctx):
result = await agent.run(params["prompt"])
return {"output": result.output}
async def main():
await absurd.spawn("analyse", {"prompt": "Analyse Q3 revenue"})
await absurd.work_batch(batch_size=1)
if __name__ == "__main__":
asyncio.run(main())
You author a task, call the agent inside it, and run it durably. That's the whole idea.
Documentation
Read the docs at kludex.github.io/pydantic-ai-absurd, a step-by-step tutorial, how durability actually works, tools and MCP servers, and a production guide.
Metadata
Release files for pydantic-ai-absurd 0.8.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 | Provenance | Actions |
|---|---|---|---|---|
| pydantic_ai_absurd-0.8.0.tar.gz | 12.5 kB | Without provenance | Details for pydantic_ai_absurd-0.8.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pydantic_ai_absurd-0.8.0-py3-none-any.whl | Python 3 | none | any | Details for pydantic_ai_absurd-0.8.0-py3-none-any.whl |
Total release size: 28.8 kB
Release files / pydantic_ai_absurd-0.8.0.tar.gz
| Download URL | pydantic_ai_absurd-0.8.0.tar.gz |
|---|---|
| Size | 12.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
53057c3bb3db9815fcf2f0a97271a3ffa0054322edf3a93593796f0df9b18162
|
|
BLAKE2b-256 checksum How to use checksums |
89c1cc45f268e9b6638c8ffd285578875bbae11b035f15e22179c6556103edb2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.12 {"installer":{"name":"uv","version":"0.9.12"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pydantic_ai_absurd-0.8.0-py3-none-any.whl
| Download URL | pydantic_ai_absurd-0.8.0-py3-none-any.whl |
|---|---|
| Size | 16.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
91d643c6a260fc04df02271a25bfe700bd1d81460c437ac38a18fbd2e8474c58
|
|
BLAKE2b-256 checksum How to use checksums |
dcf5e2cca131ae20372a66c503f026d51f3d1d442878e60d0faf0ad3969fd589
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.12 {"installer":{"name":"uv","version":"0.9.12"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for pydantic-ai-absurd 0.8.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.