# turbo-js agents. # # Each [[agent]] becomes one line of the Agent menu (Alt-A). Choosing it starts # that program and opens a window on the conversation; closing the window stops # it again. Open the same agent twice and you get two independent conversations. # # The editor is a client for the Agent Client Protocol — https://agentclientprotocol.com — # so it holds no API key and knows no model. All of that is your agent's own # configuration, in a file this editor does not read. # # name what the menu shows, and what the window is called. Required, and # unique: a project's agent of the same name replaces one of yours. # command the program to run. Required. Looked up on PATH. # args its arguments, passed as given. There is no shell here, so no # quoting, no globs and no && — use command = "sh", args = ["-c", …] # when you really want one. # env extra environment variables. The agent also inherits the ones the # editor was started with, so a credential already exported reaches # it without being written down here. # cwd where to run it, relative to the project. Left out, it is the # project itself. # # A key this file does not define is refused rather than ignored: a misspelt # `comand` would otherwise look exactly like one that had no effect. # # The same file may also live in %[2]s, where it applies to every project you open. # This one is read afterwards and wins where a name appears in both. # Docker's agent runtime, talking to a model server of your choosing. # `docker agent serve acp ` speaks the protocol on its standard input and # output, which is exactly what the editor wants. # # The YAML beside this file is the agent's own: which provider, which model, # which tools. Write it yourself, or run `docker agent new` to start one. [[agent]] name = "Local agent" command = "docker" args = ["agent", "serve", "acp", "%[1]s/agent.yaml"] env = { TELEMETRY_ENABLED = "false" } # A second agent is one more block. Two windows side by side — Window ▸ Tile — # is how a fast local model and a slow careful one get compared. # # [[agent]] # name = "Reviewer" # command = "my-agent" # args = ["--acp", "--profile", "review"] # cwd = "." # Once a window is open: # # Enter send what you have typed # Alt-Enter a new line instead of sending # Tab move between the conversation and the box # / at the start of the box, list the agent's own commands # @ list the project's files; the one you pick goes to the agent # PgUp PgDn read back through the conversation # Esc stop the turn in progress # Ctrl-W close the window, and stop the agent with it # # And in the conversation, with Tab pressed: # # ↑ ↓ move the cursor through what was said # Shift-↑ ↓ select whole lines # Ctrl-C copy — the selection, or the block the cursor is on # # What is copied goes to this editor's clipboard *and*, through the terminal, to # the system's — so Shift-Ins pastes it into a file here, and Ctrl-V pastes it # anywhere else. # # Code the agent sends inside a ```javascript fence — or ```js, which models # write by habit — is coloured by the same scanner this editor colours .js files # with, and a ```json fence by the one it colours package.json with. A fence # naming a language it does not know is left plain rather than guessed at. # # An agent with a shell or a filesystem tool asks before it uses one, and the # box that appears carries the agent's own choices. Nothing runs until you # answer. When it reads a file you have open and have not saved, it is given # what you can see rather than what is on disk; when it writes one, the change # lands in the buffer for you to undo with Ctrl-Z or keep with F2.