Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
6db1395
feat(cli): add Textual terminal app
awadell1 Aug 11, 2026
e36490c
refactor(cli): replace Rich REPL with Textual app
awadell1 Aug 11, 2026
341e688
style(cli): normalize config imports
awadell1 Aug 11, 2026
3cac8c3
refactor(cli): split Textual app into focused modules
awadell1 Aug 11, 2026
5736c2c
test(cli): organize and strengthen Textual coverage
awadell1 Aug 11, 2026
30b5a67
feat(cli): surface persistent agent sessions
awadell1 Aug 11, 2026
b622b5e
docs(cli): describe Textual agent routing
awadell1 Aug 11, 2026
19308af
fix(cli): grow prompt for wrapped text
awadell1 Aug 11, 2026
3716734
feat(cli): harden Textual interactions and runtime
awadell1 Aug 11, 2026
667c4d2
fix(cli): make Textual tests portable on Windows
awadell1 Aug 11, 2026
602a25c
feat: add theming
awadell1 Aug 13, 2026
52f8a84
feat: improve tips
awadell1 Aug 13, 2026
22fe5c1
Refine CLI event card layout
awadell1 Aug 15, 2026
826e5d1
feat(cli): add exit command
awadell1 Aug 19, 2026
0472589
feat(cli): add expandable exception card
awadell1 Aug 19, 2026
5c0a0d5
fix(mcp): redirect stdio mcp server stderr to null
awadell1 Aug 19, 2026
cdb0c0a
feat(tui): improve default tool card
awadell1 Aug 20, 2026
9b82e48
feat(tui): keep viewport fixed or at the bottom
awadell1 Aug 20, 2026
d18bb95
feat(tui): xplatform clipboard!
awadell1 Aug 20, 2026
cc42968
fix(tui): drop the transcript
awadell1 Aug 20, 2026
f1ba3b6
fix(tui): anchor conversation scrolling
awadell1 Aug 20, 2026
4293fdd
revise tips
awadell1 Aug 20, 2026
4691132
fix(tui): banner push-out and anchor on prompt submit
awadell1 Aug 20, 2026
5e4dab2
fix(tui): stabilize conversation anchoring
awadell1 Aug 20, 2026
56b676c
test(tui): await asynchronous updates
awadell1 Aug 20, 2026
573385c
fix(tui): detect kitty support and adjust tips to match
awadell1 Aug 21, 2026
7ee2599
test(tui): pin that a user scroll in the anchor start gap wins
BrennanTM Aug 22, 2026
578d1e8
fix(tui): start the anchor transition animation immediately
BrennanTM Aug 22, 2026
00681e6
fix(acquisition): make source processing asynchronous
awadell1 Aug 24, 2026
a3e16f3
docs(cli): document Textual interface controls
awadell1 Aug 24, 2026
9eba7e9
test(tui): apply manual scroll immediately
awadell1 Aug 24, 2026
5751d0a
fix(cli): preserve auth behavior through Textual migration
awadell1 Aug 24, 2026
5822f41
docs(tui): remove deprecated HITL example
awadell1 Aug 25, 2026
2208a7d
feat: add a model switcher command
awadell1 Aug 25, 2026
60676f5
docs: exclude DSI guide from Textual changes
awadell1 Aug 25, 2026
efae1c7
fix(tui): display configured inference providers
awadell1 Aug 25, 2026
adcef73
fix: define pretty_reprs
awadell1 Aug 25, 2026
d4f9469
fix: guard against control codes in unstructured text
awadell1 Aug 25, 2026
1e9506c
feat: model command now knows about endpoint models
awadell1 Aug 26, 2026
34060b1
fix: ctrl+d exits a bit less aggressively
awadell1 Aug 26, 2026
f593f4f
misc
awadell1 Aug 26, 2026
72c39ee
refactor(tui): move Textual UI into package
awadell1 Aug 26, 2026
a639159
Load agent tools lazily in TUI
awadell1 Aug 26, 2026
36834d9
feat(tui): add advanced model configuration
awadell1 Aug 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 7 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,51 +55,31 @@ Then start the command line app with:
ursa --config config.yaml
```

This will start a REPL in your terminal.

```
__ ________________ _
/ / / / ___/ ___/ __ `/
/ /_/ / / (__ ) /_/ /
\__,_/_/ /____/\__,_/

For help, type: ? or help. Exit with Ctrl+d.
ursa>
```

Within the REPL, you can get help by typing `?` or `help`.
This starts the full-screen terminal app. Type `/` to browse commands,
`#` to choose an agent behavior, or `@` to insert a workspace path.

You can chat with an LLM by simply typing into the terminal.

