{
 "components": {
  "schemas": {
   "AskIn": {
    "properties": {
     "question": {
      "title": "Question",
      "type": "string"
     },
     "scope": {
      "$ref": "#/components/schemas/Scope"
     }
    },
    "required": [
     "question"
    ],
    "title": "AskIn",
    "type": "object"
   },
   "AskOut": {
    "properties": {
     "answer": {
      "title": "Answer",
      "type": "string"
     },
     "evidence": {
      "items": {
       "type": "string"
      },
      "title": "Evidence",
      "type": "array"
     }
    },
    "required": [
     "answer",
     "evidence"
    ],
    "title": "AskOut",
    "type": "object"
   },
   "Bullet": {
    "properties": {
     "content": {
      "title": "Content",
      "type": "string"
     },
     "harmful": {
      "title": "Harmful",
      "type": "integer"
     },
     "helpful": {
      "title": "Helpful",
      "type": "integer"
     },
     "id": {
      "title": "Id",
      "type": "string"
     },
     "issue": {
      "title": "Issue",
      "type": "string"
     },
     "keywords": {
      "items": {
       "type": "string"
      },
      "title": "Keywords",
      "type": "array"
     },
     "neutral": {
      "title": "Neutral",
      "type": "integer"
     },
     "section": {
      "title": "Section",
      "type": "string"
     },
     "sources": {
      "items": {
       "type": "string"
      },
      "title": "Sources",
      "type": "array"
     },
     "status": {
      "title": "Status",
      "type": "string"
     },
     "used": {
      "title": "Used",
      "type": "integer"
     }
    },
    "required": [
     "id",
     "section",
     "content",
     "issue",
     "keywords",
     "helpful",
     "harmful",
     "neutral",
     "used",
     "status",
     "sources"
    ],
    "title": "Bullet",
    "type": "object"
   },
   "BulletIn": {
    "properties": {
     "content": {
      "maxLength": 2000,
      "minLength": 3,
      "title": "Content",
      "type": "string"
     },
     "issue": {
      "default": "",
      "title": "Issue",
      "type": "string"
     },
     "keywords": {
      "items": {
       "type": "string"
      },
      "title": "Keywords",
      "type": "array"
     },
     "section": {
      "default": "steps",
      "enum": [
       "steps",
       "pitfalls",
       "heuristics",
       "verification",
       "snippets",
       "notes"
      ],
      "title": "Section",
      "type": "string"
     }
    },
    "required": [
     "content"
    ],
    "title": "BulletIn",
    "type": "object"
   },
   "BulletRef": {
    "properties": {
     "content": {
      "title": "Content",
      "type": "string"
     },
     "id": {
      "title": "Id",
      "type": "string"
     },
     "section": {
      "title": "Section",
      "type": "string"
     }
    },
    "required": [
     "id",
     "section",
     "content"
    ],
    "title": "BulletRef",
    "type": "object"
   },
   "Changeset": {
    "properties": {
     "agent_id": {
      "title": "Agent Id",
      "type": "string"
     },
     "baseline_score": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "title": "Baseline Score"
     },
     "created_at": {
      "format": "date-time",
      "title": "Created At",
      "type": "string"
     },
     "episode_ids": {
      "items": {
       "type": "string"
      },
      "title": "Episode Ids",
      "type": "array"
     },
     "eval_score": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "title": "Eval Score"
     },
     "id": {
      "title": "Id",
      "type": "string"
     },
     "ops": {
      "items": {
       "additionalProperties": true,
       "type": "object"
      },
      "title": "Ops",
      "type": "array"
     },
     "rationale": {
      "title": "Rationale",
      "type": "string"
     },
     "review_comment": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Review Comment"
     },
     "reviewer": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Reviewer"
     },
     "risk": {
      "title": "Risk",
      "type": "string"
     },
     "safety_findings": {
      "items": {
       "type": "string"
      },
      "title": "Safety Findings",
      "type": "array"
     },
     "source": {
      "title": "Source",
      "type": "string"
     },
     "status": {
      "title": "Status",
      "type": "string"
     }
    },
    "required": [
     "id",
     "agent_id",
     "status",
     "ops",
     "rationale",
     "source",
     "risk",
     "eval_score",
     "baseline_score",
     "safety_findings",
     "episode_ids",
     "reviewer",
     "review_comment",
     "created_at"
    ],
    "title": "Changeset",
    "type": "object"
   },
   "EpisodeIn": {
    "properties": {
     "duration_ms": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Duration Ms"
     },
     "error": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Error"
     },
     "framework": {
      "anyOf": [
       {
        "maxLength": 64,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Framework"
     },
     "idempotency_key": {
      "anyOf": [
       {
        "maxLength": 256,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Idempotency Key"
     },
     "messages": {
      "items": {
       "$ref": "#/components/schemas/Message"
      },
      "title": "Messages",
      "type": "array"
     },
     "metadata": {
      "additionalProperties": true,
      "title": "Metadata",
      "type": "object"
     },
     "outcome": {
      "$ref": "#/components/schemas/Outcome",
      "default": "unknown"
     },
     "recall_id": {
      "anyOf": [
       {
        "maxLength": 64,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Recall Id"
     },
     "scope": {
      "$ref": "#/components/schemas/Scope"
     },
     "session_id": {
      "anyOf": [
       {
        "maxLength": 256,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Session Id"
     },
     "skills_loaded": {
      "items": {
       "type": "string"
      },
      "title": "Skills Loaded",
      "type": "array"
     },
     "task": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Task"
     },
     "tool_calls": {
      "items": {
       "$ref": "#/components/schemas/ToolCall"
      },
      "title": "Tool Calls",
      "type": "array"
     },
     "verification": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/Verification"
       },
       {
        "type": "null"
       }
      ]
     }
    },
    "title": "EpisodeIn",
    "type": "object"
   },
   "EpisodeOut": {
    "properties": {
     "episode_id": {
      "title": "Episode Id",
      "type": "string"
     },
     "reflection_scheduled": {
      "title": "Reflection Scheduled",
      "type": "boolean"
     }
    },
    "required": [
     "episode_id",
     "reflection_scheduled"
    ],
    "title": "EpisodeOut",
    "type": "object"
   },
   "FeedbackIn": {
    "properties": {
     "comment": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Comment"
     },
     "correction": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Correction"
     },
     "episode_id": {
      "maxLength": 64,
      "title": "Episode Id",
      "type": "string"
     },
     "score": {
      "maximum": 1.0,
      "minimum": 0.0,
      "title": "Score",
      "type": "number"
     },
     "source": {
      "default": "user",
      "title": "Source",
      "type": "string"
     }
    },
    "required": [
     "episode_id",
     "score"
    ],
    "title": "FeedbackIn",
    "type": "object"
   },
   "HTTPValidationError": {
    "properties": {
     "detail": {
      "items": {
       "$ref": "#/components/schemas/ValidationError"
      },
      "title": "Detail",
      "type": "array"
     }
    },
    "title": "HTTPValidationError",
    "type": "object"
   },
   "KeyIn": {
    "properties": {
     "name": {
      "title": "Name",
      "type": "string"
     },
     "scopes": {
      "items": {
       "type": "string"
      },
      "title": "Scopes",
      "type": "array"
     }
    },
    "required": [
     "name"
    ],
    "title": "KeyIn",
    "type": "object"
   },
   "Memory": {
    "properties": {
     "agent_id": {
      "title": "Agent Id",
      "type": "string"
     },
     "confidence": {
      "title": "Confidence",
      "type": "number"
     },
     "content": {
      "title": "Content",
      "type": "string"
     },
     "id": {
      "title": "Id",
      "type": "string"
     },
     "invalid_at": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Invalid At"
     },
     "kind": {
      "title": "Kind",
      "type": "string"
     },
     "sources": {
      "items": {
       "type": "string"
      },
      "title": "Sources",
      "type": "array"
     },
     "superseded_by": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Superseded By"
     },
     "user_id": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "User Id"
     },
     "valid_from": {
      "format": "date-time",
      "title": "Valid From",
      "type": "string"
     }
    },
    "required": [
     "id",
     "agent_id",
     "user_id",
     "kind",
     "content",
     "confidence",
     "valid_from",
     "invalid_at",
     "superseded_by",
     "sources"
    ],
    "title": "Memory",
    "type": "object"
   },
   "MemoryIn": {
    "properties": {
     "content": {
      "maxLength": 4000,
      "title": "Content",
      "type": "string"
     },
     "kind": {
      "$ref": "#/components/schemas/MemoryKind",
      "default": "fact"
     },
     "scope": {
      "$ref": "#/components/schemas/Scope"
     }
    },
    "required": [
     "content"
    ],
    "title": "MemoryIn",
    "type": "object"
   },
   "MemoryKind": {
    "enum": [
     "fact",
     "preference",
     "lesson"
    ],
    "title": "MemoryKind",
    "type": "string"
   },
   "MemoryRef": {
    "properties": {
     "content": {
      "title": "Content",
      "type": "string"
     },
     "id": {
      "title": "Id",
      "type": "string"
     },
     "kind": {
      "title": "Kind",
      "type": "string"
     },
     "score": {
      "title": "Score",
      "type": "number"
     },
     "valid_from": {
      "format": "date-time",
      "title": "Valid From",
      "type": "string"
     }
    },
    "required": [
     "id",
     "kind",
     "content",
     "score",
     "valid_from"
    ],
    "title": "MemoryRef",
    "type": "object"
   },
   "Message": {
    "properties": {
     "content": {
      "title": "Content",
      "type": "string"
     },
     "role": {
      "title": "Role",
      "type": "string"
     }
    },
    "required": [
     "role",
     "content"
    ],
    "title": "Message",
    "type": "object"
   },
   "Outcome": {
    "enum": [
     "success",
     "failure",
     "partial",
     "unknown"
    ],
    "title": "Outcome",
    "type": "string"
   },
   "PinIn": {
    "properties": {
     "pinned": {
      "default": true,
      "title": "Pinned",
      "type": "boolean"
     }
    },
    "title": "PinIn",
    "type": "object"
   },
   "RecallRequest": {
    "properties": {
     "as_of": {
      "anyOf": [
       {
        "format": "date-time",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "As Of"
     },
     "include_profile": {
      "default": true,
      "title": "Include Profile",
      "type": "boolean"
     },
     "max_memories": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Max Memories"
     },
     "max_skills": {
      "anyOf": [
       {
        "type": "integer"
       },
       {
        "type": "null"
       }
      ],
      "title": "Max Skills"
     },
     "query": {
      "maxLength": 100000,
      "title": "Query",
      "type": "string"
     },
     "scope": {
      "$ref": "#/components/schemas/Scope"
     },
     "session_id": {
      "anyOf": [
       {
        "maxLength": 256,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Session Id"
     }
    },
    "required": [
     "query"
    ],
    "title": "RecallRequest",
    "type": "object"
   },
   "RecallResponse": {
    "properties": {
     "holdout": {
      "default": false,
      "title": "Holdout",
      "type": "boolean"
     },
     "instructions": {
      "title": "Instructions",
      "type": "string"
     },
     "memories": {
      "items": {
       "$ref": "#/components/schemas/MemoryRef"
      },
      "title": "Memories",
      "type": "array"
     },
     "profile": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Profile"
     },
     "recall_id": {
      "title": "Recall Id",
      "type": "string"
     },
     "skill_index": {
      "items": {
       "$ref": "#/components/schemas/SkillRef"
      },
      "title": "Skill Index",
      "type": "array"
     },
     "skills": {
      "items": {
       "$ref": "#/components/schemas/SkillRef"
      },
      "title": "Skills",
      "type": "array"
     }
    },
    "required": [
     "recall_id",
     "instructions",
     "skills",
     "skill_index",
     "memories"
    ],
    "title": "RecallResponse",
    "type": "object"
   },
   "ReplayIn": {
    "properties": {
     "limit": {
      "default": 200,
      "maximum": 5000.0,
      "title": "Limit",
      "type": "integer"
     }
    },
    "title": "ReplayIn",
    "type": "object"
   },
   "ReviewIn": {
    "properties": {
     "approve": {
      "title": "Approve",
      "type": "boolean"
     },
     "comment": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Comment"
     },
     "skip_canary": {
      "default": false,
      "title": "Skip Canary",
      "type": "boolean"
     }
    },
    "required": [
     "approve"
    ],
    "title": "ReviewIn",
    "type": "object"
   },
   "RollbackIn": {
    "properties": {
     "version": {
      "minimum": 1.0,
      "title": "Version",
      "type": "integer"
     }
    },
    "required": [
     "version"
    ],
    "title": "RollbackIn",
    "type": "object"
   },
   "Scope": {
    "description": "tenant_id always comes from the authenticated principal, never the body.",
    "properties": {
     "agent_id": {
      "default": "default",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/-]{0,127}$",
      "title": "Agent Id",
      "type": "string"
     },
     "user_id": {
      "anyOf": [
       {
        "maxLength": 256,
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "User Id"
     }
    },
    "title": "Scope",
    "type": "object"
   },
   "Skill": {
    "properties": {
     "agent_id": {
      "title": "Agent Id",
      "type": "string"
     },
     "bullets": {
      "items": {
       "$ref": "#/components/schemas/Bullet"
      },
      "title": "Bullets",
      "type": "array"
     },
     "created_at": {
      "format": "date-time",
      "title": "Created At",
      "type": "string"
     },
     "description": {
      "title": "Description",
      "type": "string"
     },
     "id": {
      "title": "Id",
      "type": "string"
     },
     "name": {
      "title": "Name",
      "type": "string"
     },
     "pinned": {
      "default": false,
      "title": "Pinned",
      "type": "boolean"
     },
     "status": {
      "title": "Status",
      "type": "string"
     },
     "success_rate": {
      "anyOf": [
       {
        "type": "number"
       },
       {
        "type": "null"
       }
      ],
      "title": "Success Rate"
     },
     "tags": {
      "items": {
       "type": "string"
      },
      "title": "Tags",
      "type": "array"
     },
     "updated_at": {
      "format": "date-time",
      "title": "Updated At",
      "type": "string"
     },
     "uses": {
      "title": "Uses",
      "type": "integer"
     },
     "version": {
      "title": "Version",
      "type": "integer"
     }
    },
    "required": [
     "id",
     "agent_id",
     "name",
     "description",
     "version",
     "status",
     "tags",
     "uses",
     "success_rate",
     "bullets",
     "created_at",
     "updated_at"
    ],
    "title": "Skill",
    "type": "object"
   },
   "SkillImport": {
    "description": "Import an existing SKILL.md (Anthropic / Hermes / agentskills.io format).",
    "properties": {
     "agent_id": {
      "default": "default",
      "pattern": "^(\\*|[A-Za-z0-9][A-Za-z0-9._:@/-]{0,127})$",
      "title": "Agent Id",
      "type": "string"
     },
     "markdown": {
      "maxLength": 200000,
      "title": "Markdown",
      "type": "string"
     }
    },
    "required": [
     "markdown"
    ],
    "title": "SkillImport",
    "type": "object"
   },
   "SkillIn": {
    "properties": {
     "agent_id": {
      "default": "default",
      "pattern": "^(\\*|[A-Za-z0-9][A-Za-z0-9._:@/-]{0,127})$",
      "title": "Agent Id",
      "type": "string"
     },
     "body": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Body"
     },
     "bullets": {
      "anyOf": [
       {
        "items": {
         "$ref": "#/components/schemas/BulletIn"
        },
        "type": "array"
       },
       {
        "type": "null"
       }
      ],
      "title": "Bullets"
     },
     "description": {
      "maxLength": 1024,
      "title": "Description",
      "type": "string"
     },
     "name": {
      "pattern": "^[a-z0-9][a-z0-9-]{1,63}$",
      "title": "Name",
      "type": "string"
     },
     "tags": {
      "items": {
       "type": "string"
      },
      "title": "Tags",
      "type": "array"
     }
    },
    "required": [
     "name",
     "description"
    ],
    "title": "SkillIn",
    "type": "object"
   },
   "SkillRef": {
    "properties": {
     "arm": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Arm"
     },
     "bullets": {
      "anyOf": [
       {
        "items": {
         "$ref": "#/components/schemas/BulletRef"
        },
        "type": "array"
       },
       {
        "type": "null"
       }
      ],
      "title": "Bullets"
     },
     "description": {
      "title": "Description",
      "type": "string"
     },
     "id": {
      "title": "Id",
      "type": "string"
     },
     "name": {
      "title": "Name",
      "type": "string"
     },
     "score": {
      "title": "Score",
      "type": "number"
     },
     "version": {
      "title": "Version",
      "type": "integer"
     }
    },
    "required": [
     "id",
     "name",
     "description",
     "version",
     "score"
    ],
    "title": "SkillRef",
    "type": "object"
   },
   "ToolCall": {
    "properties": {
     "arguments": {
      "anyOf": [
       {
        "additionalProperties": true,
        "type": "object"
       },
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Arguments"
     },
     "error": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Error"
     },
     "name": {
      "title": "Name",
      "type": "string"
     },
     "result": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Result"
     }
    },
    "required": [
     "name"
    ],
    "title": "ToolCall",
    "type": "object"
   },
   "ValidationError": {
    "properties": {
     "ctx": {
      "title": "Context",
      "type": "object"
     },
     "input": {
      "title": "Input"
     },
     "loc": {
      "items": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "integer"
        }
       ]
      },
      "title": "Location",
      "type": "array"
     },
     "msg": {
      "title": "Message",
      "type": "string"
     },
     "type": {
      "title": "Error Type",
      "type": "string"
     }
    },
    "required": [
     "loc",
     "msg",
     "type"
    ],
    "title": "ValidationError",
    "type": "object"
   },
   "Verification": {
    "description": "Ground-truth signal from tests, validators or business checks. The strongest learning signal there is.",
    "properties": {
     "details": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "title": "Details"
     },
     "passed": {
      "title": "Passed",
      "type": "boolean"
     },
     "source": {
      "default": "verifier",
      "title": "Source",
      "type": "string"
     }
    },
    "required": [
     "passed"
    ],
    "title": "Verification",
    "type": "object"
   }
  }
 },
 "info": {
  "description": "Plug-in self-improvement for any agent framework: skills, memory, reflection, evolution, canary rollout and governance.",
  "title": "Myelinate",
  "version": "0.3.0"
 },
 "openapi": "3.1.0",
 "paths": {
  "/v1/admin/api-keys": {
   "post": {
    "description": "Create a tenant API key with the given scopes. The key is only shown once.",
    "operationId": "create_key_v1_admin_api_keys_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/KeyIn"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Create Key V1 Admin Api Keys Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Create Key",
    "tags": [
     "admin"
    ]
   }
  },
  "/v1/admin/api-keys/{key_id}": {
   "delete": {
    "description": "Revoke a tenant API key.",
    "operationId": "revoke_key_v1_admin_api_keys__key_id__delete",
    "parameters": [
     {
      "in": "path",
      "name": "key_id",
      "required": true,
      "schema": {
       "title": "Key Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "204": {
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Revoke Key",
    "tags": [
     "admin"
    ]
   }
  },
  "/v1/admin/audit": {
   "get": {
    "description": "List the tenant's audit log, newest first.",
    "operationId": "audit_log_v1_admin_audit_get",
    "parameters": [
     {
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 200,
       "maximum": 1000,
       "title": "Limit",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "items": {
          "additionalProperties": true,
          "type": "object"
         },
         "title": "Response Audit Log V1 Admin Audit Get",
         "type": "array"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Audit Log",
    "tags": [
     "admin"
    ]
   }
  },
  "/v1/admin/usage": {
   "get": {
    "description": "Learning-side LLM usage per day and purpose (for budgets and chargeback).",
    "operationId": "usage_v1_admin_usage_get",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "items": {
          "additionalProperties": true,
          "type": "object"
         },
         "title": "Response Usage V1 Admin Usage Get",
         "type": "array"
        }
       }
      },
      "description": "Successful Response"
     }
    },
    "summary": "Usage",
    "tags": [
     "admin"
    ]
   }
  },
  "/v1/admin/users/{user_id}": {
   "delete": {
    "description": "Right to erasure: memories, profile and episodes of a user in this tenant.",
    "operationId": "erase_user_v1_admin_users__user_id__delete",
    "parameters": [
     {
      "in": "path",
      "name": "user_id",
      "required": true,
      "schema": {
       "title": "User Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": {
          "type": "integer"
         },
         "title": "Response Erase User V1 Admin Users  User Id  Delete",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Erase User",
    "tags": [
     "admin"
    ]
   }
  },
  "/v1/agents/{agent_id}/curate": {
   "post": {
    "description": "Queue library upkeep for an agent now (dedup, lifecycle, nomination, profiles).",
    "operationId": "trigger_curation_v1_agents__agent_id__curate_post",
    "parameters": [
     {
      "in": "path",
      "name": "agent_id",
      "required": true,
      "schema": {
       "title": "Agent Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "202": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": {
          "type": "string"
         },
         "title": "Response Trigger Curation V1 Agents  Agent Id  Curate Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Trigger Curation",
    "tags": [
     "governance"
    ]
   }
  },
  "/v1/agents/{agent_id}/export": {
   "get": {
    "description": "Export episodes with rewards as JSON Lines (for analytics, RL or fine-tuning).",
    "operationId": "export_v1_agents__agent_id__export_get",
    "parameters": [
     {
      "in": "path",
      "name": "agent_id",
      "required": true,
      "schema": {
       "title": "Agent Id",
       "type": "string"
      }
     },
     {
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 10000,
       "maximum": 100000,
       "title": "Limit",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {}
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Export",
    "tags": [
     "governance"
    ]
   }
  },
  "/v1/agents/{agent_id}/insights": {
   "get": {
    "description": "Learning lift vs the holdout group, per-skill success rates, canaries, problem rules and learning cost.",
    "operationId": "insights_v1_agents__agent_id__insights_get",
    "parameters": [
     {
      "in": "path",
      "name": "agent_id",
      "required": true,
      "schema": {
       "title": "Agent Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Insights V1 Agents  Agent Id  Insights Get",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Insights",
    "tags": [
     "governance"
    ]
   }
  },
  "/v1/agents/{agent_id}/reflect": {
   "post": {
    "description": "Queue reflection over an agent's unreflected episodes now.",
    "operationId": "trigger_reflection_v1_agents__agent_id__reflect_post",
    "parameters": [
     {
      "in": "path",
      "name": "agent_id",
      "required": true,
      "schema": {
       "title": "Agent Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "202": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": {
          "type": "string"
         },
         "title": "Response Trigger Reflection V1 Agents  Agent Id  Reflect Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Trigger Reflection",
    "tags": [
     "governance"
    ]
   }
  },
  "/v1/agents/{agent_id}/replay": {
   "post": {
    "description": "Re-learn from stored episodes (another epoch), e.g. after importing history or changing the model.",
    "operationId": "replay_v1_agents__agent_id__replay_post",
    "parameters": [
     {
      "in": "path",
      "name": "agent_id",
      "required": true,
      "schema": {
       "title": "Agent Id",
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ReplayIn"
       }
      }
     },
     "required": true
    },
    "responses": {
     "202": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Replay V1 Agents  Agent Id  Replay Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Replay",
    "tags": [
     "governance"
    ]
   }
  },
  "/v1/ask": {
   "post": {
    "description": "Answer a question from learned evidence only (skills, memories, profile), with cited evidence ids.",
    "operationId": "ask_v1_ask_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/AskIn"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/AskOut"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Ask",
    "tags": [
     "loop"
    ]
   }
  },
  "/v1/changesets": {
   "get": {
    "description": "List changesets (proposed skill changes), by default those pending review.",
    "operationId": "list_changesets_v1_changesets_get",
    "parameters": [
     {
      "in": "query",
      "name": "status",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "default": "pending",
       "title": "Status"
      }
     },
     {
      "in": "query",
      "name": "agent_id",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Agent Id"
      }
     },
     {
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 100,
       "maximum": 500,
       "title": "Limit",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "items": {
          "$ref": "#/components/schemas/Changeset"
         },
         "title": "Response List Changesets V1 Changesets Get",
         "type": "array"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "List Changesets",
    "tags": [
     "governance"
    ]
   }
  },
  "/v1/changesets/{cs_id}/review": {
   "post": {
    "description": "Approve or reject a pending changeset. Risky changes to proven skills start a canary unless skipped.",
    "operationId": "review_v1_changesets__cs_id__review_post",
    "parameters": [
     {
      "in": "path",
      "name": "cs_id",
      "required": true,
      "schema": {
       "title": "Cs Id",
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ReviewIn"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": {
          "type": "string"
         },
         "title": "Response Review V1 Changesets  Cs Id  Review Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Review",
    "tags": [
     "governance"
    ]
   }
  },
  "/v1/episodes": {
   "post": {
    "description": "Record a finished run (messages, tool calls, outcome, verification) so the agent can learn from it.",
    "operationId": "record_v1_episodes_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/EpisodeIn"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/EpisodeOut"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Record",
    "tags": [
     "loop"
    ]
   }
  },
  "/v1/episodes/latest": {
   "get": {
    "description": "Most recent episode of a session, so stateless clients can attach feedback to 'the last turn'.",
    "operationId": "latest_episode_v1_episodes_latest_get",
    "parameters": [
     {
      "in": "query",
      "name": "session_id",
      "required": true,
      "schema": {
       "maxLength": 256,
       "title": "Session Id",
       "type": "string"
      }
     },
     {
      "in": "query",
      "name": "agent_id",
      "required": false,
      "schema": {
       "default": "default",
       "title": "Agent Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Latest Episode V1 Episodes Latest Get",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Latest Episode",
    "tags": [
     "loop"
    ]
   }
  },
  "/v1/episodes:batch": {
   "post": {
    "description": "Bulk import of historical runs (offline warm-up: ACE showed warm-starting lifts online learning).",
    "operationId": "record_batch_v1_episodes_batch_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "items": {
         "$ref": "#/components/schemas/EpisodeIn"
        },
        "title": "Eps",
        "type": "array"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Record Batch V1 Episodes Batch Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Record Batch",
    "tags": [
     "loop"
    ]
   }
  },
  "/v1/feedback": {
   "post": {
    "description": "Rate a recorded episode (0-1), optionally with a comment or the correct answer.",
    "operationId": "feedback_v1_feedback_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/FeedbackIn"
       }
      }
     },
     "required": true
    },
    "responses": {
     "204": {
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Feedback",
    "tags": [
     "loop"
    ]
   }
  },
  "/v1/memories": {
   "get": {
    "description": "List memories, optionally for a user, at a point in time (`as_of`) or with superseded history.",
    "operationId": "list_memories_v1_memories_get",
    "parameters": [
     {
      "in": "query",
      "name": "agent_id",
      "required": false,
      "schema": {
       "default": "default",
       "title": "Agent Id",
       "type": "string"
      }
     },
     {
      "in": "query",
      "name": "user_id",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "User Id"
      }
     },
     {
      "in": "query",
      "name": "as_of",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "format": "date-time",
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "As Of"
      }
     },
     {
      "in": "query",
      "name": "include_history",
      "required": false,
      "schema": {
       "default": false,
       "title": "Include History",
       "type": "boolean"
      }
     },
     {
      "in": "query",
      "name": "status",
      "required": false,
      "schema": {
       "default": "active",
       "title": "Status",
       "type": "string"
      }
     },
     {
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
       "default": 200,
       "maximum": 1000,
       "title": "Limit",
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "items": {
          "$ref": "#/components/schemas/Memory"
         },
         "title": "Response List Memories V1 Memories Get",
         "type": "array"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "List Memories",
    "tags": [
     "memory"
    ]
   },
   "post": {
    "description": "Add a memory. It is reconciled against existing memories (add, update, supersede or no-op).",
    "operationId": "add_memory_v1_memories_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/MemoryIn"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": {
          "items": {
           "type": "string"
          },
          "type": "array"
         },
         "title": "Response Add Memory V1 Memories Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Add Memory",
    "tags": [
     "memory"
    ]
   }
  },
  "/v1/memories/{memory_id}": {
   "delete": {
    "description": "Hard delete (e.g. data-subject request). Learning itself never hard-deletes; it supersedes.",
    "operationId": "delete_memory_v1_memories__memory_id__delete",
    "parameters": [
     {
      "in": "path",
      "name": "memory_id",
      "required": true,
      "schema": {
       "title": "Memory Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "204": {
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Delete Memory",
    "tags": [
     "memory"
    ]
   }
  },
  "/v1/memories/{memory_id}/approve": {
   "post": {
    "description": "Approve a memory held for review (e.g. flagged by the safety scan).",
    "operationId": "approve_memory_v1_memories__memory_id__approve_post",
    "parameters": [
     {
      "in": "path",
      "name": "memory_id",
      "required": true,
      "schema": {
       "title": "Memory Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": {
          "type": "string"
         },
         "title": "Response Approve Memory V1 Memories  Memory Id  Approve Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Approve Memory",
    "tags": [
     "memory"
    ]
   }
  },
  "/v1/profiles/{agent_id}/{user_id}": {
   "get": {
    "description": "Get the profile card for a user of an agent.",
    "operationId": "get_profile_v1_profiles__agent_id___user_id__get",
    "parameters": [
     {
      "in": "path",
      "name": "agent_id",
      "required": true,
      "schema": {
       "title": "Agent Id",
       "type": "string"
      }
     },
     {
      "in": "path",
      "name": "user_id",
      "required": true,
      "schema": {
       "title": "User Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Get Profile V1 Profiles  Agent Id   User Id  Get",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Get Profile",
    "tags": [
     "memory"
    ]
   }
  },
  "/v1/recall": {
   "post": {
    "description": "Retrieve learned skills, memories and the user's profile for a task, as ready-to-inject instructions.",
    "operationId": "recall_v1_recall_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/RecallRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/RecallResponse"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Recall",
    "tags": [
     "loop"
    ]
   }
  },
  "/v1/skills": {
   "get": {
    "description": "List an agent's skills (plus tenant-shared ones) with their rules and success rates.",
    "operationId": "list_skills_v1_skills_get",
    "parameters": [
     {
      "in": "query",
      "name": "agent_id",
      "required": false,
      "schema": {
       "default": "default",
       "title": "Agent Id",
       "type": "string"
      }
     },
     {
      "in": "query",
      "name": "status",
      "required": false,
      "schema": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "title": "Status"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "items": {
          "$ref": "#/components/schemas/Skill"
         },
         "title": "Response List Skills V1 Skills Get",
         "type": "array"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "List Skills",
    "tags": [
     "skills"
    ]
   },
   "post": {
    "description": "Create or replace a skill by hand (applied through a governed changeset).",
    "operationId": "author_skill_v1_skills_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/SkillIn"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Author Skill V1 Skills Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Author Skill",
    "tags": [
     "skills"
    ]
   }
  },
  "/v1/skills/import": {
   "post": {
    "description": "Bring existing SKILL.md files (Anthropic / Hermes / agentskills.io) under learning and governance.",
    "operationId": "import_skill_v1_skills_import_post",
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/SkillImport"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Import Skill V1 Skills Import Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Import Skill",
    "tags": [
     "skills"
    ]
   }
  },
  "/v1/skills/{ref}": {
   "get": {
    "description": "Get one skill by id or name.",
    "operationId": "get_skill_v1_skills__ref__get",
    "parameters": [
     {
      "in": "path",
      "name": "ref",
      "required": true,
      "schema": {
       "title": "Ref",
       "type": "string"
      }
     },
     {
      "in": "query",
      "name": "agent_id",
      "required": false,
      "schema": {
       "default": "default",
       "title": "Agent Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Skill"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Get Skill",
    "tags": [
     "skills"
    ]
   }
  },
  "/v1/skills/{ref}/SKILL.md": {
   "get": {
    "description": "Export a skill as an agentskills.io-compatible SKILL.md.",
    "operationId": "skill_md_v1_skills__ref__SKILL_md_get",
    "parameters": [
     {
      "in": "path",
      "name": "ref",
      "required": true,
      "schema": {
       "title": "Ref",
       "type": "string"
      }
     },
     {
      "in": "query",
      "name": "agent_id",
      "required": false,
      "schema": {
       "default": "default",
       "title": "Agent Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "text/plain": {
        "schema": {
         "type": "string"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Skill Md",
    "tags": [
     "skills"
    ]
   }
  },
  "/v1/skills/{ref}/versions": {
   "get": {
    "description": "List a skill's immutable version history.",
    "operationId": "skill_versions_v1_skills__ref__versions_get",
    "parameters": [
     {
      "in": "path",
      "name": "ref",
      "required": true,
      "schema": {
       "title": "Ref",
       "type": "string"
      }
     },
     {
      "in": "query",
      "name": "agent_id",
      "required": false,
      "schema": {
       "default": "default",
       "title": "Agent Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "items": {
          "additionalProperties": true,
          "type": "object"
         },
         "title": "Response Skill Versions V1 Skills  Ref  Versions Get",
         "type": "array"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Skill Versions",
    "tags": [
     "skills"
    ]
   }
  },
  "/v1/skills/{skill_id}/evolve": {
   "post": {
    "description": "Queue an evolution run for a skill.",
    "operationId": "trigger_evolution_v1_skills__skill_id__evolve_post",
    "parameters": [
     {
      "in": "path",
      "name": "skill_id",
      "required": true,
      "schema": {
       "title": "Skill Id",
       "type": "string"
      }
     }
    ],
    "responses": {
     "202": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": {
          "type": "string"
         },
         "title": "Response Trigger Evolution V1 Skills  Skill Id  Evolve Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Trigger Evolution",
    "tags": [
     "skills"
    ]
   }
  },
  "/v1/skills/{skill_id}/pin": {
   "post": {
    "description": "Pin or unpin a skill. Pinned skills are never archived by the lifecycle.",
    "operationId": "pin_v1_skills__skill_id__pin_post",
    "parameters": [
     {
      "in": "path",
      "name": "skill_id",
      "required": true,
      "schema": {
       "title": "Skill Id",
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/PinIn"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": {
          "type": "boolean"
         },
         "title": "Response Pin V1 Skills  Skill Id  Pin Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Pin",
    "tags": [
     "skills"
    ]
   }
  },
  "/v1/skills/{skill_id}/rollback": {
   "post": {
    "description": "Restore a skill to an earlier version (recorded as a new version).",
    "operationId": "rollback_v1_skills__skill_id__rollback_post",
    "parameters": [
     {
      "in": "path",
      "name": "skill_id",
      "required": true,
      "schema": {
       "title": "Skill Id",
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/RollbackIn"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": {
          "type": "integer"
         },
         "title": "Response Rollback V1 Skills  Skill Id  Rollback Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     },
     "422": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/HTTPValidationError"
        }
       }
      },
      "description": "Validation Error"
     }
    },
    "summary": "Rollback",
    "tags": [
     "skills"
    ]
   }
  },
  "/v1/traces": {
   "post": {
    "description": "Zero-code ingestion of OpenTelemetry GenAI / OpenInference traces.",
    "operationId": "otlp_traces_v1_traces_post",
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "additionalProperties": true,
         "title": "Response Otlp Traces V1 Traces Post",
         "type": "object"
        }
       }
      },
      "description": "Successful Response"
     }
    },
    "summary": "Otlp Traces",
    "tags": [
     "loop"
    ]
   }
  }
 }
}
