role-model

Protocol object model

How the canonical protocol entities connect to each other.

The protocol is best understood as a graph of related artifacts rather than a flat list of schemas.

Endpoint evidence
EndpointIdentity
Concrete endpoint identity.
DeclaredCapabilityProfile
Declared compatibility and constraints.
ObservedPerformanceProfile
Measured behavior over time.
Candidate endpoint
The routable candidate assembled from identity plus profiles.
Execution intent
RoleDefinition
Execution persona and policy contract.
TaskDefinition
Unit of work being requested.
RoleBinding
Endpoint-specific role activation.
TaskExecutionProfile
Role-task execution patch.
Execution intent
The combined role, task, and binding context that routing must satisfy.
Candidate endpoint
Who can be chosen.
RoutingPolicy
What constraints and preferences apply.
Execution intent
What work must be satisfied.
RouterDecision
Policy snapshot, eligibility, scores, winner, fallbacks, and reasons.
Observability
TraceSpan, TraceEvent, and UsageEvent.
ObservedPerformanceProfile updates
New measurement that feeds later routing.
Endpoint evidence and execution intent stay separate until policy and routing combine them into one decision.

Relationship map

FromToWhy the relationship exists
EndpointIdentityDeclaredCapabilityProfiledeclared capabilities only make sense when attached to a concrete endpoint
EndpointIdentityObservedPerformanceProfilemeasurements are endpoint-specific and must not be merged across materially different deployments
RoleDefinitionTaskDefinitionroles state which task families they support; tasks state which roles are allowed
RoleBindingendpoint + rolebinds a role to one endpoint with an activation status and effective capabilities
TaskExecutionProfiletask + role + policyadjusts capability and policy requirements for a particular execution shape
candidate set + policy + execution intentRouterDecisiona decision is the evaluated result of those inputs
RouterDecisiontraces + usagelater artifacts refer back to the decision via IDs so routing stays inspectable
traces + usageobserved profileexecution evidence feeds future routing through measured performance updates

Two complementary evidence layers

Declared layer

The declared layer is the compatibility floor. It determines whether an endpoint can plausibly satisfy the task at all:

  • required capabilities
  • required modalities
  • context size
  • tool-calling support
  • platform constraints

Observed layer

The observed layer is the comparative evidence layer. It determines how endpoints trade off once more than one endpoint is eligible:

  • latency
  • throughput
  • failure rate
  • quality or judge score
  • cost estimate
  • freshness
  • confidence

Where the model lives in the object model

The protocol does not define a separate routing object called "model candidate."

Instead, model lineage lives inside EndpointIdentity:

  • model_id
  • package_id
  • variant_id

That design preserves model identity without pretending that model name alone is enough for routing. Declared capability, observed performance, and policy all need a concrete endpoint-shaped object to attach to.

Why profiles attach to endpoints

Profiles attach to endpoints because two endpoints serving the same model may behave differently in practice.

role-model keeps those profiles endpoint-specific so the router can compare real deployments rather than collapsing everything under one model label.

Why the model is split this way

The object model deliberately separates:

  1. identity from capability claims
  2. capability claims from measured performance
  3. execution intent from endpoint metadata
  4. routing inputs from routing outputs
  5. routing outputs from later observability and feedback artifacts

That separation prevents routers from inferring hidden state or collapsing different operational concerns into one overloaded record.

On this page