skills/smithery.ai/agent-contracts-backend-runtime

agent-contracts-backend-runtime

Installation
SKILL.md

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 (+ optional response.response_message)
  • State slices: request, response, _internal + domain slices (e.g., ticket, orders, workflow)

Recommended Workflow

  1. Start from examples/05_backend_runtime.py.
  2. Define your domain slices and register them: NodeRegistry.add_valid_slice("your_slice").
  3. Implement nodes with NodeContract (keep reads/writes minimal).
  4. Build graph with build_graph_from_registry(...) and compile.
  5. Wrap with AgentRuntime for request/response execution.
  6. If you need progressive updates, use StreamingRuntime and emit SSE via StreamEvent.to_sse().
Installs
1
First Seen
Apr 21, 2026
agent-contracts-backend-runtime from smithery.ai