Use cases
A use case is a ready-made setup: you pick what you want Tares to do, answer a few questions, and click Start. Tares creates the sources, view, trigger, agent and, where needed, MCP server behind it. Every object it creates is an ordinary Tares object on its normal page (Sources, Triggers, Tares agents, MCP servers); the use case page is the combined view of them.
The Use cases entry sits at the top of the console sidebar because it is the quickest way from an empty instance to something running. The primitives stay below it for when you want to wire things by hand.
Available use cases
| Use case | What it does | Guide |
|---|---|---|
| AI SRE demo (tagged demo) | Watches the bundled demo stack: three sources keyed by service (Prometheus metrics, the api-server’s logs, the alerts Prometheus fires), one timeline per service, a trigger that wakes an agent when an alert fires, and an agent that writes the first incident note back onto the timeline. The page has Cause an incident and Clear the fault buttons. | Build an AI SRE |
| Shared code context | Watches commits across your code repositories and keeps one shared context repository current: an agent reads each change and updates the pages that cover it, opening a pull request. | Keep shared code context current |
A use case marked demo needs the demo stack rather than your own systems; its setup page shows what to run first, with copy buttons, and detects what is already running.
Setting one up
Open Use cases, pick a card, click Set up. The setup page asks only for what it cannot work out itself: the AI SRE demo looks at Docker and fills in the Prometheus and api-server URLs from the running containers; the shared code context wizard lists the repositories your GitHub token can see. The last step shows exactly what Start creates, with the names of the objects. Some setup steps check themselves (an Anthropic key that is already set shows as done, and can be pasted right there when it is not).
The use case page
Each running use case has a page with:
- Cards for the counts that matter (sources or repos, runs, trigger last fired, created).
- How it works: the chain in four lines.
- Actions, when the use case has them (the AI SRE demo’s Cause an incident and Clear the fault).
- Runs: every run of the use case’s agent, newest first, with status, rounds and the result; each row opens that run on the agent’s page. Runs marked first look ran once when the use case started.
- Configuration: the settings you chose, the sources it created, what it created (each object linked to its own page with its state), and the change history (created, updated, paused, resumed, repaired).
Pause turns the trigger and agent off; sources keep ingesting so the timeline stays complete. Resume turns them back on. Edit reopens the setup with your values; on save the use case re-plans and applies only what changed. Delete removes the objects it created; events already stored stay unless you tick “also purge the events its sources ingested”.
Ownership
Objects a use case created carry a part of use case badge on their own pages and are fully ordinary there:
- Edit one by hand and it is marked customized; the use case keeps your version on its next re-plan instead of overwriting it.
- Delete one by hand and the use case page lists it as missing, with a Repair button that re-creates it from the plan (Repair also resets a customized object back to the plan).
- An object that already existed with the same name and belonged to no use case is adopted by the use case, not duplicated (this is how the AI SRE demo picks up a demo catalog you imported earlier).
In the catalog
A use case can be declared in catalog YAML, so a seed catalog can ship one and tares up creates
it on first boot:
usecases:
- recipe: ai_sre_demo
name: AI SRE demo
params:
prometheus_url: http://localhost:9090
api_server_url: http://localhost:8080
container: tares-demo-api-serverImport creates the instance by name or updates an existing one; export includes the section with the parameters (never credential values).
The API
Everything the console does is on the management API:
| Call | Does |
|---|---|
GET /api/usecases/recipes | the available use cases with their parameters, tags, setup steps and actions |
POST /api/usecases/recipes/{key}/detect | what the use case can work out from the environment (the AI SRE demo asks Docker what is running) |
POST /api/usecases {recipe, name?, params} | create; all or nothing |
GET /api/usecases and GET /api/usecases/{id} | list, or one instance with its objects |
PUT /api/usecases/{id} {params, name?} | re-plan and apply the difference |
POST /api/usecases/{id}/pause and /resume | trigger and agent off or on |
POST /api/usecases/{id}/repair {key} | re-create or reset one planned object |
POST /api/usecases/{id}/actions/{name} | run one of the use case’s actions (inject with {scenario} and clear on the demo) |
GET /api/usecases/{id}/summary | the instance plus what its page shows (runs, sources, last fired) |
DELETE /api/usecases/{id}?purge_events=true | delete, optionally purging ingested events |
Objects returned by /api/sources, /api/views, /api/triggers, /api/agents/builtin and
/api/mcp-servers carry owned_by (the use case id) and customized.
Want a use case that is not here yet? A use case is a small Python recipe (parameters, the objects it plans, an optional summary and actions). Tell us what you would set up next: help@glassflow.ai.