Skip to content

types

diapason.agents.hybrid.skillorchestra.types

Core data types for SkillOrchestra.

  • Skill
  • AgentProfile
  • BetaCompetence
  • ModeMetadata
  • RoutingInsight
  • CostStats

AgentProfile dataclass

Agent profile for skill-aware orchestration.

overall_success_rate property

Overall success rate (trajectory-level when available, else skill-level).

category_competence(category_prefix)

Aggregate competence on all skills under a category (skill_id prefix).

E.g. category_competence('entertainment_knowledge') = avg of get_competence(s) for all s where s.startswith('entertainment_knowledge.').

category_competence_for_skills(active_skill_ids)

Category-level competence for hierarchical tie-breaking.

Extracts parent categories from active_skill_ids (e.g. 'entertainment_knowledge' from 'entertainment_knowledge.episodic_competition_outcome'), computes category_competence for each, returns average.

get_competence(skill_id)

Get empirical success rate for a skill. Returns 0 if unseen.

get_competence_dist(skill_id)

Get full Beta distribution for a skill, creating with prior if unseen.

update_competence(skill_id, success)

Update competence estimate for a skill.

weighted_competence(skill_weights)

Compute weighted competence: sum w_{t,sigma} * alpha/(alpha+beta).

BetaCompetence dataclass

Bayesian competence estimate for an agent on a specific skill.

skill_scores / get_competence use empirical_rate (successes/attempts)

empirical_rate property

Empirical success rate: successes/attempts.

total_observations property

Total observations (excluding prior)

variance property

Posterior variance.

CostStats dataclass

Execution cost statistics for an agent under a specific mode.

Tracks both total cost (prompt + completion) and completion-only cost separately, since completion cost is the variable component that differs most between models (prompt cost is roughly constant for the same query).

update(prompt_tokens, completion_tokens, latency_s, cost_usd, completion_cost_usd=0.0, prompt_cost_usd=0.0)

Incremental running-average update.

ModeMetadata dataclass

Mode-level routing metadata.

RoutingInsight dataclass

A single routing insight learned from execution traces

Skill dataclass

A reusable capability abstraction.

get_children(all_skills)

Get child skills in the hierarchy.

is_leaf(all_skills)

True if this skill has no children.

SkillProvenance dataclass

Tracks how and why a skill was discovered.