Add llm_meter (Analytics) and agent_kit (UI)#1039
Open
jayu1023 wants to merge 1 commit into
Open
Conversation
- llm_meter: per-request token cost / latency / cache HUD for Flutter LLM apps. Moved from Internationalization (wrong section in earlier revision of this PR) to Analytics, alongside the existing telemetry SDK entries (Usage, Firebase Analytics, Pure Mixpanel). Also fixes a stray double-space in the bullet. - agent_kit: drop-in widgets for the non-text parts of an AI agent UI (tool calls / thinking / citations / plan). Placed next to Flyer Chat in the UI section since it visualises what an agent is doing rather than the chat message itself — complementary, not overlapping.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds two Flutter packages I built for the AI / LLM app ecosystem. Bundling
into one PR because they're sibling packages from the same portfolio
release week.
1. llm_meter — under
### AnalyticsPer-request token cost, latency, and cache-hit observability for any
Flutter LLM app. Built-in pricing for 31 hosted models (GPT-5,
Claude 4.7, Gemini 2.5, Llama 3.3, Mistral, Grok, DeepSeek, Cohere).
Sinks for PostHog and Mixpanel with batching + retry. Drop-in wrapper
around any Future or Stream, no provider SDK dependency.
Same shape as the existing
Pure MixpanelandFirebase Analyticsentries in the Analytics section — a telemetry SDK with pluggable
sinks — but scoped to LLM call data (token counts, USD, latency,
cache-hit %).
2. agent_kit — under
### UI(new in this revision)flutter analyzestrict-mode clean.Drop-in Flutter widgets for the non-text parts of an AI agent UI:
tool-call cards with animated state icons, JSON args pretty-print,
result preview, retry slot; Claude / o1-style thinking bubbles with
auto-collapse; Perplexity-style citation chips + cards; multi-step
plan-progress timelines with nested children and state-coloured
markers. One-line integration via
AgentView(stream: agent.events).Backend-agnostic — pairs with any LLM client.
Placed right after the existing
Flyer Chatentry in the UI sectionsince this is the layer above chat: Flyer Chat covers the
message bubble, agent_kit covers what the agent is doing while
producing that message. Complementary, not overlapping.
Happy to relocate either entry if you prefer different buckets — just
let me know. I can also split this back into two PRs if bundling
isn't appreciated.