b175718: # New Package: @inngest/use-agent
Introducing a comprehensive React hooks package for building AI chat interfaces with AgentKit networks.
@inngest/use-agent is a standalone npm package that provides a complete set of React hooks for integrating with AgentKit. This package extracts and consolidates all the React functionality needed to build sophisticated AI chat applications.
useAgent, useChat, useThreads for real-time streaming and thread managementuseEphemeralThreads, useConversationBranching, useEditMessage, useMessageActions, useSidebar, useIsMobileAgentProvider for shared connections and configurationDefaultAgentTransport and custom transport supportnpm install @inngest/use-agents
# Peer dependencies
npm install react @inngest/realtime uuid
import { useChat, AgentProvider } from '@inngest/use-agents';
function App() {
return (
<AgentProvider userId="user-123">
<ChatComponent />
</AgentProvider>
);
}
function ChatComponent() {
const { messages, sendMessage, status } = useChat();
return <div>/* Your chat UI */</div>;
}
This package enables developers to:
If you were previously using local hooks from AgentKit examples, replace local imports:
// Before
import { useChat } from "@/hooks";
import { AgentProvider } from "@/contexts/AgentContext";
// After
import { useChat, AgentProvider } from "@inngest/use-agents";
No functional changes are required - the API is identical to the previous local implementation.
Fetched April 3, 2026