Loading AgentsKit ecosystem navigation…
AgentsKit Chat

API reference

Public packages and primary exports for AgentsKit Chat.

View canonical Markdown

API reference

All packages use named exports. Runtime input must enter through exported schemas, decoders, or resolvers — TypeScript types alone are not a trust boundary.

Package map

PackagePrimary public API
@agentskit/chatdefineChat, sessions, controlled driver, routes, component manifest, theme/fallback, action policy/confirmation, Ask + deterministic adapters
@agentskit/chat/protocolTurn/session/component schemas & codecs, Ask events, deterministic contracts
@agentskit/chat/protocol/fixturesConformance fixtures for tests
@agentskit/chat/servercreateChatHandler, createAskServiceHandler, Web Request → streaming Response
@agentskit/chat/reactAgentChat, ChoiceList, StandardComponent, slots, toChatCssVariables
@agentskit/chat/react-nativeAgentChatNative, native slots/styles
@agentskit/chat/inkAgentChat, semantic fallback, Ink theme helper
@agentskit/chat/vueAgentChat, scoped slots
@agentskit/chat/svelteAgentChat, typed snippets
@agentskit/chat/solidAgentChat, render props
@agentskit/chat/angularAgentChatComponent, content templates
@agentskit/chat/devtoolsTrace capture, renderer outcome compare
@agentskit/chat-cliinit, add component, completion

Composition shape

code
import { defineChat } from '@agentskit/chat'
import { createChatHandler } from '@agentskit/chat/server'
import { AgentChat } from '@agentskit/chat/react'
import type { AdapterFactory } from '@agentskit/core'

export const createApp = (adapter: AdapterFactory) =>
  defineChat({
    id: 'app',
    chat: { adapter },
  })

// server
export const POST = createChatHandler({
  resolveDefinition: () => createApp(serverAdapter),
  authenticate: /* … */,
  sessionStorage: /* … */,
})

// client
export const UI = () => <AgentChat definition={createApp(clientAdapter)} />

Controlled sessions

createControlledChatDriver validates an external serializable snapshot and projects host lifecycle callbacks through the canonical AgentsKit ChatReturn shape. React and Ink AgentChat accept that via optional controlled.

Where to go next

GoalPage
ScaffoldCLI · Install
Live codeExamples
ComponentsCatalog
Adapters / providersAgentsKit providers
Tools / integrationsAgentsKit tools

Generated .d.ts in each package dist/ is the exact signature reference.