In short.
This guide helps Python developers run Pydantic AI agents as background jobs on Render, but the integration can repeat completed work when a job retries. RenderWorkflows places supported model and tool operations in separate task runs with their own status, logs, retries, timeouts and compute plans. The page supplies a local mock example, application submission patterns, deployment instructions and detailed execution constraints. Important limits include JSON serialization, shared-storage requirements, buffered streaming and trusted access to generated tasks. Pricing, licensing and measured performance are not established, and no examples were executed.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage is limited to the complete selected page at [https://pydantic.dev/docs/ai/harness/render-workflows/index.md], retained as selected-page.txt. It includes the walkthrough, deployment instructions, task configuration and naming rules, serialization behavior, capability interactions, execution limits, tracing, API reference and 0.x compatibility notice. All linked documentation and repository contents are excluded. No code was executed, no deployment was performed and no runtime outcomes were verified. Pricing and redistribution permission are not established by this capture.
The overview
identity
The resource is the complete Render Workflows documentation page for Pydantic AI Harness at [https://pydantic.dev/docs/ai/harness/render-workflows/index.md]. It teaches the RenderWorkflows integration through a walkthrough and API reference. The guide is distinct from the underlying Python package and hosted Render service.
assessment
The guide is useful when an agent takes longer than an ordinary web request and individual operations need separate execution settings or inspection. For example, a document-processing tool can receive a longer timeout or different compute plan than surrounding model requests.
The central constraint is recovery behavior. The integration does not save agent progress for resumption: retrying the entry task starts agent.run(...) again. It is a practical fit when repeated work is acceptable or external changes can be deduplicated. Applications requiring checkpointed resumption or live token delivery face documented limitations.
users
The intended readers are Python developers building or maintaining Pydantic AI agents, including web application teams that want to return a job ID immediately and retrieve the answer later. The submitting application can run on Render or another platform.
Beginners can follow the mock example without an LLM API key or Render deployment, although it assumes familiarity with Python files, dependencies, asynchronous functions and terminal commands. Experienced developers receive details on task registration, serialization, capability interactions, retries and tracing.
capabilities
Supported operations become chained task runs with separate status, logs, results and execution settings. Registered operations include model requests, buffered stream requests, compaction, token counts, suspended-response cleanup, function-tool validation and calls, MCP and dynamic toolset operations, event delivery and methods exposed through @durable_operation.
Applications can submit work through Render clients, the CLI or API and retrieve status and results later. A Render cron job can start scheduled entry tasks. Render records task runs, retries, logs and metrics; Pydantic AI instrumentation supplies model and tool traces. The integration adds no OpenTelemetry spans, and parent span context does not propagate across task calls.
Using it
requirements
The documented minimums are Python 3.11, Render CLI 2.28.0 and Render SDK 1.6.0. Installing pydantic-ai-harness[render] supplies the Python SDK and render-workflows executable; the Render CLI is installed separately. Real model requests require the relevant provider dependency and credentials.
Create the agent and its tools at module load time, attach one RenderWorkflows instance per agent and share the same Workflows app throughout. Registered leaf toolsets need stable, unique IDs. Data crossing task boundaries must be JSON serializable; live clients should be constructed inside workers. Tools using ctx.model need an actual model instance registered as the default or through models, rather than only a model-name string.
mechanism
A function decorated with @workflows.task is the entry point and calls agent.run(...). Submitting that function creates a root-level task run. During execution, RenderWorkflows uses TaskContext.run() to start supported operations as chained task runs, each in its own instance. A plain @app.task or an agent call outside the integration's task decorator leaves those operations in the calling process.
Execution options are fixed when task definitions register. A named toolset shares its call and validation definitions, so different per-tool options within that toolset are rejected; tools needing different settings belong in separate named toolsets. Returning False from resolve_tool_options keeps a supported function tool inside the calling task. This opt-out is rejected for MCP and dynamic tools.
Render allows 500 task definitions per workflow service, counting the entry definition and generated definitions. Each definition can produce many task runs. Opting a function tool out of chaining does not remove its shared toolset definitions.
setup
Install the integration with pip install "pydantic-ai-harness[render]" or uv add "pydantic-ai-harness[render]". In app.py, create Workflows(), wrap it with RenderWorkflows(app), add that capability to the agent and place agent.run(...) inside a function decorated with @workflows.task.
Start the local server from the project directory with render workflows dev -- render-workflows app:app, using the activated environment, or prefix the command with uv run. The documented default port is 8120. Local Python clients use RENDER_USE_LOCAL_DEV=1 without a Render API key. Local run history is held in memory and disappears when the server stops.
For hosted execution, the guide describes a repository-backed workflow service with dependency files and a lockfile. Its uv example uses uv sync --locked for the build and uv run render-workflows app:app to start the worker. Provider credentials belong in the worker environment. The submitting application uses RENDER_API_KEY, removes local-development overrides and submits the deployed task's actual slug.
example
The supplied example creates a support agent with TestModel and a mock get_weather tool. TestModel generates sample tool arguments and returns the fixed text 'The workflow completed.'; it does not interpret the weather prompt. The example therefore illustrates orchestration without demonstrating real model reasoning.
The walkthrough submits support through the local CLI, then uses the returned run ID with the status command to retrieve the task's status and result. The page describes a successful result containing 'The workflow completed.' and two model-request task runs plus one weather-tool task run, each linked to the root run through parentTaskRunId. These are documented expectations; no example was executed.
For a web application, the guide proposes starting a task in the request handler, returning its ID with HTTP 202 Accepted and exposing a separate status endpoint. Before returning run details, the application must verify that the run belongs to the requesting user.
Assessment & evidence
limitations
Retries can repeat external actions, including actions completed before their results were recorded. Retrying the entry task restarts the agent, and the integration cannot assign stable idempotency keys to chained calls through the Render SDK. Render task retries, Pydantic AI ModelRetry and provider-SDK retries are separate mechanisms. Render's registered retry delay and backoff do not honor a model error's requested retry_after delay.
Task arguments and results must be JSON serializable. Render limits total arguments for a task run to 4 MB, including integration metadata; the page does not describe this as a result-size limit. Large documents should be stored externally and referenced by ID or URL. Aliased TypedDict and standard-library dataclass fields can fail or disappear during second validation unless their serialized names are accepted; differing serialization and validation aliases also require care.
Model responses and events are buffered until the chained task finishes, so provider tokens do not stream live to the caller. Pydantic AI cancellation tokens are unsupported inside workflows; the documented alternative is Render task cancellation, which does not undo external side effects. Batch-request polling uses ordinary sleeps, keeps the task running and can resubmit a waiting request after an entry-task retry.
Worker-local files and in-memory stores cannot provide shared persistence across instances or entry-task retries. Hosted memory needs a backend accessible to every worker. ToolOutputLimits read_tool_result and grep_tool_result helpers must remain inline with the task holding their results. Sub-agent delegation also needs delegate_task inline; its call limit applies within one active parent run rather than across retries or separate root runs. Immediate capability events requiring a synchronous decision cannot cross the chained-task boundary.
Callers with Workflow API access can invoke generated model and tool tasks directly, bypassing checks in the entry function. Those callers must be trusted to use worker tools and credentials. The page states that Render retains task state, including prompts, responses, tool data and dependencies, for 30 days. Credentials should come from worker environment variables rather than task inputs or results.
reasoning
Separate task instances explain both the integration's usefulness and its constraints. They allow operations to receive different execution settings, but require serializable inputs, shared storage and explicit handling of repeated actions. Persistent task records do not provide checkpointed resumption of the agent loop.
For tools that send messages, write records or call external APIs, application-level deduplication is a central design requirement when repetition would cause harm. Agent usage totals also need careful interpretation: successful chained operations forward usage and buffered events, while failed operations and ModelRetry attempts do not forward those updates. No measured throughput, latency or recovery advantage is established.
alternatives
For background execution alone, the page says a native Render task around agent.run(...) may be sufficient. RenderWorkflows adds separate task runs and settings for supported operations. Within the integration, selected function tools can stay inside the calling task through opt-out settings. The evidence supplies no evaluated comparison with other workflow products or a migration path to checkpointed agent execution.
evidence
The primary evidence is the complete documentation page at [https://pydantic.dev/docs/ai/harness/render-workflows/index.md], captured on 26 November 2026 at 01:37:53.777 UTC and retained as selected-page.txt. It contains installation commands, Python examples, deployment guidance, configuration rules, execution limits and API signatures.
Feature behavior and expected outputs are documentation claims. No commands or code were executed. The supplied evidence contains no linked repository contents, linked-page contents, independent benchmarks or observed execution results, so runtime correctness, performance and reliability remain unassessed.
Access & freshness
costs
Total cost is unknown. The page states that Render schedules and bills generated task runs individually, but supplies no compute rates, provider prices, free-tier terms or cost estimates. Multiple model requests, tools and retries create additional execution work. The mock example requires no LLM API key, which does not establish the price of hosted execution.
rights
The captured page establishes no software license, documentation license or permission to redistribute its contents. Commercial-use and redistribution rights remain unknown. It links to a source repository, but that repository's contents and license are outside the supplied evidence. Render service terms and model-provider terms are also not established here.
freshness
The capture dates the available evidence to 26 November 2026; it does not establish the page's publication or last-update date. The page warns that Pydantic AI Harness is on 0.x releases and its API may change between minor releases, with deprecation warnings and release-note migration guidance. It provides minimum dependency versions but identifies no exact installed package release. Compatibility and service behavior after the capture remain unknown.
actions
Begin evaluation with the documented TestModel walkthrough and inspect the relationship between root and chained task runs. Before connecting real tools, decide which operations may repeat and implement deduplication for writes that must not happen twice. Exercise both a chained-operation failure and an entry-task retry to verify the application's recovery behavior.
Before deployment, confirm current dependency compatibility, licensing and Render and provider rates. Choose task settings with all retry layers in mind, place persistent memory and large artifacts in shared storage, keep credentials on the server and enforce ownership checks when exposing run details. If only background execution is needed, consider the page's simpler native Render task approach.
