adk-runtime-contract

Standardizes Child Agent ADK runtime contracts for configuration, streaming, artifacts, permissions, error handling, and observability.

Updated May 19, 2026
One-click install
npx skills add https://github.com/zxc1a1a1/Multi_Agent-AgentHub --skill adk-runtime-contract
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: adk-runtime-contract
Source: https://github.com/zxc1a1a1/Multi_Agent-AgentHub/tree/main/.agents/skills/adk-runtime-contract
Command: npx skills add https://github.com/zxc1a1a1/Multi_Agent-AgentHub --skill adk-runtime-contract

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It eliminates inconsistent and fragile integrations between Child Agents and the AgentHub ADK Runtime by defining a single, contract-first development contract for configuration, streaming, artifact output, tool permissions, error handling, and observability.

Core Features & Use Cases

  • Unified runtime-to-protocol mapping: Ensures handlers emit A2A-compatible lifecycle events via ADK Context rather than directly constructing protocol payloads.
  • Explicit capability and safety contracts: Forces Child Agents to declare skills, input/output modes, and tool permissions through config.yaml and AgentCard, with a default-minimal permission posture.
  • Consistent streaming and artifact production: Standardizes ctx.StreamText for text streaming and ctx.AddArtifact for ArtifactDraft outputs while preventing leakage of platform-specific fields into drafts.
  • LLMClient lifecycle and security guardrails: Requires LLMClient creation at startup, HTTP timeouts, secret hygiene, error de-sensitization, and stable error codes/log fields.
  • Review and contract testing checklist: Provides a concrete review rubric to catch boundary violations (no SSE/HTTP/AG-UI event generation in handlers, no gateway planning/registry access, artifact schema compliance, observability coverage).

Quick Start

Use this skill to implement a new Child Agent runtime integration that loads config.yaml, validates/generates AgentCard, exposes /health and an A2A server, and routes tasks through a handler that only uses ctx.Context/StreamText/AddArtifact/Fail while adhering to the review checklist.

Frequently Asked Questions about adk-runtime-contract

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I standardize child-agent runtime contracts for AgentHub ADK?

Standardize child-agent runtime contracts by enforcing a contract-first development model that dictates configuration via config.yaml, AgentCard generation, and A2A server exposure for protocol-safe integration.

What is the best way to emit streaming text and structured artifacts from an agent runtime?

Emit streaming text and structured artifacts by using ADK Context APIs like ctx.StreamText for text and ctx.AddArtifact for ArtifactDraft outputs, ensuring handlers do not directly construct protocol payloads.

How do agent runtime tool permissions work under the ADK contract?

Agent runtime tool permissions require Child Agents to explicitly declare skills and permissions through config.yaml with a default-minimal permission posture to maintain safety boundaries.

Why does my child agent runtime integration fail with protocol boundary violations?

Runtime integration fails with protocol boundary violations when handlers directly generate SSE, HTTP, or AG-UI events instead of routing lifecycle events through ADK Context.

Can I manage LLMClient lifecycle dynamically inside task handlers?

No, LLMClient lifecycle constraints require creation at startup with enforced HTTP timeouts and secret hygiene, preventing dynamic instantiation or gateway registry access inside task handlers.

When do I need an agent runtime contract for A2A mapping?

You need an agent runtime contract for A2A mapping whenever exposing Child Agents to external servers to ensure handlers emit A2A-compatible lifecycle events and stable error codes under cancellation.