LabsThis feature is in Labs.
astro otto in a terminal, in an editor tab next to your code. This document explains how to use the chat. For the actions Otto can take, see Otto tools and Otto skills.
Open the chat
Use any of the following options:- Click the Otto icon in the Deployments view’s title bar.
- Click the Otto icon in the editor toolbar.
- Run Open Otto Chat from the Command Palette.
Send a message
Enter your message in the box at the bottom of the chat and press Enter. Press Shift+Enter to start a new line. In an empty message box, press Up and Down to recall messages you sent earlier. While Otto works, a line at the end of the conversation shows how long it has been working.Steer Otto while it works
You can send a message while Otto is working. Otto reads the message after it finishes its current step, which is a tool call or an answer it’s writing, and answers it in the same turn. Until Otto reads it, the message appears dimmed with the caption Otto will read this after its current step.Stop a turn
Click Stop, or press Esc when no menu or approval is open. Otto stops, and any message it hasn’t read yet returns to the message box. Otto keeps the conversation up to that point, but doesn’t remember the partial answer it was writing when you stopped it, even though the answer stays on screen.Give Otto context
Attachments appear above the message box until you send the message. To remove one, click × on the attachment.Attach selected code
Select code in an editor, then use any of the following options:- Press Cmd+Option+O on macOS, or Ctrl+Alt+O on Windows and Linux.
- Right-click the selection and choose Add Selection to Otto Chat.
- In the chat, click the paperclip and choose Attach selected code.
etl.py:15-28 · 14 lines. Otto receives the code with its path and line numbers, so it can read the rest of the file or edit the code in place. To share a whole file, attach the file instead.
If you haven’t selected anything, the shortcut and Add Selection to Otto Chat attach the line your cursor is on. The code goes to the chat you used last.
Attach a file
To attach any file in your workspace, enter@ in the message box, then choose a file from the list. Continue typing to filter the list. The file appears as a pill in your message, such as why does @etl.py fail?.
To attach the file you have open, right-click in the editor and choose Add Current File to Otto Chat, or click the paperclip in the chat and choose Attach current file.
When you attach a file, Otto receives its path and reads the file itself, so the file’s size doesn’t matter.
Attach images
To attach a screenshot or another image, paste it into the message box, drag it into the chat, or click the paperclip and choose Upload an image from your computer…. You can attach up to five PNG, JPEG, GIF, or WebP images to a message. A message with an image must also include text. If the model you chose doesn’t accept images, the chat tells you when you attach one.Share the open file
By default, each message tells Otto which file is open in your editor, so you can ask about “this Dag” without naming it. Otto receives the path only and reads the file if it needs to. The file name appears next to the paperclip. The extension doesn’t share the open file when your message already names a file, when the message is a slash command or shell command, or when you send the message while Otto is working. To stop sharing the open file, click the paperclip and choose Stop sharing the open file. The extension remembers this choice for new chats in the workspace.Project information Otto receives
When a chat starts, the extension tells Otto about the Astro project it runs in:- The project’s name, from
.astro/config.yaml. - Whether the project’s local Airflow environment is running, and in standalone or Docker mode.
- The Airflow version and Python interpreter.
- Import errors and failed Dag runs from the last 24 hours, if local Airflow is running.
- Any other Astro projects open in the window.
af CLI to query Dag runs, task logs, connections, and variables.
The extension collects this information when Otto starts, which happens when you open a chat or after you stop a turn. If you start or stop local Airflow during a conversation, tell Otto, or start a new chat so that Otto picks up the new state. Stopping a running turn also restarts Otto with the new state.
Ask Otto about a failure
In the Deployments and Local views, failed Dag runs and import errors have an Otto icon. Click it to send Otto a question about the failure, with the task logs or traceback attached. The question goes to your open chat if it’s empty, or to a new chat if it isn’t.Approve file edits and commands
Depending on the permission mode, Otto asks for approval before it changes a file or runs a command. The request appears as a card in the conversation, with Otto’s options as buttons. Otto waits until you choose one. To decline, press Esc. For a file edit, the card shows the change as a diff before Otto writes anything. After the edit, the card keeps the diff, and its title shows the number of lines added and removed, such as+2 −1.
For a command, Otto’s options can include allowing that command, or similar commands, for the rest of the chat. To create a rule that persists, use /permissions.
Answer Otto’s questions
Sometimes Otto asks a question before it continues. The question appears as a card with options. Click an option, or press Enter to choose the highlighted one. Some questions also offer Type something, to answer in your own words, or Chat about this, to answer in a regular message.Choose a permission mode
The permission mode controls what Otto can do without asking. Choose a mode from the picker below the message box.
In Auto-accept edits mode, Otto still asks before it runs a command that:
- Reaches outside the project folder, such as a command that writes to
/tmp. - Reads a sensitive file, such as
.env. - Is too complex for Otto to check, such as a command that uses variables or
ifstatements.
Manage permission rules
Enter/permissions to list, add, and remove Otto’s permission rules, or to change its mode.
Choose a model and reasoning level
Choose a model from the Model picker below the message box. The list shows the models available to your Astro Organization. See Otto models and regions. The Reasoning picker sets how much Otto reasons before it answers: Off, Minimal, Low, Medium, High, or Max. Default uses Otto’s own setting and takes effect the next time the chat’s Otto process starts, for example after you stop a turn. You can’t change the model or reasoning level while Otto is working.Use slash commands and shell commands
Enter/ at the start of a message to see Otto’s commands. Continue typing to filter the list, then press Enter or click a command. Commands for Otto’s skills appear at the end of the list as skill:<name>.
Start a message with ! to run a shell command in the project folder without asking Otto. For example:
!! instead. To stop a long-running command, click Stop.
Manage chats
Each chat is a separate conversation with its own transcript, permission mode, model, and Otto process.Start a new chat
Click New chat (+) in the chat header, or run New Otto Chat from the Command Palette. Each chat opens as a tab in the same editor group, named Otto until Otto gives it a title. A new chat starts with the permission mode, model, and reasoning level you chose most recently in the workspace. A change in one chat doesn’t affect other open chats.Resume a past chat
- Click Past chats in the chat header, or run Resume Otto Chat from the Command Palette.
- Choose a chat from the list. Each entry shows its first message and when you last used it.