agent_kit 0.1.4
agent_kit: ^0.1.4 copied to clipboard
Drop-in Flutter widgets for AI agent UIs — tool-call cards, thinking bubbles, citation chips, plan-progress timelines. Backend-agnostic. shadcn-for-agents.
Changelog #
0.1.4 — 2026-06-10 #
Changed #
- Embed animated demo GIF inline at the top of the README so it renders
(and animates) directly on the pub.dev package page, not only inside
the screenshots carousel. Matches the
streamdownpackage pattern.
0.1.3 — 2026-06-10 #
Added #
screenshots:block inpubspec.yamlso pub.dev now renders the agent demo GIFs and tool-call cover image on the package page.
0.1.2 — 2026-06-03 #
Fixed #
AgentTimelineconsolidation now treatsThinkingEventas a singleton channel, not just a "collapse consecutive" rule. A Thinking → Plan → Thinking sequence (which happens any time the user triggers a replay or the agent emits a fresh reasoning step after a tool call) used to produce twoThinkingBubblechildren sharing the consttimeline-thinkkey and crashed the build with aDuplicate keys found … timeline-thinkassertion. The latestThinkingEventnow replaces the previous one anywhere in the consolidated list, mirroring howPlanEventandCitationEventare already handled.
0.1.1 — 2026-06-03 #
Fixed #
AgentTimelinenow consolidates the raw event stream before rendering, so repeatedToolCallEvents with the samecall.idupdate a single card in place instead of producing duplicate widget keys. ConsecutiveThinkingEvents, and successivePlanEvent/CitationEventsnapshots, are also collapsed to a single live widget. Fixes theDuplicate keys found … timeline-tool-<id>assertion when feeding state transitions for the same tool call intoAgentView.
0.1.0 — 2026-06-03 #
First public release. Drop-in widgets for the non-text parts of AI agent UIs.
Added #
- Core models
ToolCall+ToolCallState(pending / running / success / failed / cancelled) — immutable snapshots advance viacopyWithas streams update.ThinkingStepfor reasoning prose with anisStreamingflag.Citationfor retrieval sources (id, title, url, snippet).PlanStep+PlanStepState(pending / running / done / failed / skipped) with nested sub-step support.AgentEventDart 3 sealed union over the above +AgentEventStreamtypedef.toJson/fromJsonon every model. No code-gen.
- Tool widgets
ToolCallCard— collapsible card with animated state icon, args pretty-printed as JSON, smart result preview (string / JSON / image URL), error + retry slot, compact / expanded modes.ToolCallFeed— vertical feed keyed byToolCall.id.ToolRenderer.register(name, builder)extension API for custom per-tool bodies.
- Thinking widgets
ThinkingBubble— pulsing dot indicator, animated streaming label, auto-collapses when the step settles.ReasoningTrace— collapsible numbered reasoning log.
- Citation widgets
CitationChip— numbered inline badge,url_launchertap.CitationCard— favicon, host, title, snippet.CitationList— horizontal scrolling source strip.
- Plan / timeline widgets
PlanProgress— vertical stepper with state-coloured markers, nested sub-steps, optionalCancelslot.AgentTimeline— chronological mix of every event kind.
- Composition layer
AgentView— stream-in, widgets-out, 5-line integration.AgentEventBuilder— low-level builder for custom layouts.
- Theme
AgentKitThemewithfromColorScheme,light(),dark()constructors, per-state colours, density presets, and anAgentKitThemeScopeInheritedWidget.
Quality #
- 55 unit + widget tests passing.
flutter analyzewith strict casts / inference / raw-types: zero issues.RepaintBoundaryon every card; stable widget keys per event id.- No AI-provider SDK dependencies.
