Interactive UI & communication (A2UI & A2A)
Rather than returning walls of unstructured terminal text, TalkOps Kubernetes Agent (k8s-autopilot) pairs two open standards to deliver interactive visual workflows in the browser:
- A2A (Agent-to-Agent Protocol) — The bidirectional streaming and discovery protocol connecting the web console (or peer agents) to the
k8s-autopilotbackend. - A2UI (Agent-to-User Interface) — The declarative UI specification that renders approval gates, live tool trackers, PromQL charts, and trace waterfalls safely inside the chat stream.
A2A communication layer
The A2A protocol handles capability discovery, thread persistence, and real-time bidirectional events between the client UI and the LangGraph runtime:
| Capability | How it works |
|---|---|
| Automatic capability discovery | On connection, the client reads the agent's A2A card to discover registered operators, loaded skills, and supported capabilities with zero manual wiring. |
| Token and event streaming | Thinking blocks, MCP tool invocations, stdout/stderr logs, and A2UI component payloads stream incrementally as they occur. |
| Persistent conversation threads | Every session is checkpointed by thread ID in SQLite or PostgreSQL, allowing you to close your browser or restart containers without losing state. |
| Bidirectional user actions | Clicking Approve, selecting a namespace in a clarification card, or editing a goal dispatches a structured A2A resume payload directly back to the paused LangGraph node. |
A2UI interactive components
Instead of executing arbitrary client-side scripts, k8s-autopilot emits typed JSON component descriptors that the console renders using pre-verified React components:
1. HITL Approval Cards
Rendered whenever an operator proposes a Tier 3 (Mutating) or Tier 4 (Destructive) operation:
- Displays the proposed tool call, target cluster context, namespace, and resource name.
- Highlights the risk badge (
Low,Medium,High, orCritical) and diagnostic justification. - Provides one-click Approve and Reject actions.
2. Live Tool Execution Cards
Rendered whenever an operator invokes an MCP tool or shell command:
- Shows the active tool name, target cluster, live status spinner (
Running,Completed,Error), and execution duration in milliseconds. - Includes an expandable drawer containing raw
stdoutandstderrpayloads for auditability.
3. Collapsible Thinking Blocks
Streams the model's internal reasoning and diagnostic strategy into a collapsible header before tool execution begins.
4. Plan & Goal Checklists
Displays each step of a multi-step plan with live status indicators (Pending, In Progress, Completed) and version badges when plans are amended mid-flight.
5. Interactive Clarification Cards (ask_user)
Renders clickable option buttons or validated input fields when the agent needs you to disambiguate a namespace, chart version, or service name.
Inline observability visualizations
When the Observability Operator queries Prometheus, Loki, Tempo, or Alertmanager, k8s-autopilot renders telemetry visually inside the conversation:
| Visualization | Data source | Features |
|---|---|---|
| Interactive metric charts | Prometheus (PromQL) | Line, area, and bar charts for CPU, memory, request rates, and p99 latency with hover tooltips |
| Deduplicated log tables | Grafana Loki (LogQL) | Groups repetitive log lines into patterns with occurrence counters and severity filters |
| Trace waterfall timelines | Grafana Tempo (TraceQL) | End-to-end distributed span timelines highlighting bottleneck microservices and error spans |
| Alert triage summaries | Alertmanager | Active alerts grouped by severity (Critical, Warning, Info) with one-click silence actions |