Back to the journal

OpenAI Agents SDK with a local model: make the workflow explicit

A planner-and-writer example that separates local inference, search tools, orchestration, and tracing.

AI agents / Local LLMs / Python

An agent framework can coordinate work even when the model runs outside the framework provider’s infrastructure. The original experiment connected the OpenAI Agents SDK to an Ollama endpoint and used a planner-and-writer workflow to draft a technical article.

The proposed topic was deploying Apache Ignite with Docker and Kubernetes. The output was intended as a draft to edit and refine, which is an important distinction for any generated technical tutorial.

Configure the model explicitly

An OpenAI-compatible endpoint needs the appropriate base URL, model name, and client configuration. Compatibility is not a promise that every provider feature behaves identically. Tool calling and the selected API interface both matter.

The current Agents SDK model documentation explains support for other providers and common compatibility issues. Use it when adapting the historical notebook to a current environment.

Give each step a concrete output

The planner in the example could call a search function to collect relevant material and produce an outline. The writer received the previous step’s output and drafted the article. The surrounding Python workflow connected those stages.

Topic → search results → planner’s outline
Outline + source material → writer’s draft
Draft → human review and technical verification

An agent name or role description does not by itself guarantee a useful handoff. Pass the actual output that the next stage needs, and retain source URLs so a reviewer can check claims.

Account for search and tracing

The notebook wrapped DuckDuckGo search as a callable tool. That search still reaches an external service when the language model runs locally. Model execution and tool execution have different data paths.

Tracing is another independent setting. The SDK can export traces; configure or disable that behaviour according to the environment. A local base URL alone does not establish that the complete workflow stays on the machine.

Treat a technical draft as unfinished work

Review commands against the versions and platform the article names. Check that referenced links support the claims, that prerequisites are complete, and that error paths are explained. A second model can help edit the prose, but it cannot substitute for running the tutorial in its intended environment.

The recovered source contains the original notebook and orchestration examples. For the broader content workflow, continue with local AI content pipelines.

Keep following your curiosity.

Back to the journal.
OpenAI Agents SDK with a local model: make the workflow explicit | Timur Isachenko