From 58ddf16974ea73e4b4a882dd138c0c88a59a2c31 Mon Sep 17 00:00:00 2001 From: Jemma Stachelek Date: Wed, 28 Jan 2026 09:43:42 -0700 Subject: [PATCH 1/4] reflect hitl_basic being removed --- docs/humanInTheLoop_example.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/humanInTheLoop_example.md b/docs/humanInTheLoop_example.md index 9d3ceb20..141c4c5e 100644 --- a/docs/humanInTheLoop_example.md +++ b/docs/humanInTheLoop_example.md @@ -4,9 +4,9 @@ This module implements a human-in-the-loop (HITL) interface for the URSA agent framework, allowing users to directly interact with different specialized AI agents through a command-line interface. The system maintains context between agent interactions and provides persistent storage for agent states. -The file can be run with: +The HITL interface can be accessed via the URSA CLI, launch with: -`python /path/to/hitl_basic.py` +`$ ursa` ### Setup and Initialization From 5521af0d41ff98f512d8507ea9ed73fcec2bf373 Mon Sep 17 00:00:00 2001 From: Mike Grosskopf Date: Wed, 28 Jan 2026 09:51:59 -0700 Subject: [PATCH 2/4] Cutting all the extra documentation there Since that has been removed/depreciated, I removed all the other setup/usage documentation. The CLI has its own syntax/usage Co-authored-by: jsta --- docs/humanInTheLoop_example.md | 71 ++-------------------------------- 1 file changed, 4 insertions(+), 67 deletions(-) diff --git a/docs/humanInTheLoop_example.md b/docs/humanInTheLoop_example.md index 141c4c5e..6ba2d100 100644 --- a/docs/humanInTheLoop_example.md +++ b/docs/humanInTheLoop_example.md @@ -1,76 +1,13 @@ # URSA Human-in-the-Loop Agent Interface Documentation -## Overview +## Previous Human-in-the-Loop Example has been Depreciated -This module implements a human-in-the-loop (HITL) interface for the URSA agent framework, allowing users to directly interact with different specialized AI agents through a command-line interface. The system maintains context between agent interactions and provides persistent storage for agent states. - -The HITL interface can be accessed via the URSA CLI, launch with: +The HITL interface can now be accessed via the URSA CLI, launch with: `$ ursa` -### Setup and Initialization - -1. Creates a workspace directory for storing agent data and checkpoints -2. Initializes SQLite databases and checkpointers for various agents: - - Executor agent - - Planner agent - - WebSearcher agent -3. Configures the language model and embedding model -4. Instantiates the following agents: - - ArxivAgent - - ExecutionAgent - - PlanningAgent - - WebSearchAgent - - RecallAgent - -### User Interaction Loop - -The function runs a continuous interaction loop until the user enters "[USER DONE]": - -1. Displays a header explaining how to use the interface -2. Prompts the user for input -3. Parses the input to determine which agent to invoke: - - `[Arxiver]`: Searches ArXiv for academic papers - - `[Executor]`: Executes code or commands - - `[Planner]`: Creates plans or strategies - - `[WebSearcher]`: Performs web searches - - `[Rememberer]`: Retrieves information from memory - - `[Chatter]`: Has a general conversation using the language model -4. **Importantly, the output from the previous agent interaction is automatically included in the prompt to the next agent.** This creates a continuous context flow where each agent has access to what the previous agent produced. -5. Invokes the appropriate agent with the user's query and context from previous interactions -6. Displays the agent's response -7. Continues the loop until the user indicates they're done - -### Agent-Specific Behavior - -- **ArxivAgent**: Converts user query into a search query, retrieves relevant papers, and summarizes results -- **ExecutionAgent**: Processes user instructions in the context of previous outputs, can execute code -- **PlanningAgent**: Creates plans based on user requirements and previous context -- **WebSearchAgent**: Performs web searches based on user queries -- **RecallAgent**: Retrieves relevant information from persistent memory -- **Chatter**: Provides direct access to the language model for general conversation - -## Usage - -Run the script and interact with agents by prefixing your queries with the appropriate agent tag: - -``` -[Arxiver] Find recent papers on transformer architecture improvements -[Executor] Write a Python function to calculate Fibonacci numbers -[Planner] Create a research plan for analyzing climate data -[WebSearcher] What are the latest developments in quantum computing? -[Rememberer] What did we discuss about neural networks earlier? -[Chatter] Explain the concept of attention mechanisms in simple terms -``` - -### Context Continuity - -A key feature of this interface is that each agent receives both your current query AND the output from the previous agent interaction. This allows for natural follow-up queries and building on previous results. For example: - -1. `[WebSearcher] Find information about large language models` -2. `[Planner] Create a research plan based on this information` +and help on commands can he accessed with -In this sequence, the Planner would receive both your planning request AND the search results about large language models from the WebSearcher, enabling it to create a more informed and contextually relevant plan. +`$ ursa --help` -Use "[USER DONE]" to exit the interface. From 09e751872e6087e91b80dd59e85037d6b5a2a279 Mon Sep 17 00:00:00 2001 From: Mike Grosskopf Date: Wed, 28 Jan 2026 15:45:17 -0700 Subject: [PATCH 3/4] Adding additional context to the HITL doc A better CLI/HITL doc should come later, but basic info as requested is in there now. Co-authored-by: jsta --- docs/humanInTheLoop_example.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/docs/humanInTheLoop_example.md b/docs/humanInTheLoop_example.md index 6ba2d100..26f453b6 100644 --- a/docs/humanInTheLoop_example.md +++ b/docs/humanInTheLoop_example.md @@ -11,3 +11,36 @@ and help on commands can he accessed with `$ ursa --help` +## Basic Usage + +To prompt an URSA agent through the CLI, first select an agent, then issue a prompt to the agent: + +``` +ursa> execute +execute: Make me a histogram of the first 10000 prime number spacings +``` + +You can also issue the prompt in one line by prepending the agent name: +``` +ursa> execute Make me a histogram of the first 10000 prime number spacings` +``` + +to see the names of available agents, prompt the CLI with `help`: +``` +ursa> help + +Documented commands (type help ): +======================================== +EOF agents arxiv chat clear execute exit help models web + +Undocumented commands: +====================== +hypothesize plan + +``` + + +Some additional documentation on the URSA github repo: [LINK](github.com/lanl/ursa) +with more to come. + +We should have an in-depth documentation for it, but right now it's documented a bit on the main README and through the help flags with the CLI call. From fcd42e8b358c5dd843502b7ee9a46415bd6dae8c Mon Sep 17 00:00:00 2001 From: Mike Grosskopf Date: Wed, 28 Jan 2026 15:47:16 -0700 Subject: [PATCH 4/4] Fixed link --- docs/humanInTheLoop_example.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/humanInTheLoop_example.md b/docs/humanInTheLoop_example.md index 26f453b6..23fc6c88 100644 --- a/docs/humanInTheLoop_example.md +++ b/docs/humanInTheLoop_example.md @@ -40,7 +40,7 @@ hypothesize plan ``` -Some additional documentation on the URSA github repo: [LINK](github.com/lanl/ursa) +Some additional documentation on the URSA github repo: [LINK](https://github.com/lanl/ursa) with more to come. We should have an in-depth documentation for it, but right now it's documented a bit on the main README and through the help flags with the CLI call.