Skip to main content

Sage, your assistant

Sage is the AutoSage assistant built into the terminal app. Type a question without ! and Sage answers. It can look things up by itself and, with your approval, make changes for you: run sagex commands, write and edit files in your workspace, and run shell commands.

❯ why did my last deploy fail?
❯ create a script that checks disk usage on Linux and push it
❯ run "Nightly Backup" and tell me if anything fails

Sage needs you to be signed in (sagex auth login).

Asking​

  • Type a line without !. The reply streams into the transcript as Markdown. Esc stops it.
  • Ask about what you just ran. Your next question carries the output of the command you just ran, so "why did that fail?" just works. Sage gets the end of the output, with obvious secrets masked, and never for --reveal or environment dumps.
  • Sage remembers the conversation until you start a new one with /new.

What Sage can do​

Every time Sage uses a tool, a card appears in the transcript with the tool, the exact command, and its output. Click a finished card to expand it.

Sage can…How it asks
Look things up: list, show, render, trigger invoke, syntax, workspace show, and any command's --helpRuns them without asking (they don't change anything)
Change things: run, create, update, rename, delete, push, copy, trigger fire / enable / disableAn approval card first
Read, write, edit and delete files in your workspaceAn approval card first; writes show the new file or a diff
Run shell commands on your machine (check a version, install a tool)An approval card first, in your current shell

"Create a script that…" ends with the script written to scripts/ in your workspace and pushed to AutoSage. A workflow run that Sage starts draws its live graph inside the card.

Approval cards​

An approval card shows a one-line description of what Sage wants to do and the exact command or file change. Answer with:

KeyWhat it does
yRun it, this once
aAllow it for the rest of this app session (that command on that resource, that file, or that exact shell command)
nDon't run it. Sage is told you declined
EscWithdraw the card and stop Sage's reply
  • Deletes always ask, and can't be allowed for the session. So do shell commands that delete things, need admin rights, or download and run code. Those carry a warning.
  • An unanswered card declines itself after 10 minutes.
  • /permissions lists everything you've allowed. /permissions revoke <n> takes one back, /permissions revoke all takes back everything. The line under the prompt shows how many are allowed. Allowances last until you quit.

Files and the shell​

  • Sage works only in your workspace: its files, its sagex commands and its shell commands. Paths it gives sagex can't leave the workspace.
  • Secret files are refused outright, before you're even asked: .env files, keys and certificates, credential stores, .git, .ssh and similar.
  • Shell commands run in the shell you've chosen (F2), with no way to type into prompts. Sage can't see your SageCode key or print environment variables.

What Sage never does​

  • Sign in, take a secret, or show one. auth, creating or changing vault keys, adding or changing model keys, trigger secrets and --reveal are never available to Sage.
  • Type a secret for you. If a run needs a secret typed at a hidden prompt, Sage hands the command back to you to run yourself with !.

Saved conversations​

Your conversations with Sage are saved to your account, so you can pick one up later or on another machine.

CommandWhat it does
/sessionsList your recent conversations (when, device, workspace folder)
/sessions <n>Reopen one, with its recent messages, and Sage remembering it
/sessions delete <n>Delete one
/newStart a fresh conversation
  • Each launch of the terminal app starts a new conversation. If the connection drops, Sage picks the same conversation back up.
  • Your latest 100 conversations are kept.
  • Your files' contents aren't stored. Long tool output and file contents are trimmed before a conversation is saved.
  • When a conversation gets long, Sage summarizes its older part and carries on from the summary. You'll see a note when it does.

Which model answers​

Sage answers with AutoSage's free models by default. These share a daily free allowance with Autobot on the web, which resets at 00:00 UTC.

You can bring your own model, with your own provider API key and no daily cap:

  • /model lists your models, with the one in use marked.
  • /model <number or name> switches to one; /model free goes back to the free models.

The choice is account-wide: Autobot on the web uses the same one. It takes effect from your next message. To add a model, see Your Own Models.

What you've used​

  • The Sage Today block at the bottom of the left panel shows today's requests and tokens, the model in use, and how many free requests are left. It updates as Sage replies. If your own model fails and Sage falls back to the free models, the block turns yellow and says so.
  • /usage adds the last 7 days and all time, requests per day, the models and devices you used, and a link to the full dashboard.
  • On the web, the Agent Dashboard has a SageCode tab with the same numbers, a requests-per-day chart and your devices.

A request is one message you send. Behind it, Sage may call the model several times: once to decide on a tool, and again after each tool's result. The token totals add up all of those calls.

Slash commands​

CommandWhat it does
/permissionsWhat Sage may do without asking; revoke <n> or revoke all
/sessions · /newSaved conversations
/modelWhich model Sage answers with
/usageWhat you've used