|
1 | 1 | # @inngest/agent-kit |
2 | 2 |
|
| 3 | +## 0.12.0 |
| 4 | + |
| 5 | +### Minor Changes |
| 6 | + |
| 7 | +- b175718: # Comprehensive AgentKit Enhancements |
| 8 | + |
| 9 | + Major improvements to AgentKit with enhanced documentation, new API routes, comprehensive UI components, and example applications. |
| 10 | + |
| 11 | + ## 📚 Documentation Enhancements |
| 12 | + |
| 13 | + **New Advanced Pattern Guides:** |
| 14 | + |
| 15 | + - Added `legacy-ui-streaming.mdx` - Guide for UI streaming with useAgent hook |
| 16 | + - Added `use-chat.mdx` - Comprehensive guide for building chat interfaces |
| 17 | + - Added `use-threads.mdx` - Documentation for managing conversation threads |
| 18 | + - Added `use-agent.mdx` - Updated agent integration patterns |
| 19 | + |
| 20 | + **Documentation Reorganization:** |
| 21 | + |
| 22 | + - Moved UI streaming guides to dedicated UI Integration section |
| 23 | + - Enhanced advanced patterns with practical examples |
| 24 | + - Added sequence diagrams and usage guides |
| 25 | + |
| 26 | + ## ⚡ Revolutionary Automatic Event Streaming System |
| 27 | + |
| 28 | + **Comprehensive Streaming Architecture:** |
| 29 | + |
| 30 | + - **StreamingContext**: Hierarchical context management for network/agent runs with shared sequence counters |
| 31 | + - **Event Schema**: 15+ event types covering complete agent lifecycle (run.started, part.created, text.delta, tool calls, HITL, etc.) |
| 32 | + - **Automatic Enrichment**: Events auto-enriched with threadId, userId, and context metadata |
| 33 | + - **Sequence Management**: Monotonic sequence numbering for perfect event ordering across contexts |
| 34 | + - **Parent/Child Contexts**: Seamless context inheritance for agent runs within network runs |
| 35 | + - **Proxy-based Step Wrapper**: Transparent integration with Inngest steps without breaking existing code |
| 36 | + - **Best-effort Publishing**: Graceful error handling that never breaks agent execution |
| 37 | + - **OpenAI-Compatible IDs**: Automatic generation of tool call IDs within OpenAI's 40-character limit |
| 38 | + |
| 39 | + **Event Types Supported:** |
| 40 | + |
| 41 | + - **Lifecycle Events**: `run.started`, `run.completed`, `run.failed`, `run.interrupted` |
| 42 | + - **Content Streaming**: `text.delta`, `reasoning.delta`, `data.delta` |
| 43 | + - **Tool Integration**: `tool_call.arguments.delta`, `tool_call.output.delta` |
| 44 | + - **Part Management**: `part.created`, `part.completed`, `part.failed` |
| 45 | + - **HITL Support**: `hitl.requested`, `hitl.resolved` |
| 46 | + - **Metadata & Control**: `usage.updated`, `metadata.updated`, `stream.ended` |
| 47 | + |
| 48 | + **Developer Experience:** |
| 49 | + |
| 50 | + - **Zero Configuration**: Automatic context extraction from network state |
| 51 | + - **Debug Logging**: Comprehensive debug output for development |
| 52 | + - **Shared Sequence Counters**: Perfect event ordering across multiple contexts |
| 53 | + - **Flexible Publishing**: Configurable publish functions for any transport |
| 54 | + |
| 55 | + This streaming system enables real-time UI updates that perfectly match the `useAgent` hook expectations, creating seamless agent-to-UI communication. |
| 56 | + |
| 57 | + ## 🚀 New API Routes & Backend Features |
| 58 | + |
| 59 | + **Chat & Communication:** |
| 60 | + |
| 61 | + - `POST /api/chat` - Main chat endpoint with Zod validation and Inngest integration |
| 62 | + - `POST /api/chat/cancel` - Chat cancellation with run interruption events |
| 63 | + - `POST /api/approve-tool` - Human-in-the-loop tool approval system |
| 64 | + - `POST /api/realtime/token` - Real-time subscription token generation |
| 65 | + |
| 66 | + **Thread Management:** |
| 67 | + |
| 68 | + - `GET/POST /api/threads` - Thread listing and creation with pagination |
| 69 | + - `GET/DELETE/PATCH /api/threads/[threadId]` - Individual thread operations |
| 70 | + - Thread title generation and metadata management |
| 71 | + - Support for both authenticated and anonymous users |
| 72 | + |
| 73 | + **Integration:** |
| 74 | + |
| 75 | + - `/api/inngest/route` - Inngest function serving with runAgentChat |
| 76 | + - PostgresHistoryAdapter integration for persistent storage |
| 77 | + |
| 78 | + ## 🎨 Comprehensive UI Component Library |
| 79 | + |
| 80 | + **AI-Specific Elements:** |
| 81 | + |
| 82 | + - `Actions` & `Action` - Interactive action buttons with tooltips |
| 83 | + - `Branch` components - Conversation branching and navigation |
| 84 | + - `CodeBlock` - Syntax-highlighted code display with copy functionality |
| 85 | + - `Conversation` - Chat conversation containers with scroll management |
| 86 | + - `Image` - AI-generated image display components |
| 87 | + - `InlineCitation` - Citation cards and source referencing |
| 88 | + - `Loader` - Loading animations and states |
| 89 | + - `Message` components - Message display with avatars and content |
| 90 | + - `PromptInput` - Responsive chat input with model selection |
| 91 | + - `Reasoning` - Agent reasoning display with streaming support |
| 92 | + - `Sources` - Source material display and linking |
| 93 | + - `Suggestion` - AI suggestion chips and interactions |
| 94 | + - `Task` - Task display and management components |
| 95 | + - `Tool` - Tool call display with input/output views |
| 96 | + - `WebPreview` - Web page preview components |
| 97 | + |
| 98 | + **Chat Interface Components:** |
| 99 | + |
| 100 | + - `Chat` - Main chat interface with sidebar integration |
| 101 | + - `EmptyState` - Welcome screen with suggestions |
| 102 | + - `ChatHeader` - Header with actions and agent information |
| 103 | + - `ShareDialog` - Thread sharing functionality |
| 104 | + - Message parts for all content types (Text, Tool, Data, File, Source, etc.) |
| 105 | + - `MessageActions` - Copy, edit, regenerate, like/dislike functionality |
| 106 | + - `MessageEditor` - In-place message editing |
| 107 | + - Sidebar components (Desktop & Mobile) with thread management |
| 108 | + |
| 109 | + **Playground & Development Tools:** |
| 110 | + |
| 111 | + - `SqlPlayground` - Interactive SQL query interface |
| 112 | + - `SqlEditor` - SQL editing with syntax highlighting |
| 113 | + - `EphemeralChat` - Client-side only chat for demos |
| 114 | + - `MultiChat` - Multiple concurrent chat sessions |
| 115 | + - Tab management for multiple contexts |
| 116 | + |
| 117 | + **UI Primitives & Layout:** |
| 118 | + |
| 119 | + - Complete shadcn/ui component library integration |
| 120 | + - `Button`, `Card`, `Dialog`, `Sheet`, `Tabs` and 30+ UI primitives |
| 121 | + - Responsive layouts and mobile-first design |
| 122 | + - Dark/light theme support with CSS custom properties |
| 123 | + |
| 124 | + ## 🔧 Developer Experience Improvements |
| 125 | + |
| 126 | + **Example Applications:** |
| 127 | + |
| 128 | + - Multi-chat interface for concurrent conversations |
| 129 | + - SQL playground with chat integration |
| 130 | + - Thread-based routing (`/chat/[threadId]`) |
| 131 | + - Responsive design patterns |
| 132 | + |
| 133 | + **Build & Configuration:** |
| 134 | + |
| 135 | + - Next.js App Router integration |
| 136 | + - Tailwind CSS with custom design system |
| 137 | + - TypeScript throughout with strict type checking |
| 138 | + - Component composition patterns |
| 139 | + |
| 140 | + **Development Tools:** |
| 141 | + |
| 142 | + - Hot reload support for rapid development |
| 143 | + - Comprehensive prop interfaces and documentation |
| 144 | + - Modular component architecture |
| 145 | + - Mobile-responsive design patterns |
| 146 | + |
| 147 | + ## 🎯 Key Benefits |
| 148 | + |
| 149 | + - **Faster Development**: Pre-built components reduce implementation time |
| 150 | + - **Consistent UX**: Unified design system across all AgentKit applications |
| 151 | + - **Production Ready**: Battle-tested components with proper error handling |
| 152 | + - **Flexible Architecture**: Composable components for custom implementations |
| 153 | + - **Enhanced Documentation**: Clear guides for common integration patterns |
| 154 | + |
| 155 | + This release significantly enhances the AgentKit ecosystem with production-ready tools for building sophisticated AI chat applications. |
| 156 | + |
3 | 157 | ## 0.11.0 |
4 | 158 |
|
5 | 159 | ### Minor Changes |
|
0 commit comments