Loading AgentsKit ecosystem navigation…
AgentsKit Chat
Components

Error notice

Accessible alert with optional retry. Component key `error-notice`.

View canonical Markdown

Error notice

error-notice is an accessible alert for recoverable failures. Optional retryLabel enables a retry event.

Live preview

Error notice
Accessible alert with optional retry.
error-notice
Failed

Try again.

E_TEST

Demos use docs host CSS. Package primitives are intentionally unstyled so your product theme owns the look.

When to use

  • Surface adapter/tool failures without crashing the shell
  • When the host can retry the last operation

Prefer something else when

  • Silent progress → progress
  • Successful tool status → tool-call

Props (schema)

FieldTypeNotes
titlestringAlert title
messagestringHuman-readable detail
codestring?Optional machine code (≤128)
retryLabelstring?If set, show retry control

Frame example

code
{
  "protocol": "agentskit.chat.component",
  "version": 1,
  "type": "render",
  "componentKey": "error-notice",
  "instanceId": "error-notice-fixture",
  "props": {
    "title": "Failed",
    "message": "Try again.",
    "code": "E_TEST",
    "retryLabel": "Retry"
  },
  "fallback": {
    "kind": "error-notice",
    "summary": "Failed: Try again."
  }
}

Events

EventValueMeaning
retrynoneUser requested retry (only if retryLabel set)

Host wiring

code
import { ErrorNoticeComponent, defineComponentManifest, defineChat } from '@agentskit/chat'
import { AgentChat } from '@agentskit/chat/react'

const definition = defineChat({
  id: 'app',
  components: defineComponentManifest([ErrorNoticeComponent]),
  chat: { adapter },
})

export function App() {
  return (
    <AgentChat
      definition={definition}
      onComponentInteract={(event) => {
        // event === 'retry'; no value
        // { type: 'interact', componentKey: 'error-notice', instanceId, event: 'retry' }
      }}
    />
  )
}

For agents

FieldValue
componentKeyerror-notice
ExportErrorNoticeComponent
Protocolagentskit.chat.component v1
Envelopetype: "render" + instanceId + props + fallback
Eventsretry (none)
Host callbackonComponentInteract
Event shapetype always interact; event is retry (no value)
FallbackAlways include fallback.kind + fallback.summary

Do not invent props or events outside the schema. Unknown keys and invalid props stay inert.

Shells

ShellNotes
React / Vue / Svelte / Solid / AngularSame frame; replaceable slots
React NativeAccessibility roles from the catalog definition
InkTerminal-safe fallback when interactive chrome is limited