Back to list
yatarousan0227

agent-contracts-routing-tuning

by yatarousan0227

Contract-driven architecture for building LangGraph agents with declarative node definitions, automatic graph construction, and hybrid rule/LLM-based routing.

6🍴 0📅 Jan 20, 2026

SKILL.md


name: agent-contracts-routing-tuning description: Tune routing with TriggerCondition priorities, LLM hints, context_builder, and traceable decisions. metadata: short-description: Routing design and debugging

agent-contracts Routing Tuning

Use this skill when you are designing or debugging routing behavior (rule matches vs LLM selection).

Routing Model (what to optimize)

  1. Rule filtering via TriggerCondition (when / when_not, priority)
  2. Candidate selection (top matches + ties)
  3. Optional LLM decision among candidates (with llm_hint)
  4. Fallbacks and terminal states (response.response_type)

Practical Tuning Steps

  1. Make rule-based selection deterministic first (LLM off).
  2. Use priorities to express business rules (100+ = critical, 50-99 = main, 1-49 = fallback).
  3. Add llm_hint only where ambiguity remains after rules.
  4. Use context_builder only when needed; keep default minimal slices.
  5. Debug with decide_with_trace() and inspect matched rules.

Guardrails

  • Prefer rules for safety/constraints; use LLM for ambiguous intent.
  • Keep candidate sets small and explainable.
  • Treat response.response_type terminal values as part of routing design.

References (load only when needed)

  • docs/core_concepts.md (Traceable Routing / Context Builder)
  • examples/02_routing_explain.py
  • docs/skills/official/agent-contracts-routing-tuning/references/debug_playbook.md

Score

Total Score

75/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

Reviews

💬

Reviews coming soon