Skip to content

Add llm_meter (Analytics) and agent_kit (UI)#1039

Open
jayu1023 wants to merge 1 commit into
Solido:masterfrom
jayu1023:patch-3
Open

Add llm_meter (Analytics) and agent_kit (UI)#1039
jayu1023 wants to merge 1 commit into
Solido:masterfrom
jayu1023:patch-3

Conversation

@jayu1023
Copy link
Copy Markdown

@jayu1023 jayu1023 commented Jun 2, 2026

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 ### Analytics

Per-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 Mixpanel and Firebase Analytics
entries in the Analytics section — a telemetry SDK with pluggable
sinks — but scoped to LLM call data (token counts, USD, latency,
cache-hit %).

Note: an earlier revision of this PR mistakenly placed llm_meter
at the bottom of ### Internationalization. This revision moves it
to ### Analytics where it belongs, and fixes a stray double-space
in the bullet character.

2. agent_kit — under ### UI (new in this revision)

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 Chat entry in the UI section
since 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.

- 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.
@jayu1023 jayu1023 changed the title Add llm_meter under Components/Analytics Add llm_meter (Analytics) and agent_kit (UI) Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant