ursa-ai 0.2.10__tar.gz → 0.2.12__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ursa-ai might be problematic. Click here for more details.

Files changed (31) hide show
  1. {ursa_ai-0.2.10/src/ursa_ai.egg-info → ursa_ai-0.2.12}/PKG-INFO +3 -3
  2. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/pyproject.toml +2 -2
  3. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/src/ursa/agents/hypothesizer_agent.py +1 -1
  4. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/src/ursa/util/memory_logger.py +17 -8
  5. {ursa_ai-0.2.10 → ursa_ai-0.2.12/src/ursa_ai.egg-info}/PKG-INFO +3 -3
  6. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/src/ursa_ai.egg-info/requires.txt +2 -2
  7. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/LICENSE +0 -0
  8. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/README.md +0 -0
  9. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/setup.cfg +0 -0
  10. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/src/ursa/agents/__init__.py +0 -0
  11. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/src/ursa/agents/arxiv_agent.py +0 -0
  12. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/src/ursa/agents/base.py +0 -0
  13. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/src/ursa/agents/code_review_agent.py +0 -0
  14. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/src/ursa/agents/execution_agent.py +0 -0
  15. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/src/ursa/agents/mp_agent.py +0 -0
  16. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/src/ursa/agents/planning_agent.py +0 -0
  17. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/src/ursa/agents/recall_agent.py +0 -0
  18. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/src/ursa/agents/websearch_agent.py +0 -0
  19. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/src/ursa/prompt_library/code_review_prompts.py +0 -0
  20. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/src/ursa/prompt_library/execution_prompts.py +0 -0
  21. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/src/ursa/prompt_library/hypothesizer_prompts.py +0 -0
  22. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/src/ursa/prompt_library/literature_prompts.py +0 -0
  23. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/src/ursa/prompt_library/planning_prompts.py +0 -0
  24. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/src/ursa/prompt_library/websearch_prompts.py +0 -0
  25. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/src/ursa/tools/run_command.py +0 -0
  26. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/src/ursa/tools/write_code.py +0 -0
  27. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/src/ursa/util/diff_renderer.py +0 -0
  28. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/src/ursa/util/parse.py +0 -0
  29. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/src/ursa_ai.egg-info/SOURCES.txt +0 -0
  30. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/src/ursa_ai.egg-info/dependency_links.txt +0 -0
  31. {ursa_ai-0.2.10 → ursa_ai-0.2.12}/src/ursa_ai.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ursa-ai
3
- Version: 0.2.10
3
+ Version: 0.2.12
4
4
  Summary: Agents for science at LANL
5
5
  Author-email: Mike Grosskopf <mikegros@lanl.gov>, Nathan Debardeleben <ndebard@lanl.gov>, Rahul Somasundaram <rsomasundaram@lanl.gov>, Isaac Michaud <imichaud@lanl.gov>, Avanish Mishra <avanish@lanl.gov>, Arthur Lui <alui@lanl.gov>, Russell Bent <rbent@lanl.gov>, Earl Lawrence <earl@lanl.gov>
6
6
  License-Expression: BSD-3-Clause
@@ -21,7 +21,7 @@ Requires-Dist: arxiv<3.0,>=2.2.0
21
21
  Requires-Dist: beautifulsoup4<5.0,>=4.13.4
22
22
  Requires-Dist: coolname<3.0,>=2.2.0
23
23
  Requires-Dist: langchain<0.4,>=0.3.27
24
- Requires-Dist: langchain-community<0.4,>=0.3.27
24
+ Requires-Dist: langchain-community<0.4,>=0.3.29
25
25
  Requires-Dist: langchain-litellm<0.3,>=0.2.2
26
26
  Requires-Dist: langchain-openai<0.4,>=0.3.30
27
27
  Requires-Dist: langgraph<0.7,>=0.6.6
@@ -36,8 +36,8 @@ Requires-Dist: mp-api<0.46,>=0.45.8
36
36
  Requires-Dist: langchain-google-genai<3.0,>=2.1.9
37
37
  Requires-Dist: langchain-anthropic<0.4,>=0.3.19
38
38
  Requires-Dist: langgraph-checkpoint-sqlite<3.0,>=2.0.10
39
- Requires-Dist: duckduckgo-search<9.0,>=8.1
40
39
  Requires-Dist: langchain-ollama<0.4,>=0.3.6
40
+ Requires-Dist: ddgs>=9.5.5
41
41
  Dynamic: license-file
42
42
 
43
43
  # URSA - The Universal Research and Scientific Agent
