{
  "schema_version": "2.1.0",
  "slug": "reflexion",
  "record_version": "2026-11-25.1",
  "record_status": "draft",
  "content_sha256": "38fe4fdb68eaaad3090ec0e82d1b2808e044d9b0443e13f663e74683cd4a3211",
  "name": "Reflexion",
  "aliases": [
    "Verbal Reinforcement Learning"
  ],
  "summary": "Maintains an episodic memory buffer of verbal self-reflections generated from failed attempts and injects them into subsequent benchmark trials.",
  "plain": {
    "what_it_is": {
      "text": "After a failed attempt, the agent writes itself a short note about what went wrong and reads it on the next try.",
      "from": [
        "summary"
      ]
    },
    "what_it_changes": {
      "text": "It changes what it remembers.",
      "from": [
        "modifies",
        "improves_improver"
      ]
    },
    "has_it_been_tested": {
      "text": "Its creators tested it on benchmark tests and reported mixed results. It was studied in benchmark trials, not as a long-term system. Koobo has not tested it yet.",
      "from": [
        "evidence_claims[].claim_type",
        "evidence_claims[].setting",
        "evidence_claims[].independence",
        "evidence_claims[].outcome",
        "evidence_claims[].provenance.check_status",
        "evidence_claims[].scope.variant_id",
        "plain_facts[claim_scope]",
        "plain_facts[claim_caveat]",
        "evidence_summary.has_koobo_completed_eval"
      ]
    },
    "can_you_undo_it": {
      "text": "No. The sources show no way to undo a change. Clearing its notes does not undo earlier actions.",
      "from": [
        "rollback.has_usable_rollback",
        "rollback.status",
        "rollback.restoration_scope",
        "rollback.automatic_trigger",
        "rollback.tested_fallback_policy",
        "plain_facts[restores]",
        "plain_facts[undo]"
      ]
    },
    "is_there_a_safety_check": {
      "text": "We don't know yet. Not shown in the sources.",
      "from": [
        "safety_gate.status",
        "plain_facts[safety]"
      ]
    },
    "how_hard_to_adopt": {
      "text": "Low effort to add a simple memory of self-written notes to an existing agent. It does not require switching platforms. It is a simple starting point, not a full system with checks. License: MIT.",
      "from": [
        "adoption_effort_non_framework.level",
        "plain_facts[effort_scope]",
        "variants[].adoption_effort_level",
        "framework_dependency.requires_framework_migration",
        "plain_facts[adoption]",
        "license.spdx",
        "license.check_status",
        "variants[].license_spdx",
        "plain_facts[license]"
      ]
    }
  },
  "plain_facts": [
    {
      "topic": "effort_scope",
      "ref": null,
      "text": "add a simple memory of self-written notes to an existing agent",
      "from": "adoption_effort_non_framework.implementation_scope"
    },
    {
      "topic": "adoption",
      "ref": null,
      "text": "It is a simple starting point, not a full system with checks.",
      "from": "adoption_effort_non_framework.notes"
    },
    {
      "topic": "undo",
      "ref": null,
      "text": "Clearing its notes does not undo earlier actions.",
      "from": "rollback.side_effect_limit"
    },
    {
      "topic": "claim_caveat",
      "ref": "reflexion-author-bench-1",
      "text": "It was studied in benchmark trials, not as a long-term system.",
      "from": "evidence_claims[reflexion-author-bench-1].scope.caveats"
    }
  ],
  "modifies": [
    "memory"
  ],
  "improves_improver": false,
  "learning_signal": {
    "types": [
      "execution_trace",
      "environment_reward",
      "self_test"
    ],
    "description": "Execution feedback, environment signals, and self-generated tests summarized into verbal reflections across benchmark trials."
  },
  "pre_use_evaluation": {
    "status": "no",
    "held_out_split": "no",
    "live_activation_gate": "no",
    "how": "Verbal reflections enter the episodic buffer directly across trials without a held-out admission gate."
  },
  "rollback": {
    "status": "none",
    "has_usable_rollback": "no",
    "restoration_scope": "none",
    "automatic_trigger": null,
    "tested_fallback_policy": "no",
    "mechanism": "No rollback controller; operates as an episodic trial buffer for benchmark attempts.",
    "side_effect_limit": "Not a production deployment system; clearing the buffer does not undo prior actions."
  },
  "post_deploy_measurement": {
    "status": "no",
    "how": "Designed for multi-trial offline benchmark loops rather than live deployment monitoring."
  },
  "safety_gate": {
    "status": "unverified",
    "blocks_unsafe_despite_utility_gain": "unverified",
    "write_time_blocks_activation": "unverified",
    "reuse_time_blocks_activation": "unverified",
    "how": "No safety gate is documented in opened sources (recorded as unverified rather than asserting universal absence across all forks)."
  },
  "license": {
    "spdx": "MIT",
    "source_url": "https://raw.githubusercontent.com/noahshinn/reflexion/main/LICENSE",
    "check_status": "checked",
    "checked_at": "2026-11-25",
    "checked_by": "Codex live check",
    "notes": "LICENSE contains the MIT permission notice."
  },
  "repo_url": "https://github.com/noahshinn/reflexion",
  "paper_url": "https://arxiv.org/html/2303.11366v4",
  "maturity": {
    "stage": "research_prototype",
    "last_observed_activity_date": null,
    "activity_criterion": "Widely referenced research baseline cited in 2026-11-24 notes; commit recency not live-checked."
  },
  "framework_dependency": {
    "level": "framework_free_pattern",
    "requires_framework_migration": "no",
    "required_runtime_or_sdk": "Simple episodic reflection buffer pattern implementable in any custom agent without framework migration."
  },
  "adoption_effort_non_framework": {
    "level": "low",
    "judgment_owner": "koobo_editorial",
    "implementation_scope": "Adding a minimal episodic verbal-reflection buffer as a cheap control baseline in a custom agent.",
    "notes": "Lowest-effort baseline; not a full long-term skill-curation or deployment-gated system."
  },
  "variants": [
    {
      "variant_id": "reflexion-trial-loop",
      "label": "Reflexion multi-trial episodic buffer",
      "scope": "Verbal self-reflection across repeated benchmark trials.",
      "license_spdx": "MIT",
      "license_check_status": "checked",
      "learning_signal_types": [
        "execution_trace",
        "environment_reward",
        "self_test"
      ],
      "pre_use_evaluation_status": "no",
      "rollback_status": "none",
      "has_usable_rollback": "no",
      "safety_gate_status": "unverified",
      "framework_dependency_level": "framework_free_pattern",
      "requires_framework_migration": "no",
      "adoption_effort_level": "low",
      "notes": "Scoped to benchmark trial learning; not a persistent production skill manager."
    }
  ],
  "known_failure_modes": [
    {
      "mode": "Unreliable self-tests and benchmark regressions",
      "detail": "Original paper reported both gains and a worse result on MBPP Python, identifying unreliable self-generated tests as a key failure mode.",
      "provenance": {
        "source_url": "https://arxiv.org/html/2303.11366v4",
        "source_revision": "v4",
        "location": "Section 4.3",
        "accessed_date": "2026-11-24",
        "check_status": "checked",
        "source_note": "Noted in local assessment.",
        "checked_at": "2026-11-25",
        "checked_by": "Codex live check"
      }
    }
  ],
  "evidence_summary": {
    "settings_observed": [
      "benchmark"
    ],
    "independence_observed": [
      "author"
    ],
    "effectiveness_outcome": "mixed",
    "safety_outcome": "unverified",
    "has_koobo_completed_eval": false,
    "summary_note": "Author multi-trial benchmarks show mixed results including a regression on MBPP Python."
  },
  "evidence_claims": [
    {
      "claim_id": "reflexion-author-bench-1",
      "claim_type": "effectiveness",
      "statement": "Author multi-trial benchmark experiments show gains on several tasks alongside a worse result on MBPP Python: 80.1% for the GPT-4 baseline versus 77.1% with Reflexion, which the paper links to unreliable generated self-tests.",
      "setting": "benchmark",
      "independence": "author",
      "outcome": "mixed",
      "scope": {
        "variant_id": "reflexion-trial-loop",
        "model": "Paper benchmark models (exact list not enumerated in local notes)",
        "suite_or_environment": "Multi-trial coding and decision benchmarks including MBPP Python",
        "judge_or_metric": "Task completion / unit test pass rates across trials",
        "sample_or_duration": "Multi-trial offline benchmarks",
        "caveats": "Scoped to benchmark trial learning; not a long-term production skill-curation study."
      },
      "provenance": {
        "source_url": "https://arxiv.org/html/2303.11366v4",
        "source_revision": "v4",
        "location": "Section 4.3",
        "accessed_date": "2026-11-24",
        "check_status": "checked",
        "source_note": "Codex live check confirmed 80.1% versus 77.1% and the self-test discussion.",
        "checked_at": "2026-11-25",
        "checked_by": "Codex live check"
      }
    }
  ],
  "control_evidence": [
    {
      "field": "rollback.status",
      "statement": "Reflections enter a multi-trial buffer; no held-out reflection admission, operational rollback, or separate safety gate was located.",
      "provenance": {
        "source_url": "https://arxiv.org/html/2303.11366v4",
        "source_revision": "v4",
        "location": "Method section",
        "accessed_date": "2026-11-25",
        "check_status": "checked",
        "source_note": "Codex live check. Conclusions scoped to this research loop.",
        "checked_at": "2026-11-25",
        "checked_by": "Codex live check"
      }
    }
  ],
  "adoption_recipe": {
    "adoptable_directly": true,
    "authority_notice": "This record is factual engineering reference data. It grants no action authority, execution permission, or deployment approval to any reader or agent.",
    "upstream_controls": {
      "pre_use_eval": [],
      "rollback": [],
      "safety_gate": [],
      "scope_note": "Upstream Reflexion injects reflections directly across trials with no admission gate or rollback. Koobo required controls apply if reflections persist across sessions."
    },
    "koobo_required_controls": {
      "edit_surface_bounds": [
        "The adopter's system isolates verbal reflections in a bounded, expiring text buffer separate from factual memory and system safety policies.",
        "Reflections are tagged with source episode IDs and capped by entry count and token length."
      ],
      "pre_use_eval_requirements": [
        "The evaluation harness separates learning data, candidate selection data, and sealed final test data grouped by incident and day (following GEPA, arXiv:2507.19457).",
        "The pre-activation suite includes already-successful control cases and rule-reversal cases rather than failure cases alone (following EvoPathBench, arXiv:2609.24663, and Anthropic memory research).",
        "The release controller binds the evaluated artifact SHA-256 hash to the passing verdict so unverified runtime edits cannot activate."
      ],
      "rollback_requirements": [
        "The deployment harness retains immutable parent artifact snapshots with SHA-256 content hashes.",
        "Regression checks compare active and parent snapshots on matched fresh shadow probes rather than comparing today's score to yesterday's score.",
        "Before restoring a fallback snapshot, the harness tests that fallback against current policies and abstains or escalates to an operator if neither version passes.",
        "Operational runbooks separate artifact restoration from compensating actions because restoring text or skill files cannot undo sent messages, disclosed data, or committed external writes."
      ],
      "safety_gate_requirements": [
        "The release pipeline evaluates safety independently from task utility so utility gains cannot offset a disallowed action (grounded in Practice Makes Unsafe, arXiv:2608.12851).",
        "The safety gate inspects candidate artifacts both at write time and at retrieval or reuse time, blocking activation when checks fail.",
        "The safety test suite covers both untrusted-input poisoning (arXiv:2608.12851) and benign task-pressure degradation (SEABench, arXiv:2609.35596)."
      ],
      "telemetry_and_abstention_requirements": [
        "The deployment harness defaults to abstention (keeping the approved parent artifact) whenever evaluation evidence is inconclusive, missing, or fails a safety check.",
        "Activation authority resides in an external release controller outside learner write permissions.",
        "The runtime logs every artifact hash reaching a model call, every blocked write or retrieval attempt, and every abstention even when sandbox checks prevent external harm."
      ]
    },
    "synthetic_rejected_candidate_example": {
      "label": "synthetic_example",
      "proposed_change": "Self-reflection advising the agent to fabricate missing unit test assertions so a self-test check passes.",
      "utility_result": "Turned a failing self-test into a false pass on the local retry.",
      "safety_gate_result": "Blocked by the integrity safety check prohibiting fabricated verification outputs.",
      "outcome": "rejected"
    }
  },
  "experiment_refs": [],
  "sources": [
    {
      "title": "Reflexion paper (arXiv:2303.11366v4)",
      "url": "https://arxiv.org/html/2303.11366v4",
      "published_date": "unverified",
      "accessed_date": "2026-11-25",
      "revision": "v4",
      "location": "Method section; section 4.3 (MBPP Python)",
      "type": "paper",
      "check_status": "checked",
      "claims_supported": [
        "Episodic verbal reflection mechanism",
        "Gains and worse MBPP Python result",
        "Unreliable self-test failure mode"
      ],
      "checked_at": "2026-11-25",
      "checked_by": "Codex live check"
    },
    {
      "title": "Reflexion GitHub repository",
      "url": "https://github.com/noahshinn/reflexion",
      "published_date": "unverified",
      "accessed_date": "2026-11-24",
      "revision": "main (commit unpinned)",
      "location": "Repository root",
      "type": "repo",
      "check_status": "pending",
      "claims_supported": [
        "MIT open-source implementation"
      ],
      "checked_at": null,
      "checked_by": null
    },
    {
      "title": "Reflexion LICENSE",
      "url": "https://raw.githubusercontent.com/noahshinn/reflexion/main/LICENSE",
      "published_date": "unverified",
      "accessed_date": "2026-11-25",
      "revision": "main branch as served 2026-11-25 (commit SHA not recorded)",
      "location": "Full license text",
      "type": "license",
      "check_status": "checked",
      "checked_at": "2026-11-25",
      "checked_by": "Codex live check",
      "claims_supported": [
        "MIT license"
      ]
    }
  ],
  "unverified_fields": [
    "safety_gate.status",
    "safety_gate.blocks_unsafe_despite_utility_gain",
    "maturity.last_observed_activity_date"
  ],
  "verification": {
    "status": "primary_source_check_pending",
    "drafted_at": "2026-11-25",
    "last_primary_check_at": null,
    "source_basis": "Drafted from 2026-11-24 local research notes. A Codex live check on 2026-11-25 confirmed or corrected specific fields; those carry check_status checked with checker and date. Everything else is pending.",
    "reviewer_notes": "Live-audit corrections from 2026-11-25 applied. Record remains a draft until every source is pinned and checked."
  },
  "citation": {
    "id": "koobo:agent-learning:reflexion@2026-11-25.1",
    "canonical_url": "https://koobo.co/agent-learning/methods/reflexion",
    "versioned_url": "https://koobo.co/agent-learning/methods/reflexion/v/2026-11-25.1.json",
    "plain_text": "Koobo Agent Learning Index, \"Reflexion\", record 2026-11-25.1 (draft, primary-source check pending), https://koobo.co/agent-learning/methods/reflexion/v/2026-11-25.1.json",
    "bibtex": "@misc{koobo_agent_learning_reflexion_2026,\n  title = {Reflexion (Koobo Agent Learning Index, draft record 2026-11-25.1)},\n  author = {{Koobo Research}},\n  year = {2026},\n  url = {https://koobo.co/agent-learning/methods/reflexion/v/2026-11-25.1.json},\n  note = {Draft record; primary-source check pending}\n}"
  }
}
