Skip to content

In-app AI chat assistant "any" for finding and creating plots #5405

@MarkusNeusinger

Description

@MarkusNeusinger

Idea

Add an AI chat assistant called "any" that lives in a small floating/overlay chat
window on anyplot.ai. Users can describe their data or goal in natural language, and
"any" helps them in three modes:

  1. Find — recommend matching specs from the gallery
  2. Navigate — drive the SPA to specs, libraries, filters
  3. Create — help propose / generate a new plot when nothing fits

User experience

  • Persistent floating chat bubble (collapsible overlay, doesn't block content)
  • User types something like "I have a time series with two categories and want to
    compare trends"
  • "any" suggests relevant specs (e.g. line-timeseries-multi, area-stacked-temporal)
    with a preview thumbnail and a one-line rationale, and can navigate to them
  • Follow-up questions stay in context: "show me the plotly version", "something
    more minimal"
    , "compare to bar chart alternatives"
  • If nothing fits: "I don't see a good match — want me to draft a new spec?"

Capabilities

Finding

  • Semantic match against specification.md + tags
  • Filter / refine via natural language (library, domain, complexity)

Navigating

  • Programmatic SPA routing (React Router) to spec / library / catalog pages
  • Apply / clear catalog filters
  • Switch library tab inside SpecDetailView
  • Copy code, open interactive preview

Creating

  • Conversational spec drafting: ask clarifying questions about data shape, goal,
    audience
  • Produce a draft specification.md + suggested tags
  • Submit as a GitHub Issue with spec-request label (so the existing
    spec-create.yml pipeline takes over) — never bypass the workflow
  • Optionally attach the user's data sample / sketch as context
  • Show the user a link to the resulting issue / PR for follow-up

Architecture sketch

Framework: Google ADK (Agent Development Kit). Preferred over alternatives
because of its clean tool/agent model, streaming support, and good developer
ergonomics from prior experience.

  • Agent runtime: ADK agent hosted alongside the FastAPI backend (separate
    process or sub-app), exposes a streaming chat endpoint consumed by the SPA
  • Model: Claude (consistent with the rest of the platform — code generation
    and quality review already use Claude); ADK supports multi-model, so this
    can be swapped if needed
  • Tool surface (frontend, called via tool-use → SPA action bridge):
    navigate, applyFilter, selectLibrary, copyCode, openInteractive
  • Tool surface (backend, native ADK tools): searchSpecs, getSpec,
    draftSpec, createSpecRequestIssue
  • Memory: per-session context via ADK session state (data shape, prior
    preferences); no cross-session persistence in v1
  • Frontend: small React component (floating bubble + chat panel) that
    consumes the streaming endpoint and dispatches frontend tool calls into
    the existing SPA (router + filter hooks)

Open questions

  • Deployment shape: same Cloud Run service as the API, or separate service?
  • Auth / rate limiting (anonymous vs. signed-in)
  • Free (Core) vs. premium gate per docs/concepts/vision.md
  • Telemetry via Plausible: recommendation acceptance, create-flow conversion
  • Should "create" mode also support uploading a data sample (ties into the
    premium "your data" feature in the vision doc)?
  • Relationship to the existing MCP server (api/mcp/) — share tools or
    keep separate?

Related

  • docs/concepts/vision.md — natural-language search, MCP server, "your data"
  • api/mcp/ — existing MCP server (potential tool-sharing target)
  • Existing spec-creation pipeline (spec-create.yml) — must remain the single
    path for new specs; "any" only drafts and submits the request issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestinfrastructureWorkflow, backend, or frontend issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions