← Back to list

agent-contracts-backend-runtime
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-backend-runtime description: Build an API-oriented agent using AgentRuntime/StreamingRuntime with predictable request/response slices and session support. metadata: short-description: Backend runtime patterns
agent-contracts Backend Runtime
Use this skill when you are implementing an AI agent as a backend service (HTTP API, jobs, or SSE streaming).
Target Shape
- Input:
RequestContext(session_id, action, params, message, image, resume_session) - Output:
response.response_type+response.response_data(+ optionalresponse.response_message) - State slices:
request,response,_internal+ domain slices (e.g.,ticket,orders,workflow)
Recommended Workflow
- Start from
examples/05_backend_runtime.py. - Define your domain slices and register them:
NodeRegistry.add_valid_slice("your_slice"). - Implement nodes with
NodeContract(keepreads/writesminimal). - Build graph with
build_graph_from_registry(...)and compile. - Wrap with
AgentRuntimefor request/response execution. - If you need progressive updates, use
StreamingRuntimeand emit SSE viaStreamEvent.to_sse().
Guardrails
- Prefer
response.response_typefor flow termination and client branching. - Avoid writing to
request(discouraged). - Keep large blobs out of state slices; sanitize before LLM routing (see
GenericSupervisor).
References (load only when needed)
docs/getting_started.mddocs/core_concepts.mddocs/cli.mddocs/skills/official/agent-contracts-backend-runtime/references/patterns.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

