A structured explanation component for presenting system changes, agent decisions, or automated actions with supporting details and action buttons.

Installation
Schema & Prompt Control
Conversation
Instructions
# Initialize HAX in your projecthax init# Add the componenthax add artifact contextual-explanation
The contextual explanation component integrates with AI agents through CopilotKit. Agents automatically create explanation cards when they need to communicate why something happened, with structured details and action buttons.
Setup
import { HAXContextualExplanation, useContextualExplanationAction } from "@/hax/artifacts/contextual-explanation";export function SystemEventsPage() {const [artifacts, setArtifacts] = useState([]);// Register contextual explanation actions for AI agentsuseContextualExplanationAction({addOrUpdateArtifact: (type, data) => {setArtifacts(prev => [...prev, { type, data, id: Date.now() }]);}});return (<HAXContextualExplanationtitle="Network Routing Update"alertTitle="Why this happened"alertDescription="Agent detected high latency and switched to backup route"details={[{ label: "Previous Route", value: "us-west-1 → us-east-1", isBoldLabel: true },{ label: "New Route", value: "us-west-1 → eu-west-1 → us-east-1", isBoldLabel: true },{ label: "Latency Improvement", value: "45ms → 28ms (-38%)" }]}secondaryButtonLabel="Revert"primaryButtonLabel="Keep Change"/>);}
© 2025 Outshift. All Rights Reserved.
A structured explanation component for presenting system changes, agent decisions, or automated actions with supporting details and action buttons.

Installation
Schema & Prompt Control
Conversation
Instructions
# Initialize HAX in your projecthax init# Add the componenthax add artifact contextual-explanation
The contextual explanation component integrates with AI agents through CopilotKit. Agents automatically create explanation cards when they need to communicate why something happened, with structured details and action buttons.
Setup
import { HAXContextualExplanation, useContextualExplanationAction } from "@/hax/artifacts/contextual-explanation";export function SystemEventsPage() {const [artifacts, setArtifacts] = useState([]);// Register contextual explanation actions for AI agentsuseContextualExplanationAction({addOrUpdateArtifact: (type, data) => {setArtifacts(prev => [...prev, { type, data, id: Date.now() }]);}});return (<HAXContextualExplanationtitle="Network Routing Update"alertTitle="Why this happened"alertDescription="Agent detected high latency and switched to backup route"details={[{ label: "Previous Route", value: "us-west-1 → us-east-1", isBoldLabel: true },{ label: "New Route", value: "us-west-1 → eu-west-1 → us-east-1", isBoldLabel: true },{ label: "Latency Improvement", value: "45ms → 28ms (-38%)" }]}secondaryButtonLabel="Revert"primaryButtonLabel="Keep Change"/>);}
© 2025 Outshift. All Rights Reserved.