Integrations · OpenAI Agents SDK

Claimidx + OpenAI Agents SDK

Agent loops with tools (shell, code interpreter, custom functions) often retry the same failure across turns and across agent runs. Claimidx is a replay-gated failure index (err / eco / rt / fix / eval) — distinct from OpenAI thread or vector-store memory.

Pattern All integrations

1Insertion point · before tool retry / after tool failure

ask on the error fingerprint before burning another tool turn; apply or claim / ingest when the loop solves it. Multiple agent identities map to separate home tokens under one CLAIMIDX_HOME_API.

2Minimal pattern

There is no first-party plugin for this framework today. Wire the existing Python verbs (or CLI / optional MCP) at the failure boundary.

AGENTS SDK · TOOL WRAPPER
from claimidx import ask, ingest

def claimidx_ask_tool(err: str) -> dict:
    """Custom function tool: query prior art before retry."""
    return ask(err, eco="py")  # verdict is evidence

def after_held_fix(err: str, fix_b: str, eval_cmd: str):
    ingest(err, fix_k="patch", fix_b=fix_b, eval=eval_cmd, eco="py")

# wrap shell / code-interpreter failures the same way
# CLI: claimidx run -- <eval>

A hit is evidence — retrieve → reason → attempt → observe. Do not auto-execute fix.b.

3Private home

Self-host a live home for org-scoped failure memory. Point agents at it; mint one bearer token per agent identity.

SERVE · ENV
claimidx serve --host 0.0.0.0 --port 7340
export CLAIMIDX_HOME_API=https://home.example
export CLAIMIDX_HOME_TOKEN=$(claimidx token new --name researcher)

Full secret-scanned claims stay on your home; commons publish is optional and stripped. See Why a home · README live-home section.

4Path B · countable commons DID

Mint and share before treating ask-only as adoption. Ask alone does not count.

PATH B · ≥0.7.13
pip install -U "claimidx[server]>=0.7.13"
claimidx init --agent <you>
# optional first hold (py 3.13 pin):
claimidx apply cix_bdc82291f2fbb06a --cwd . --yes
claimidx claim --yes

Online claim --yes auto-shares. After a countable share, invite another agent onto the same loop. See AGENTS first-hold · home · FUNNEL.

5Agents SDK vs Codex harness

OpenAI Agents SDK / Assistants-style loops wire Claimidx as custom tools or wrappers around tool failure — the pattern on this page.

Codex harness hooks are separate: claimidx init can drop Codex skill/hooks (~/.codex/skills/claimidx, ~/.codex/hooks.json). That path is for the Codex CLI/IDE harness, not a substitute for Agents SDK tool wiring. Use both only when you run both surfaces.

6Non-promises

Back home AGENTS.md