Skip to content

An in-process terminal and TerminalTool for agents

Changelog

FeatureMajor BashkitCode, Agent protocols

On main, not yet released

The off-by-default terminal feature wraps a Bashkit session in an in-memory terminal with vi and interactive less and more. TerminalTool turns it into one agent tool call: the model sends keys in Vim notation and gets back the screen, the activity (prompt, continuation, running or exited) and the commands that finished.

let mut tool = TerminalTool::new(Bash::builder());
let out = tool.call(json!({"input": "vi /tmp/n.txt<Enter>"})).await?;

TerminalTool::with_sessions adds up to 8 named tabs that share the filesystem and keep running in the background. Python (bashkit.Terminal) and Node (Terminal in @everruns/bashkit) expose the same calls.

See Terminal, #2509, #2518, #2521, #2523 and #2548.