Skip to main content

Assistant

The assistant is a chat next to every page. It helps write and change agent configuration: build a parser from a sample payload, add an input to a layer, find out why a host gets a value, write a journey. It works with the same commands as stratactl, acts as you with your permissions, and its only changes are change sets it submits for review. What it can do and how it runs is described in Assistant.

1. Open the panel​

Assistant ① in the top bar opens the panel next to the page; Ctrl+. opens and closes it from anywhere.

The assistant panel opened next to the page of host web01, with the host as contextThe assistant panel opened next to the page of host web01, with the host as context
The assistant next to the page of host web01. ① open the panel, ② the page as context, ③ the model, ④ upload samples.

The page you open it from is the chat's Context ②: a host, an agent, a spec file, a change set, a rollout or a journey, so a question such as "why does this host get this interval?" needs no further explanation. Choose the Model ③ among those your admins configured, type the question and Send (Ctrl+Enter).

Until a tenant admin has configured a model, the panel says so:

The assistant panel of a tenant without a configured model: Assistant unavailableThe assistant panel of a tenant without a configured model: Assistant unavailable
The panel of a tenant without a configured model ①.

Tenant admins add the providers and models under Admin › Assistant (Assistant providers).

2. Follow what it does​

Answers are Markdown and appear as they are written. Every command the assistant runs shows as a block that you can expand:

A question in the assistant panel, the command the assistant ran, expanded with its output, and its answerA question in the assistant panel, the command the assistant ran, expanded with its output, and its answer
A question about production Tomcat hosts. ① the command the assistant ran, expanded to its output, ② its answer.

The block ① shows the command line and its exit status; expanded, its output. The commands are those of stratactl, called sp in the assistant's shell, run against the API with your session: the assistant sees what you may see and nothing more (Commands). Stop ends the current answer.

Chats are stored. Chats (the clock icon) lists them to reopen, rename or delete; New chat (+) starts another. A reload continues an interrupted answer.

3. Let it prepare a change set​

The assistant edits the spec in its working copy and, when you ask for it, submits the change as a change set for review:

The assistant edited a layer in /spec and submitted change set CS-421 for review; the panel links itThe assistant edited a layer in /spec and submitted change set CS-421 for review; the panel links it
The assistant edited layers/role-tomcat.toml and submitted CS-421 ①.

The change set ① links to its page. Approving and merging it stays with people, on the change set page or with stratactl, under the usual approval policies (Review and merge). The assistant cannot review, merge, roll out, pin, write secrets or change agents.

4. Upload samples​

To build a parser or check a transform, give the assistant the payloads it should work on. The paperclip uploads files to /samples (pasting files into the message field does the same); the folder icon uploads a directory, such as the --out directory of a local journey run, to /samples/runs/<name>/.

Two sample payloads uploaded to /samples, listed above the message fieldTwo sample payloads uploaded to /samples, listed above the message field
Two sample payloads in the chat. ① the samples, ② the upload's result.

The samples ① are stored with the chat; remove one with its bin icon. A sample reaches the model only when the assistant reads it, and parsers run on samples in your browser (telegraf-parse and vector-vrl).

5. Explore a website for a journey​

To write a journey, the assistant opens the target in a browser on an exploration runner, tries each step there and assembles the script from the steps that worked. The panel shows the session's page after every step:

The assistant explores shop.example.com on an exploration runner; the panel shows the page, its URL and the outcomeThe assistant explores shop.example.com on an exploration runner; the panel shows the page, its URL and the outcome
The assistant exploring shop.example.com on runner synth01. ① the page's latest screenshot, ② its URL, ③ End session.

Click the screenshot ① to enlarge it. The bar above it names the page and the runner and shows the outcome of the last step. End session ③ stops the session on the runner. Without an exploration runner, pair your own computer from the Journeys page (Explore from this computer). How the assistant explores, tries and repairs journeys is described in Synthetic journeys.