Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ wheels/
.venv/
workspace/
workspace_*/
examples/**/uv.lock

# ursa
src/ursa/util/agent_memory_db/
Expand Down
19 changes: 5 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,14 @@ The MkDocs documentation in `docs/` is organized around installation, getting st
You can install `ursa` as a command line app with `pip install`; or with [`uv`](https://docs.astral.sh/uv/) via

```bash
uv tool install ursa-ai
uv tool install 'ursa[dashboard]'
```

A reusable YAML configuration file is the preferred way to select endpoints and runtime settings. For example:
A standard OpenAI setup needs no configuration file:

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

Then start the command line app with:

```
ursa --config config.yaml
```bash
export OPENAI_API_KEY="..."
ursa
```

This starts the full-screen terminal app. Type `/` to browse commands,
Expand Down
3 changes: 2 additions & 1 deletion configs/example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ use_web: true
inference_providers:
openai_public:
base_url: https://api.openai.com/v1
api_key_env: OPENAI_API_KEY
api_key:
env: OPENAI_API_KEY
llm_model:
# Model options depend on the selected provider:
# https://reference.langchain.com/python/langchain/models/#langchain.chat_models.init_chat_model
Expand Down
4 changes: 2 additions & 2 deletions docs/agents/acquisition/arxiv.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ By default, the agent writes artifacts under the agent den:
- final direct-summarization file: `arxiv_generated_summaries/final_summary.txt`
- RAG workflow artifacts are managed by the shared RAG path when `rag_embedding` is provided.

## CLI
## TUI

The interactive CLI registers this agent as:
The TUI registers this agent as:

```text
arxiv
Expand Down
6 changes: 4 additions & 2 deletions docs/agents/acquisition/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ Acquired documents are stored under the configured `database_path` inside the ag

Exact filenames and citations are determined by each concrete acquisition agent's `_id()` and `_citation()` methods.

## CLI availability
## TUI availability

The interactive CLI currently registers `arxiv` and `web` acquisition agents. `OSTIAgent` is exported from `ursa.agents` for Python/API use; it is not currently registered as a CLI short name in the inspected source.
The TUI currently registers `arxiv` and `web` acquisition agents. `OSTIAgent`
is exported from `ursa.agents` for Python/API use; it is not currently
registered as a TUI short name in the inspected source.
4 changes: 2 additions & 2 deletions docs/agents/acquisition/osti.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ By default, the agent writes artifacts under the agent den:
- final direct-summarization file: `acq_summaries/final_summary.txt`
- RAG workflow artifacts are managed by the shared RAG path when `rag_embedding` is provided.

## CLI
## TUI

`OSTIAgent` is exported from `ursa.agents` for Python/API use:

```python
from ursa.agents import OSTIAgent
```

In the inspected source, it is not currently registered as an interactive CLI short name.
In the inspected source, it is not currently registered as a TUI short name.
4 changes: 2 additions & 2 deletions docs/agents/acquisition/web-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ By default, the agent writes artifacts under the agent den:
- final direct-summarization file: `acq_summaries/final_summary.txt`
- RAG workflow artifacts are managed by the shared RAG path when `rag_embedding` is provided.

## CLI
## TUI

The interactive CLI registers this agent as:
The TUI registers this agent as:

```text
web
Expand Down
11 changes: 6 additions & 5 deletions docs/agents/chat.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ state = agent.invoke("Summarize the files in this workspace.")
print(agent.format_result(state))
```

For conversational continuation, reuse the returned state through `format_query` or let the CLI maintain state for you.
For conversational continuation, reuse the returned state through `format_query` or let the TUI maintain state for you.

```python
state = agent.invoke("Remember that this project studies alloy phase stability.")
Expand Down Expand Up @@ -59,7 +59,7 @@ When `use_web=True`, it also binds:
- `run_osti_search`
- `run_arxiv_search`

If persistent RAG tools are configured through `rag_tools`, `AgentWithTools` can expose those as additional tools. MCP tools can also be attached in the CLI when MCP servers are configured.
If persistent RAG tools are configured through `rag_tools`, `AgentWithTools` can expose those as additional tools. MCP tools can also be attached in the TUI when MCP servers are configured.

## Graph behavior

Expand All @@ -75,11 +75,12 @@ This means `ChatAgent` can use multiple tools over multiple turns, but it does n

## BasicChatAgent

The module also contains `BasicChatAgent`, a simple chat-only implementation with no tool loop. It is useful for minimal conversational behavior, but `ChatAgent` is the public, tool-capable chat agent exported by `ursa.agents` and used by the CLI `chat` behavior.
The module also contains `BasicChatAgent`, a simple chat-only implementation with no tool loop. It is useful for minimal conversational behavior, but `ChatAgent` is the public, tool-capable chat agent exported by `ursa.agents` and used by the TUI `chat` behavior.

## CLI usage
## TUI usage

In the interactive URSA CLI, use the `chat` agent. Web/search tools are opt-in:
In the URSA TUI, use the `chat` agent. Web/search tools are opt-in through a CLI
flag:

```bash
ursa --use-web
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/dsi.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ When initializing `DSIAgent`, you can customize its behavior with these paramete

## Advanced Usage

### From the URSA CLI
### From the URSA TUI
```bash
ursa % ursa

Expand Down
5 changes: 3 additions & 2 deletions docs/agents/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

URSA agents are reusable behaviors that can chat, plan, execute, search, maintain persistent research artifacts, reason over documents, refine prompts, or interact with external tools.

The interactive command-line interface exposes common agents by short names, including:
The TUI exposes common agents by short names, including:

- `chat`
- `plan`
Expand Down Expand Up @@ -30,7 +30,8 @@ Additional agents may be available depending on optional dependencies and config

## Web and external information

Web/search tools are opt-in for information-control reasons. For CLI sessions, enable them with:
Web/search tools are opt-in for information-control reasons. When launching the
TUI, enable them with this CLI flag:

```bash
ursa --use-web
Expand Down
15 changes: 0 additions & 15 deletions docs/chatollama_setup.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/cli.md

This file was deleted.

25 changes: 15 additions & 10 deletions docs/command_line.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,43 @@
You can install `ursa` as a command line app with `pip install`; or with [`uv`](https://docs.astral.sh/uv/) via

```bash
uv tool install ursa-ai
uv tool install 'ursa[dashboard]'
```

To use the command line app, run

```
```bash
ursa --llm_model.model openai:gpt-5.2
```

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.

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

Use the required `#` macro to route a prompt to another agent behavior:

```
```text
#plan Write a python script to do linear regression using only numpy.
```

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.
If you run subsequent agents, the last output will be appended to the prompt for the next agent.

You can get a list of available command line options via
So, to run the Planning Agent followed by the Execution Agent:
```text
#plan Write a python script to do linear regression using only numpy.

...

#execute Execute the plan.
```

You can get a list of available command line options via
```bash
ursa --help
```
54 changes: 33 additions & 21 deletions docs/configuration/files-and-env.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,19 @@ On every platform, URSA then checks `~/.config/ursa/config.yaml` and, when
`XDG_CONFIG_HOME` is set, `$XDG_CONFIG_HOME/ursa/config.yaml`. These user files
are loaded in that order, with duplicates skipped. A missing file is ignored.

## YAML files: preferred
## User YAML files: preferred

For defaults that should follow you across projects, edit the user config path
listed above. A small user config is usually better than a complete copy of the
resolved defaults. For example:

```yaml
llm_model:
model: openai:gpt-5.4
api_key:
env: OPENAI_API_KEY
workspace: ./ursa-workspace
group: default
use_web: false
agent_config:
execute:
safe_codes:
- python
emb_model:
model: openai:text-embedding-3-large
```

Run:
OpenAI chat needs no YAML; set `OPENAI_API_KEY` and run `ursa`. Use an explicit
file only for a project-specific or one-off override:

```bash
ursa --config config.yaml
Expand Down Expand Up @@ -89,9 +85,17 @@ URSA exposes environment-variable equivalents for many CLI settings, but for mos

Example:

```bash
export OPENAI_API_KEY="..."
```
=== "macOS/Linux"

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

=== "Windows PowerShell"

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

Then in YAML:

Expand All @@ -104,9 +108,18 @@ llm_model:

You can also set URSA configuration options directly:

```bash
URSA_LLM_MODEL__MODEL=openai:gpt-5.4 ursa
```
=== "macOS/Linux"

```bash
URSA_LLM_MODEL__MODEL=openai:gpt-5.4 ursa
```

=== "Windows PowerShell"

```powershell
$env:URSA_LLM_MODEL__MODEL = "openai:gpt-5.4"
ursa
```

Use `ursa --help` to view supported `URSA_...` variables.

Expand Down Expand Up @@ -148,5 +161,4 @@ ursa --config ./.ursa/config.yaml --print-config=file,resolved

The complete form is `--print-config=LEVEL[+],STAGE`. Levels are `system`,
`user`, `file`, and `final`; stages are `merged` and `resolved`. Add `+` to include
lower-precedence sources. If you provide only a level, URSA uses the `resolved`
stage; for example, `--print-config=user` shows resolved user configuration.
lower-precedence sources.
Loading
Loading