akashi_flutter 0.3.0
akashi_flutter: ^0.3.0 copied to clipboard
Reactive Flutter integration for the Akashi agent framework: an AgentController, AgentBuilder, message/part renderer, and Isolate offload for streaming agents in your UI.
Changelog #
0.3.0 #
- Initial release of the reactive Flutter integration.
AgentController— aChangeNotifierthat drives anAgentand folds its streamed events into observabletext/events/messages/isRunning/errorstate. It is also the agent'sApprovalHandler, surfacing apendingApprovalresolved byapprove()/reject().messagesaccumulates aMessagetranscript across turns;senddrives the agent over the full history, so successive sends form a multi-turn conversation that drops straight intoMessageListView.- Durable human-in-the-loop: a
durableApprovalrun surfaces assuspended(instead of a livependingApproval).approve()/reject()resume it from the checkpoint store, andresume(checkpointId, decision: …)resumes a suspension out of band (e.g. after a process restart). - Lifecycle:
dispose()cancels the in-flight run, rejects a pending in-process approval so the agent loop completes instead of hanging, and silences post-dispose notifications;stop()cancels a run without disposing.
AgentBuilder— rebuilds on controller changes.MessageListView— rendersMessage/Partexhaustively (text, reasoning, tool-call chips, results, media stubs).offload()— an Isolate (compute) helper for CPU-bound stages, with the deps-serializability contract documented.