```
ursa> How are you?
How are you?
Thanks for asking! I’m doing well. How are you today? What can I help you with?
```

You can run various agents by typing the name of the agent. For example,
Use the required `#` macro to route a prompt to another agent behavior:

```
ursa> plan
plan: Write a python script to do linear regression using only numpy.
```

Or by prepending the agent name to the query:

```shell
ursa> plan Write a python script to do linear regression using only numpy.
#plan Write a python script to do linear regression using only numpy.
```

If you run subsequent agents, the last output will be appended to the prompt for the next agent.

So, to run the Planning Agent followed by the Execution Agent:
```
ursa> plan
plan: Write a python script to do linear regression using only numpy.
#plan Write a python script to do linear regression using only numpy.

...

ursa> execute
execute: Execute the plan.
#execute Execute the plan.
```

You can get a list of available command line options via
Expand Down
46 changes: 10 additions & 36 deletions docs/command_line.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,55 +12,29 @@ To use the command line app, run
ursa --llm_model.model openai:gpt-5.2
```

This will start a REPL in your terminal.

```
__ ________________ _
/ / / / ___/ ___/ __ `/
/ /_/ / / (__ ) /_/ /
\__,_/_/ /____/\__,_/

For help, type: ? or help. Exit with Ctrl+d.
ursa>
```