@@ -21,7 +21,7 @@ dependencies = [
21
21
  "beautifulsoup4>=4.13.4,<5.0",
22
22
  "coolname>=2.2.0,<3.0",
23
23
  "langchain>=0.3.27,<0.4",
24
- "langchain-community>=0.3.27,<0.4",
24
+ "langchain-community>=0.3.29,<0.4",
25
25
  "langchain-litellm>=0.2.2,<0.3",
26
26
  "langchain-openai>=0.3.30,<0.4",
27
27
  "langgraph>=0.6.6,<0.7",
@@ -36,8 +36,8 @@ dependencies = [
36
36
  "langchain-google-genai>=2.1.9,<3.0",
37
37
  "langchain-anthropic>=0.3.19,<0.4",
38
38
  "langgraph-checkpoint-sqlite>=2.0.10,<3.0",
39
- "duckduckgo-search>=8.1,<9.0",
40
39
  "langchain-ollama>=0.3.6,<0.4",
40
+ "ddgs>=9.5.5",
41
41
  ]
42
42
  classifiers = [
43
43
  "Operating System :: OS Independent",
@@ -500,7 +500,7 @@ class HypothesizerAgent(BaseAgent):
500
500
  final_solution="",
501
501
  )
502
502
  # Run the graph
503
- result = hypothesizer_agent.action.invoke(
503
+ result = self.action.invoke(
504
504
  initial_state,
505
505
  {
506
506
  "recursion_limit": recursion_limit,
@@ -26,20 +26,30 @@ class AgentMemory:
26
26
  * Requires `langchain-chroma`, and `chromadb`.
27
27
  """
28
28
 
29
+ @classmethod
30
+ def get_db_path(cls, path: Optional[str | Path]) -> Path:
31
+ match path:
32
+ case None:
33
+ return Path.home() / ".cache" / "ursa" / "rag" / "db"
34
+ case str():
35
+ return Path(str)
36
+ case Path():
37
+ return path
38
+ case _:
39
+ raise TypeError(
40
+ f"Type of path is `{type(path)}` "
41
+ "but `Optional[str | Path]` was expected."
42
+ )
43
+
29
44
  def __init__(
30
45
  self,
31
46
  embedding_model,
32
47
  path: Optional[str | Path] = None,
33
48
  collection_name: str = "agent_memory",
34
49
  ) -> None:
35
- self.path = (
36
- Path(path)
37
- if path
38
- else Path(__file__).resolve().parent / "agent_memory_db"
39
- )
50
+ self.path = self.get_db_path(path)
40
51
  self.collection_name = collection_name
41
52
  self.path.mkdir(parents=True, exist_ok=True)
42
-
43
53
  self.embeddings = embedding_model
44
54
 
45
55
  # If a DB already exists, load it; otherwise defer creation until `build_index`.
@@ -165,8 +175,7 @@ def delete_database(path: Optional[str | Path] = None):
165
175
  Where the on-disk Chroma DB is for deleting. If *None*, a folder called
166
176
  ``agent_memory_db`` is created in the package’s base directory.
167
177
  """
168
-
169
- db_path = Path(path) if path else Path("~/.cache/ursa/rag/db/")
178
+ db_path = AgentMemory.get_db_path(path)
170
179
  if os.path.exists(db_path):
171
180
  shutil.rmtree(db_path)
172
181
  print(f"Database: {db_path} has been deleted.")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ursa-ai
3
- Version: 0.2.10
3
+ Version: 0.2.12
4
4
  Summary: Agents for science at LANL
5
5
  Author-email: Mike Grosskopf <mikegros@lanl.gov>, Nathan Debardeleben <ndebard@lanl.gov>, Rahul Somasundaram <rsomasundaram@lanl.gov>, Isaac Michaud <imichaud@lanl.gov>, Avanish Mishra <avanish@lanl.gov>, Arthur Lui <alui@lanl.gov>, Russell Bent <rbent@lanl.gov>, Earl Lawrence <earl@lanl.gov>
6
6
  License-Expression: BSD-3-Clause
@@ -21,7 +21,7 @@ Requires-Dist: arxiv<3.0,>=2.2.0
21
21
  Requires-Dist: beautifulsoup4<5.0,>=4.13.4
22
22
  Requires-Dist: coolname<3.0,>=2.2.0
23
23
  Requires-Dist: langchain<0.4,>=0.3.27
24
- Requires-Dist: langchain-community<0.4,>=0.3.27
24
+ Requires-Dist: langchain-community<0.4,>=0.3.29
25
25
  Requires-Dist: langchain-litellm<0.3,>=0.2.2
26
26
  Requires-Dist: langchain-openai<0.4,>=0.3.30
27
27
  Requires-Dist: langgraph<0.7,>=0.6.6
@@ -36,8 +36,8 @@ Requires-Dist: mp-api<0.46,>=0.45.8
36
36
  Requires-Dist: langchain-google-genai<3.0,>=2.1.9
37
37
  Requires-Dist: langchain-anthropic<0.4,>=0.3.19
38
38
  Requires-Dist: langgraph-checkpoint-sqlite<3.0,>=2.0.10
39
- Requires-Dist: duckduckgo-search<9.0,>=8.1
40
39
  Requires-Dist: langchain-ollama<0.4,>=0.3.6
40
+ Requires-Dist: ddgs>=9.5.5
41
41
  Dynamic: license-file
42
42
 
43
43
  # URSA - The Universal Research and Scientific Agent
@@ -2,7 +2,7 @@ arxiv<3.0,>=2.2.0
2
2
  beautifulsoup4<5.0,>=4.13.4
3
3
  coolname<3.0,>=2.2.0
4
4
  langchain<0.4,>=0.3.27
5
- langchain-community<0.4,>=0.3.27
5
+ langchain-community<0.4,>=0.3.29
6
6
  langchain-litellm<0.3,>=0.2.2
7
7
  langchain-openai<0.4,>=0.3.30
8
8
  langgraph<0.7,>=0.6.6
@@ -17,5 +17,5 @@ mp-api<0.46,>=0.45.8
17
17
  langchain-google-genai<3.0,>=2.1.9
18
18
  langchain-anthropic<0.4,>=0.3.19
19
19
  langgraph-checkpoint-sqlite<3.0,>=2.0.10
20
- duckduckgo-search<9.0,>=8.1
21
20
  langchain-ollama<0.4,>=0.3.6
21
+ ddgs>=9.5.5
File without changes
File without changes
File without changes