🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@agentskit/chat

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agentskit/chat

Cross-framework application definitions for AgentsKit Chat.

Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
278
2.96%
Maintainers
1
Weekly downloads
 
Created
Source

@agentskit/chat

Framework-neutral application definitions for AgentsKit Chat.

Actionable choices use createActionConfirmation, which delegates validation, canonical confirmation state, approval, denial, and execution to AgentsKit.

Use createCapabilityPolicy and withActionPolicy to default-deny actions from trusted session capabilities while keeping enforcement in AgentsKit.

The package also provides session-scoped deterministic routes and explicit conversation-state projections while unresolved turns stay on the upstream AgentsKit controller. Conversation definitions compile to published @agentskit/statechart; this package retains application routing and session composition rather than implementing another transition engine.

const definition = defineChat({ id: 'support', chat: agentskitChatConfig })

defineChat preserves the upstream ChatConfig; it does not create another runtime.

Use resumeChatSession(definition, { sessionId, storage }) for cross-client application metadata and pass the returned session to any renderer. Keep messages in definition.chat.memory using upstream ChatMemory.

The package also owns the runtime-validated semantic fallback envelope shared by native renderers:

const fallback = parseSemanticFallback({ kind: 'chart', summary: 'Revenue rose 12%.' })
formatSemanticFallback(fallback)
// [unsupported visual: chart] Revenue rose 12%.

Custom application UI is declared through defineComponentManifest. The first schema-backed component is ChoiceListComponent; untrusted frames must pass resolveComponentFrame before rendering.

Shared Ask-service hosts use createAskAdapter and createAskSessionMemory. The adapter owns the validated NDJSON boundary and ordered text/source projection; memory composes @agentskit/memory/web-storage rather than implementing another message store. See docs/protocol/ask-service.md.

To answer exact local facts before Ask or another backend, verify the artifact and compose createDeterministicAnswerAdapter({ artifact, expectedContentHash, expectedSiteId, fallbackMode, fallback }). Wire its resolveChoiceSubmission into definition.choiceSubmission so only adapter-projected, single-use choices can submit their visible alias. One exact match renders locally, ambiguity exposes visible unique choices across all seven renderers, disabled fallback never calls the backend, and bounded successful backend streams receive the same answer envelope on completion. The contract is accepted in ADR-0024; see docs/protocol/deterministic-answers.md.

FAQs

Package last updated on 13 Jul 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts