yolo-data

简体中文 English

YOLO Data Agent | Governed Conversational Analytics

YOLO Data Agent is built for teams that need consistent business definitions, enforceable data permissions, and reviewable analytical evidence. Users ask, refine, break down, and analyze business questions in natural language. Administrators configure topics, metrics, datasets, models, Skills, and access boundaries.

The platform does not treat model-generated SQL as a trustworthy answer. Models interpret questions, propose plans, and explain results; YOLO owns context resolution, query contracts, authorization, read-only query generation, result locking, and evidence persistence.

Design Goals

Design Principles

1. The YOLO session is the sole context authority

YOLO owns conversation messages, task state, inherited conditions, clarification decisions, permissions, and workspace references. Every turn receives a versioned context. A model or planning thread cannot independently inherit a prior metric, time range, or filter.

This lets follow-ups such as “group it by region,” “use this year,” or “only East China” continue from explicit task state instead of guessed chat history.

2. Contract-first: validate before accessing data

Models submit structured query intent. YOLO compiles it into a query contract and checks that:

No data query runs until the contract passes. The platform does not substitute a similar field to manufacture an answer.

3. The model proposes; the platform decides

Models are useful for semantic interpretation, planning, method selection, and business communication. Deterministic code owns date calculations, permission merging, field allowlists, SQL compilation, numeric calculations, and result validation. Every numerical claim must come from a successful locked result.

4. Routing is decided per turn

Simple metric questions use the low-latency deterministic path. Comparisons, attribution, diagnosis, reports, and code-driven analysis can use a multi-step planning path. Routing is recalculated on every turn, so an existing planning thread never forces a later simple question onto the complex path. Fast turns are included in the canonical context when a later complex turn resumes planning.

5. Workflow is an execution projection, not a fixed pipeline

YOLO defines 14 standard stages as shared vocabulary for runtimes, gates, Skills, audit, and UI presentation. A question does not mechanically execute every stage. The UI displays only work that actually occurred, and Skills participate only in their relevant planning, execution, or validation phases.

6. Results precede narrative

YOLO creates a stable result snapshot before producing an explanation, chart, or analytical report. Follow-ups and result operations prefer the locked snapshot, reducing unnecessary re-querying and result drift.

Architecture

flowchart TB
  USER["Business user / administrator"] --> UI["Query and administration UI"]
  UI --> API["HTTP API / NDJSON event stream"]

  API --> AGENT["YOLO Agent Orchestrator"]
  AGENT --> CONTEXT["Conversation context and task state"]
  AGENT --> ROUTER["Per-turn intent and runtime routing"]
  ROUTER --> FAST["Deterministic fast path"]
  ROUTER --> PLAN["Multi-step planning runtime"]

  FAST --> CONTRACT["Query contract and deterministic gates"]
  PLAN --> CONTRACT
  CONTRACT --> TOOLS["Governed query / analysis / Skills"]
  TOOLS --> DATA["Metric services and business datasets"]
  TOOLS --> SANDBOX["Restricted code analysis"]

  DATA --> RESULT["Stable results, evidence, and reports"]
  SANDBOX --> RESULT
  RESULT --> WORKSPACE["Conversation, workspace, feedback, and audit"]

  CONFIG["Topics, models, semantics, and permissions"] --> AGENT
  STORE["SQLite / MySQL platform database"] --> AGENT
  AGENT --> STORE

Layers

Layer Responsibility
Experience Questions, follow-ups, clarification, charts, Markdown reports, and workspace files
Agent orchestration Context resolution, per-turn routing, tools, recovery, reflection, and answer generation
Semantics and governance Business vocabulary, metrics, field roles, value domains, contracts, permissions, and gates
Execution Metric queries, read-only dataset queries, derived calculations, code analysis, and validation
Persistence Users, topics, sessions, task state, workspaces, audit, and platform configuration

Complex tasks can use the bundled open-source planning runtime, but it is only a replaceable component in the orchestration layer. YOLO continues to own conversation context, query contracts, authorization, and result evidence.

Query Lifecycle

User question
  → load the YOLO session, long-term memory, and topic configuration
  → classify a new question, follow-up, result operation, or clarification
  → select the deterministic or multi-step planning path
  → resolve metrics, dimensions, time, and business filters
  → compile and validate the query contract
  → execute read-only queries or analysis through governed tools
  → lock the result and produce a chart, answer, or analytical report
  → persist task state, workspace artifacts, and audit evidence

Query execution, recovery, and post-answer reflection share a per-session lock so concurrent requests cannot interleave messages, task state, or workspace writes.

Core Capabilities

Screenshots

Start a query

Conversational analytics

DataAgent configuration

Quick Start

Requirements

Linux

git clone https://github.com/xiaour/yolo-data.git yolo-data
cd yolo-data
bash start.sh

Windows PowerShell

git clone https://github.com/xiaour/yolo-data.git yolo-data
cd yolo-data
.\start.ps1

The launcher guides first-time dependency and platform database initialization. Later runs start the service directly. Open http://localhost:8088/ by default.

Docker Compose

docker compose up -d --build

Change the default password after the first login. Public deployments must use AUTH_MODE=session behind an HTTPS reverse proxy.

Initial Configuration

  1. Add a Responses API-compatible model and select the platform or topic default.
  2. Connect a metric service, or create a business data source and synchronize dataset fields.
  3. Confirm field roles, business names, aggregations, default time fields, and value domains.
  4. Configure a DataAgent with its model, data scope, Skills, and topic prompt.
  5. Grant users access and row or column policies, then verify results with a business account.

Configuration Rules

See .env.example for common variables and yolo-conf.yaml for complete configuration descriptions.

Security and Production Deployment

API Example

curl -N -X POST http://localhost:8088/api/chat/query/stream \
  -H 'Content-Type: application/json' \
  -b cookie.txt \
  -d '{
    "themeId": 1,
    "question": "Which customers declined most year over year, and where are the opportunities?"
  }'

Documentation

Contributing

License

Apache License 2.0. See LICENSE.