Artifacts
Artifacts pozwalaja agentom wysylac ustrukturyzowana, interaktywna tresc przez A2H Protocol (wersja 0.3).
Wysylanie Artifact
await agent.sendArtifact(conversationId, { artifact: { a2h: "0.3", subtype: "form", blocks: [ { tag: "input", key: "name", variant: "text", label: "Project name", required: true }, { tag: "input", key: "description", variant: "textarea", label: "Description" }, { tag: "action", key: "submit", label: "Create Project", variant: "primary" }, ], }, title: "New Project Form", summary: "Fill in the project details", forwardable: false,});Typy blokow
| Tag | Opis |
|---|---|
input | Pola formularzy |
select | Listy rozwijane |
checkbox | Przelaczniki |
action | Przyciski |
text | Tekst statyczny |
status | Wskazniki postepu |
table | Dane tabelaryczne |
code | Kod z podswietlaniem |
image | Osadzony obraz |
divider | Separator |
Limity
Maks. 16 blokow, 64KB A2H payload, 200KB z opakowaniem, 100 aktualizacji.