I’ve been experimenting with the async and sandbox capabilities in the OpenAI Agents SDK, to build advanced agentic systems.
I built a Financial Research agent where a Lead delegates document analysis and web research work to specialized helper agents. While the helpers work in parallel, the Lead continues researching and brings their findings together into a report.
Each helper has its own workspace and sandbox execution environment powered by @microsandbox.
This opens up interesting possibilities for building self-hosted agentic systems that combine parallel execution, isolation and a coordinated experience.
The demo below analyses Microsoft’s public financial reports.
We often talk about context engineering in terms of tokens, tools, and retrieval. I think UI is another important part of that equation.
A good visual interface is essentially compressed context. Instead of processing large amounts of raw information, an agent can understand what’s happening, what matters, and what to do next.
With sandbox and computer-use capabilities becoming more common, we are moving from building UIs with agents in them to building UIs that agents can use.
Agent-usable UI is an interesting design problem that deserves more attention.
I’ve been experimenting with the async and sandbox capabilities in the OpenAI Agents SDK, to build advanced agentic systems.
I built a Financial Research agent where a Lead delegates document analysis and web research work to specialized helper agents. While the helpers work in parallel, the Lead continues researching and brings their findings together into a report.
Each helper has its own workspace and sandbox execution environment powered by @microsandbox.
This opens up interesting possibilities for building self-hosted agentic systems that combine parallel execution, isolation and a coordinated experience.
The demo below analyses Microsoft’s public financial reports.
Today’s models are capable of recovering from tool failures and exploring different options to complete the run. But too many failures can affect model reasoning. We call it context rot.
Don’t treat model like a black box. For reliable results, inspect the context and try to keep it clean.
A picture is worth a thousand words.
Telemetry like agent traces, token usage and tool call details are good for improving agentic systems.
Have Claude Code build a dashboard for that data and it becomes immensely useful to find issues and improve system efficiently.
In this picture tool calls from agents are failing. Claude spots the key issues from dashboard and fixes them iteratively.
A picture is worth a thousand words.
Telemetry like agent traces, token usage and tool call details are good for improving agentic systems.
Have Claude Code build a dashboard for that data and it becomes immensely useful to find issues and improve system efficiently.
In this picture tool calls from agents are failing. Claude spots the key issues from dashboard and fixes them iteratively.
Architecture for self-hosted agents: @OpenAI Agents SDK + Agent Substrate on @Kubernetes. A good fit for secure, scalable enterprise agent platforms.
Harness (runs the agent loop)
• OpenAI Agents SDK, SDK sessions for history
• ChatKit for the streaming UI, or a terminal chat
• OpenTelemetry → Jaeger
• Owns credentials, conversation state, suspend/resume, host checks of outputs
Sandbox (runs the tools)
• One Agent Substrate Actor per conversation thread
• Shell, files, skills and agent-written code, isolated from the harness
• Suspended after every turn: the snapshot frees the worker, the next message resumes it
The harness never shares a process with the sandbox. Code execution and file access cross the boundary; the loop, model calls and orchestration stay on the harness side. A compromised tool can't reach the harness's credentials or conversation state. Tools that need credentials, like read-only cluster access, run in the harness and hand their output to the sandbox as evidence.
Example: Document Intelligence agent
1. A thread's first message creates its Actor; uploaded PDFs are extracted and rendered inside it.
2. The model reads pages, views charts and writes Python, all executed in the Actor.
3. Results stream back; the host checks every quote against the cited page.
4. After the turn, the Actor is suspended; its durableDir keeps extracted pages, scripts and outputs.
5. The next message resumes the same Actor in seconds instead of re-parsing.
Raw documents and intermediate work stay in the sandbox, and suspended Actors hold no CPU. On two small workers, 8 analyses run at once and the rest wait their turn instead of failing.
When building long-running, persistent AI agents that operate over hours, days, or weeks, keeping the main context window small is the fundamental architectural requirement to prevent "context rot" and reasoning degradation.
Build harness to effectively maintain a small main context while preserving continuity, aka Context Engineering.
PC: @leerob
Using Dots as a persistent agent to manage coding tasks through Codex.
- Dots (Astra) for intelligence, planning, orchestration, and continuity.
- Codex (Sol) for implementation, testing, and debugging.
Dots owns the outcome. Codex handles execution.
In knowledge work (ex: dealing with documents), model output can differ on every run. I ensure reliability by verifying whether the output holds semantic relevance and represents necessary facts, using Evals. When quality is not met, output is routed to a correction loop, or SME review.
How are you ensuring reliability of your agent output?
Architecturally, LLMs have inherent gaps compared to traditional software, but they are closer to how humans operate.
Agents must be designed to emulate systems that strive for the best-quality outcomes, rather than necessarily being 100% correct every time.
@OpenAI Dots helped me get substantial work done early on. As work accumulated, continuity got worse: lost project context, trouble locating outputs, voice requests failing while text worked. Can the team investigate? Happy to share examples privately.
Self-improving Agents !!
In an earlier post, I shared how I designed agent harness around a simple principle: “treat model as intelligence provider”.
A model can reason, generate, and make decisions, but how we make agents responsible for the quality of their own work?
One of the core capabilities I’ve implemented in harness is a self-improvement loop:
Generator → Examiner → Correction → Re-examination
With examination and correction built into the agent workflow, quality no longer depends entirely on getting the best possible result from a single model invocation. Models can be swapped or upgraded while the agent maintains the same quality contract.
Here,
- model supplies intelligence.
- agent uses that intelligence to execute tasks and meet a defined quality bar.
- harness provides the execution environment, permissions, isolation, observability, and handoffs.
That’s how I’m building trust with increasingly capable agentic systems.