Loading AgentsKit ecosystem navigation…
AgentsKit Chat
Components

Source list

Cited sources for RAG-style answers. Component key `source-list`.

View canonical Markdown

Source list

source-list presents citations (title, optional URL, optional snippet). Opening a source emits open with the source id.

Live preview

Source list
Cited sources with optional URLs and snippets.
source-list

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

When to use

  • RAG / docs answers that must show provenance
  • When the host should navigate on citation click

Prefer something else when

  • Single deep-link card → link-card
  • Structured comparison tables → table

Props (schema)

FieldTypeNotes
labelstringList heading
sources1–50 itemsid, title, optional url, optional snippet
sources[].urlportable URL?Relative or http(s) only

Frame example

code
{
  "protocol": "agentskit.chat.component",
  "version": 1,
  "type": "render",
  "componentKey": "source-list",
  "instanceId": "source-list-fixture",
  "props": {
    "label": "Sources",
    "sources": [
      {
        "id": "docs",
        "title": "Documentation",
        "url": "/docs",
        "snippet": "Component protocol overview."
      }
    ]
  },
  "fallback": {
    "kind": "source-list",
    "summary": "Sources: Documentation."
  }
}

Events

EventValueMeaning
openidSource id that was opened

Host wiring

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

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

export function App() {
  return (
    <AgentChat
      definition={definition}
      onComponentInteract={(event) => {
        // event === 'open'; value is source id
        // { type: 'interact', componentKey: 'source-list', instanceId, event: 'open', value: sourceId }
      }}
    />
  )
}

For agents

FieldValue
componentKeysource-list
ExportSourceListComponent
Protocolagentskit.chat.component v1
Envelopetype: "render" + instanceId + props + fallback
Eventsopen (id)
Host callbackonComponentInteract
Event shapetype always interact; event is open; value is source id
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