Within the REPL, you can get help by typing `?` or `help`.
This starts the full-screen terminal app. Type `/` to browse commands,
`#` to choose an agent behavior, or `@` to insert a workspace path.
See [Getting Started - CLI](getting-started/cli.md#full-screen-interface-controls)
for prompt editing, multiline input, clipboard, and exit behavior.

You can chat with an LLM by simply typing into the terminal.

```
ursa> How are you?
How are you?
Thanks for asking! I’m doing well. How are you today? What can I help you with?
```

You can run various agents by typing the name of the agent. For example,

```
ursa> plan
plan: Write a python script to do linear regression using only numpy.
```

Or by prepending the agent name to the query:
Use the required `#` macro to route a prompt to another agent behavior:

```shell
ursa> plan Write a python script to do linear regression using only numpy.
```

If you run subsequent agents, the last output will be appended to the prompt for the next agent.

So, to run the Planning Agent followed by the Execution Agent:
#plan Write a python script to do linear regression using only numpy.
```
ursa> plan
plan: Write a python script to do linear regression using only numpy.

...

ursa> execute
execute: Execute the plan.
```
Agent macros route only the prompt in which they appear. Output from a previous
agent is not automatically appended to the next prompt; quote or reference any
needed result explicitly when switching behaviors.

You can get a list of available command line options via
```
ursa --help
```

100 changes: 49 additions & 51 deletions docs/getting-started/cli.md
Original file line number Diff line number Diff line change
@@ -1,119 +1,117 @@
# Getting Started - CLI

This guide walks through starting URSA from the terminal, configuring a model, chatting with the default assistant, and running the planning and execution agents.
This guide walks through starting URSA from the terminal, chatting with the
default assistant, and routing messages to the planning and execution agents.

## Prerequisites

- URSA is installed. See [Installation](../installation/index.md).
- You have access to an LLM endpoint.
- `OPENAI_API_KEY` is set for the default OpenAI endpoint.
- You have a dedicated workspace directory for files URSA may create or modify.

!!! warning "Be aware of your workspace"
The execution agent can write files and run shell commands. Be careful using workspaces with source tree or data directory you cannot risk modifying. Good practice is to make backups or copies of directories before working.

## 1. Create a configuration file
For Ollama, Anthropic, Google GenAI, custom OpenAI-compatible endpoints, and
configuration files, see [Configuration](../configuration/index.md).

YAML configuration files are reusable and easy to edit. URSA configs can be
layered; see
[Configuration files, CLI flags, and environment variables][configuration-files-cli-flags-and-environment-variables]
for the precedence order.
## 1. Start URSA

Create `config.yaml`:

```yaml
llm_model:
model: openai:gpt-5.4
api_key:
env: OPENAI_API_KEY
workspace: .
```

Then set your API key in the shell:
Set your OpenAI API key and launch URSA:

=== "macOS/Linux"

```bash
export OPENAI_API_KEY="..."
ursa
```

=== "Windows PowerShell"

```powershell
$env:OPENAI_API_KEY = "..."
ursa
```

See [Configuration](../configuration/index.md) for Ollama, Anthropic, Google GenAI, and custom OpenAI-compatible endpoints.
You should see the full-screen URSA interface. Type `/` to browse app
commands, `#` to route a message to an agent, or `@` to insert a workspace
path.

## 2. Start URSA

```bash
ursa --config config.yaml
```

You should see the URSA prompt:

```text
ursa>
```
### Full-screen interface controls

Type `help` or `?` inside the prompt to see available interactive commands.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure where to put this comment, but every now and then, ursa will say something like,

To see available URSA commands, type: help or ?

which has been replaced by things like / commands. I know we baked this in as a system prompt somewhere... wherever this shows up, could you remove it?

| Input | Action |
|---|---|
| `/` | Browse application commands. Use `/keymap` for every keyboard shortcut. |
| `#` | Choose an agent and route the message to it. |
| `@` | Insert a workspace file or directory into the message. |
| **Enter** | Submit the message. |
| **Shift+Enter** or **Ctrl+J** | Insert a newline. Some terminals cannot distinguish Shift+Enter, so Ctrl+J is the portable option. |
| **Ctrl+Q** or `/exit` | Exit gracefully, waiting for an active turn to finish. |
| **Ctrl+D** | Exit immediately without cleanup; reserve this for a stuck turn. |

## 3. Chat with the assistant
## 2. Chat with the assistant

```text
ursa> Summarize what URSA can help me do.
Summarize what URSA can help me do.
```

Plain text input is handled by the default chat behavior.

## 4. Use the planning agent
## 3. Route a message to the planning agent

Run the planning agent with the `plan` command:
Route a message to the planning agent with the `#plan` macro. Typing `#` opens
the agent picker and inserts the selected agent at the front of the message:

```text
ursa> plan Write a plan for building a suite of surrogate models on data.csv and performing assessment of predictive capability and uncertainty quantification.
#plan Write a plan for building a suite of surrogate models on data.csv and performing assessment of predictive capability and uncertainty quantification.
```

You can also type the agent name first and provide the prompt interactively:
The leading `#` is required; `plan ...` without it is ordinary chat input.

```text
ursa> plan
plan: Write a plan for building a suite of surrogate models on data.csv and performing assessment of predictive capability and uncertainty quantification.
```

## 5. Use the execution agent
## 4. Route a message to the execution agent

The execution agent can write files and run commands in the configured workspace.

```text
ursa> execute Write and run a Python script that prints the first 10 prime numbers.
#execute Write and run a Python script that prints the first 10 prime numbers.
```

Review the actions and outputs carefully. For more safety guidance, see
[Sandboxing and information control][sandboxing-and-information-control].

## 6. Optional: use a named agent
To direct the agent to a particular workspace file, type `@` and choose it
from the path picker:

```text
#execute Read @data/measurements.csv and create a histogram of the pressure column.
```

The picker inserts the path into the message; the receiving agent decides how
to use it and must have an appropriate file tool.

## 5. Optional: use a named agent

A named agent stores state so you can return to it later:

```bash
ursa --config config.yaml --name my-first-agent
ursa --name my-first-agent
```

For detailed commands to list, save, copy, share, import, and delete agents, see [Persistence](../persistence/index.md).

## Useful CLI commands

```bash
ursa
ursa --help
ursa --print-config
ursa --config config.yaml
ursa --config config.yaml --name my-agent
ursa --config config.yaml --use-web
ursa --name my-agent
ursa --use-web
```

Web tools are opt in. Use `--use-web` or `use_web: true` only when you want URSA
to make network requests through its web-search tools.
Web tools are opt in. Use `--use-web` only when you want URSA to make network
requests through its web-search tools. Configuration files and their
`use_web` setting are covered in [Configuration](../configuration/index.md).

## Where next?

Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ Then run:
ursa --config config.yaml
```

Inside the URSA prompt, type `help` or try:
Inside the URSA app, type `/` to browse commands or try:

```text
ursa> Summarize what URSA can help me do.
ursa> execute Write and run a Python script that prints the first 10 prime numbers.
Summarize what URSA can help me do.
#execute Write and run a Python script that prints the first 10 prime numbers.
```

## Where to go next
Expand Down
46 changes: 0 additions & 46 deletions docs/reference/tutorials/human-in-the-loop.md

This file was deleted.

3 changes: 0 additions & 3 deletions examples/hitl_examples/hitl_basic.py

This file was deleted.

1 change: 0 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ nav:
- Plan-Execute checkpointing: reference/plan-execute-checkpointing.md
- Tutorials and examples:
- Combining arXiv agent and execution agent: reference/tutorials/arxiv-execution.md
- Human in the Loop: reference/tutorials/human-in-the-loop.md
- Neutron Star: reference/tutorials/neutron-star.md
- API Reference:
- agents: reference/api/agents.md
Expand Down
Loading
Loading