<!-- OpenSmartRoute: Open Capability Manifest. Source https://github.com/isathish/OpenSmartRoute/blob/main/spec/ocm/README.md; HTML https://opensmartroute.ai/docs/ocm -->
# Open Capability Manifest (OCM) v1

A vendor-neutral, machine-readable description of **one routable capability** – an LLM, agent,
skill, persona, tool, workflow, human queue or destination – so that catalogues can be published,
validated and consumed by any router or gateway, not only OpenSmartRoute.

* Schema: [capability.schema.json](https://github.com/isathish/OpenSmartRoute/blob/main/spec/ocm/capability.schema.json) (JSON Schema 2020-12)
* Reference validator / converter: `opensmartroute.ocm` (`osr validate path/`)
* A `targets.yaml` entry with an `ocm: "1"` field *is* a manifest; `load_targets` accepts mixed files,
  a single manifest, or a directory of `capability.yaml` files.

```yaml
ocm: "1"
id: acme/support-agent
kind: agent
description: Handles orders, refunds and account issues via internal tools.
capabilities: { domains: [customer_support], actions: [action, qa], supports_tools: true }
constraints: { data_boundary: private, regions: [eu], pii_allowed: true }
cost: { usd_per_call: 0.02 }
latency_ms: { p50: 1500, p95: 4000 }
endpoints:
  - { protocol: a2a, url: https://agents.acme.com/support }
  - { protocol: http, url: https://eu.agents.acme.com/support, region: eu }
examples: ["I want a refund for order #12345, it arrived damaged."]
quality_prior: 0.8
```

## Field notes

| Field | Meaning |
|---|---|
| `id` | Stable, lowercase; namespaced with `/` (`publisher/name`). |
| `kind` | `llm` · `agent` · `skill` · `persona` · `tool` · `workflow` · `human` · `destination`. |
| `capabilities` | What it can do; `max_complexity`/`min_complexity` in `[0, 1]`. |
| `constraints` | Where it may run: `regions`, `data_boundary`, `pii_allowed`, `tenants`. |
| `cost` | `usd_per_call` for agents/workflows/tools/humans, `usd_per_1k_tokens` for models; energy and carbon optional. |
| `latency_ms` | A number or `{p50, p90, p95, p99}`; routers use `p50` for scoring. |
| `endpoints` | How to call it. `http` and `a2a` bind to executors directly (`bind_endpoint`); `mcp`/`queue` are wired by the operator. A `region` on an endpoint lets the router pick the in-region one. |
| `examples` | Representative prompts (fuel the similarity strategy and the eval dataset). |
| `quality_prior` | Prior quality belief before feedback (leaderboard score, past win rate). |
| `primary` | `false` for plan-slot-only capabilities (a persona layered on a model). |

## Versioning

`ocm` is a major version string. Additive fields ship under the same major; breaking changes bump it.
Unknown top-level fields are rejected so typos surface at `osr validate` time – extension data
belongs under `metadata`.
