study8677

OpenAI Agent Runtime — Design skill for Claude Code

Design community

An opinionated Agent Runtime built on top of the OpenAI Agent SDK, inspired by Claude-style agent programming.一个构建在 OpenAI Agent SDK 之上的、具有强约定的 Agent 运行时框架,设计理念源自 Claude 风格的 Agent 编程模型.

How to install OpenAI Agent Runtime

This entry records only its repository, not the path inside it, so there is no exact command to give. Open study8677/openai-agent-runtime and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What OpenAI Agent Runtime does

An opinionated Agent Runtime built on top of the OpenAI Agent SDK, inspired by Claude-style agent programming.一个构建在 OpenAI Agent SDK 之上的、具有强约定的 Agent 运行时框架,设计理念源自 Claude 风格的 Agent 编程模型。

Alternatives in Design

  • Brand Guidelines — Apply Anthropic's official brand colors and typography to artifacts 94.1k ★
  • Planning With Files — Claude Code skill implementing Manus-style persistent markdown planning — the workflow pattern behind the $2B 17.4k ★
  • Explanatory Output Style — Educational output mode with insights about implementation choices 14k ★

README

OpenAI Agent Runtime

[English](README.md) | [中文](README_zh.md)

**Agent Runtime** is an advanced execution engine built on top of the `openai-agents-python` SDK. It is designed to fill the gap in building long-running, stateful, and recoverable agent applications, providing capabilities similar to Anthropic's Claude Desktop or production-grade agent systems.

🌟 What We Built

While the native SDK (`Runner`) provides a basic execution loop, **Agent Runtime** extends it with critical engineering features required for real-world applications:

1. 🛡️ Robust Lifecycle Management

We introduced a structured **Phase** system to track the agent's exact state:

  • INIT: Runtime configuration and initialization.
  • PLANNING: Agent reasoning and LLM invocation.
  • EXECUTING: Tool execution phase.
  • OBSERVING: Processing tool results and environment feedback.
  • TERMINATED / FAILED: Explicit terminal states.

2. 💾 Dual-Layer Persistence

To satisfy both machine replayability and human readability, we implemented a dual-write logging system:

  • Machine Layer (events.jsonl): A structured event stream recording every state change. Used for debugging stats or precise replay.
  • Human Layer (trace.md): A real-time Markdown rendering of the execution trace. Read the agent's thought process and tool outputs like an article.

3. ⏯️ Checkpoint & Resume

This is the core capability of the Runtime. The engine automatically saves a **Checkpoint (`state.json`)** after every key operation (like tool execution).

  • Zero State Anxiety: Even if the process crashes or is interrupted, the Agent's memory (Conversation History) and current state (Turn Index) are preserved.
  • Hot Resume: Simply use resume_from="run_id" to instantly restore the previous session state and continue execution.

4. 🔌 MCP & Local Model Support

  • MCP Host: Native integration with the Model Context Protocol, allowing direct mounting of standard MCP Servers (e.g., Filesyst