Skip to content

@uservane/agent-react

Shared React UI for agent-native capture: provider, inline feedback, and hooks. Depends on @uservane/agent-core. Framework adapters re-export these components so hosts do not need to pick this package separately.

Terminal window
npm install @uservane/agent-react
# peer: react >= 18
import { UserVaneProvider, useUserVane, InlineFeedback } from "@uservane/agent-react";
export function ChatShell() {
return (
<UserVaneProvider apiKey="uv_pk_live_..." surveySlug="post-task">
<Chat />
</UserVaneProvider>
);
}
function Chat() {
const { resolveTask, bind, controller } = useUserVane();
// after server mints a bound token:
// bind({ surveyId, showToken, sessionId });
// at true resolution:
// resolveTask({ outcome: "done" });
return <InlineFeedback controller={controller} />;
}
ExportRole
UserVaneProviderInit controller, optional identity, default inline ask
useUserVane()resolveTask, bind, controller, and related controller methods
InlineFeedbackInline ask UI
AgentControllerRe-exported headless controller from agent-core
UserVaneErrorBoundaryError boundary

v1 targets chat-UI agents where a browser renders the conversation. Headless or voice-only agents (no render surface) are out of scope for this package.

TypeDoc · Agent core · Agent quickstart