Repository navigation
Add a durable PydanticAI agent example - #100
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a runnable Python agent using PydanticAI in Cellar's embedded CPython host. A named cell accepts a task, checkpoints model messages and deferred tool calls, applies its
save_notetool and receipt atomically, then resumes from durable alarms until it saves the answer. Duplicate submissions replay the acceptance receipt; conflicting input is refused. Cancellation fences late model results.The default uses PydanticAI's deterministic FunctionModel and needs no credentials. Explicit configuration enables OpenAI with an invocation-owned client. Attempts are charged durably before model I/O; retries, steps, history and tool output are bounded. Provider exceptions are sanitized. Interrupted model calls may repeat and incur charges; the example makes no exactly-once provider-call or arbitrary external-side-effect claim.
Include a walkthrough, locked/hash-verified dependencies, a source/runtime inventory descriptor, a compiled host, a verified package command and standard/free-threaded CI jobs. Extract the existing FastAPI package builder into a shared helper while retaining its CLI. Also carry forward the previously prepared Raft recovery failure contexts, without changing assertions, deadlines or runtime behavior.
Validation:
No paid live model calls or multi-node agent failover qualification were performed. The new Linux CI matrix must validate this PR head. Earlier membership/snapshot suites passed for the carried-forward diagnostic-only commit; those diagnostics do not claim to fix the older intermittent qualification failures.