Skip to content

Commit 1b696a0

Browse files
Documentation updates.
1 parent 729244e commit 1b696a0

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

CLI.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,14 @@ Use `prompt_toolkit` for:
108108
- Ctrl+C handling (cancel current input, not exit)
109109
- Autocomplete (slash commands)
110110

111+
### Shell Escapes
112+
113+
| Command | Description |
114+
|---------|-------------|
115+
| `!<command>` | Run an OS command directly (agent does not see the output) |
116+
| `!!<command>` | Run an OS command; output is appended to the next prompt sent to the agent |
117+
| `!!!<command>` | Run an OS command and immediately send the output to the agent for analysis |
118+
111119
### Step Display
112120

113121
- Show intermediate code/thoughts as they happen (streaming)
@@ -143,7 +151,7 @@ Use `prompt_toolkit` for:
143151
| `/show-stats` | Show session statistics (token usage, time) |
144152
| `/show-step <N>` | Show full content of a specific step |
145153
| `/show-steps` | Show one-line summary of all memory steps |
146-
| `/steps <N>` | Change max_steps for the agent |
154+
| `/set-max-steps <N>` | Change max_steps for the agent |
147155
| `/show-tools` | List all loaded tools |
148156
| `/undo-steps [N]` | Remove last N steps from memory (default: 1) |
149157
| `/verbose` | Toggle verbose output |

src/smolagents/bp_cli.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ def _save_aliases(aliases: dict):
493493
"/load-instructions", "/plan", "/pwd", "/redo", "/repeat", "/repeat-prompt", "/run-prompt", "/run-py", "/save",
494494
"/session-load", "/session-save",
495495
"/show-compression-stats", "/show-memory-stats", "/show-stats",
496-
"/save-step", "/show-step", "/show-steps", "/show-tools", "/steps", "/undo-steps", "/verbose",
496+
"/save-step", "/set-max-steps", "/show-step", "/show-steps", "/show-tools", "/undo-steps", "/verbose",
497497
]
498498

499499

@@ -532,7 +532,7 @@ def print_help():
532532
table.add_row("/show-step <N>", "Show full content of a specific step")
533533
table.add_row("/show-steps", "Show one-line summary of all memory steps")
534534
table.add_row("/show-stats", "Show session statistics")
535-
table.add_row("/steps <N>", "Change max_steps for the agent")
535+
table.add_row("/set-max-steps <N>", "Change max_steps for the agent")
536536
table.add_row("/show-tools", "List all loaded tools")
537537
table.add_row("/undo-steps \[N]", "Remove last N steps from memory (default: 1)")
538538
table.add_row("/verbose", "Toggle verbose output")
@@ -687,7 +687,7 @@ def change_steps(agent, args: str):
687687
args = args.strip()
688688
if not args:
689689
console.print(f"[cyan]Current max_steps: {agent.max_steps}[/]")
690-
console.print("[dim]Usage: /steps <N>[/]")
690+
console.print("[dim]Usage: /set-max-steps <N>[/]")
691691
return
692692
try:
693693
n = int(args)
@@ -697,7 +697,7 @@ def change_steps(agent, args: str):
697697
agent.max_steps = n
698698
console.print(f"[green]max_steps set to {n}[/]")
699699
except ValueError:
700-
console.print("[red]Invalid number. Usage: /steps <N>[/]")
700+
console.print("[red]Invalid number. Usage: /set-max-steps <N>[/]")
701701

702702

703703
def run_script(agent, args: str):
@@ -1655,7 +1655,7 @@ def get_input():
16551655
# Fall through to agent run
16561656
else:
16571657
continue
1658-
elif cmd == "/steps":
1658+
elif cmd == "/set-max-steps":
16591659
change_steps(agent, cmd_args)
16601660
continue
16611661
elif cmd == "/run-py":

0 commit comments

Comments
 (0)