Skip to content

Capability declaration

@kindgi/specs/capability.schema.json, schema version 1.1.0.

An agent's model requirements as declarative constraints. The model router matches capabilities against registered providers, respecting per-tenant policy. defineCapability validates a declaration against this schema; a declaration that no registered provider satisfies fails at routing time with capability-unsatisfiable.

  • kind (string): Resource kind this capability requests. Open string: examples lists the well-known kinds, and adapters can declare their own. Absent means llm-inference. The router only considers providers whose capabilityKind equals it (a provider that declares none counts as llm-inference). Added in schema-version 1.1.0.
  • needs (array of Requirement, required)
  • prefer (array of Preference): Soft preferences: the router picks the highest-scoring model that also satisfies all 'needs'.
  • budget (Budget): Per-invocation budget. Declarative: carried with the declaration but not enforced by the runtime (per-turn spend is capped by the agent's budget.maxCostUsd).

Type: FeatureRequirement or ContextRequirement or CostRequirement or RegionRequirement or LatencyRequirement or ProviderRequirement or ModelRequirement

  • feature ("structured-output" | "vision" | "audio-input" | "audio-output" | "tool-use" | "parallel-tool-use" | "thinking" | "long-context" | "code-execution" | "web-search" | "file-search" | "streaming" | "batch", required)
  • contextWindow (object, required)
    • op (">=" | ">" | "=" | "<=" | "<", required)
    • value (integer, required)
  • costPerCall (object, required)
    • op (">=" | ">" | "=" | "<=" | "<", required)
    • usd (number, required)
  • region (string, required): Geographic region constraint (e.g. 'eu-only', 'us-only', 'us-gov'). Enforced by the router against each provider's declared region; a tenant policy's regionAllow can constrain it further.
  • p95LatencyMs (object, required)
    • op ("<=" | "<", required)
    • value (integer, required)

Hard constraint on allowed providers (allowlist) or disallowed providers (denylist). Tenant policy can narrow the set further.

  • providers (object, required)
    • allow (array of string)
    • deny (array of string)

Hard constraint on allowed models (allowlist) or disallowed models (denylist), matched against each provider's model names (ModelInfo.name). Can be combined with a providers requirement. Tenant policy can narrow the set further. Added in schema-version 1.1.0.

  • models (object, required)
    • allow (array of string)
    • deny (array of string)
  • feature (string, required): A capability feature or a soft attribute (e.g. 'lower-cost', 'lower-latency', 'higher-accuracy').
  • weight (number, required)
  • maxCostUsd (number)
  • maxTokens (integer)
  • maxDurationMs (integer)