Seven Mental · 心智七篇
← Knowledge Atlas · Entity

OpenAI

AI 研究公司,GPT 和 Codex 开发者,harness engineering 的重要实践者
ENTITY · OPENAI · GPT · CODEX · HARNESS ENGINEERING · AGENT LEGIBILITY

OpenAI

AI research company — practitioner of the extreme “all-agent development” stance and a primary source for the Harness Engineering methodology

Starting from the extreme position that “the agent is the primary developer,” OpenAI has developed distinctive harness-engineering insights: the repository as a knowledge system, code optimized for agent legibility rather than human readability, and Codex as an implicit-loop architecture. In 2024, Structured Outputs drove format-error rate from ~11.97% down to <0.1%.

Harness Engineering Core Insights
Agent LegibilityOptimize for agent readability — code and documentation should be organized for agents to understand, not just humans
Repository as KnowledgeThe code repo is the agent’s knowledge system — structure and naming conventions are key navigation signals
Codex Implicit LoopCloud sandbox + bidirectional JSON-RPC — the implicit-loop architecture realized in a production coding agent
Structured Outputs (2024)
JSON Schema → CFG
Compile JSON Schema into a context-free grammar, constraining token sampling at inference time
11.97% → 0.1%
Format error rate drops from 11.97% (JSON mode) to 0.1% (Structured Outputs hits 0% on evals)
CFG, not FSM
Supports recursively nested JSON Schema structures — an FSM cannot express these, a context-free grammar is required
→ Harness Engineering · Implicit Loop Architecture · Codex · Structured OutputsOpenAI (2024)

OpenAI

AI 研究公司,GPT 系列模型和 Codex agent 平台的开发者。

与本 wiki 的关联

OpenAI 是本项目 harness engineering 主题的重要参考来源。其实践从”全 agent 开发”的极端视角提供了独特洞察:

  • Harness engineering 的定义和实践方法论
  • Agent legibility 的概念——为 agent 可读性优化,而非仅为人类
  • Repository 作为知识系统的架构模式
  • 隐式循环架构 的另一种实现(Codex agent loop)

相关实体

  • Codex — OpenAI 的 agent 编码平台
  • Anthropic — 在 harness engineering 领域形成对话的另一家公司

Structured Outputs 与约束解码

2024 年 8 月,OpenAI 发布 Structured Outputs API 功能,将 JSON Schema 编译为上下文无关文法(CFG),并通过约束解码在推理时强制约束 token 采样。该功能将格式错误率从 ~11.97% 降至 <0.1%(evals 中达到 0%),是符号规则约束神经生成的工程化典范。技术上以 CFG 而非 FSM 实现,支持 JSON Schema 的递归结构。

References

  • sources/openai_official/harness-engineering.md
  • sources/openai_official/unlocking-codex-harness.md
  • sources/openai_official/unrolling-codex-agent-loop.md
  • sources/openai_official/practical-guide-building-agents.md
  • sources/openai_official/introducing-structured-outputs-in-the-api.md