aurelian 0.3.2__py3-none-any.whl

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.
Files changed (254) hide show
  1. aurelian/__init__.py +9 -0
  2. aurelian/agents/__init__.py +0 -0
  3. aurelian/agents/amigo/__init__.py +3 -0
  4. aurelian/agents/amigo/amigo_agent.py +77 -0
  5. aurelian/agents/amigo/amigo_config.py +85 -0
  6. aurelian/agents/amigo/amigo_evals.py +73 -0
  7. aurelian/agents/amigo/amigo_gradio.py +52 -0
  8. aurelian/agents/amigo/amigo_mcp.py +152 -0
  9. aurelian/agents/amigo/amigo_tools.py +152 -0
  10. aurelian/agents/biblio/__init__.py +42 -0
  11. aurelian/agents/biblio/biblio_agent.py +94 -0
  12. aurelian/agents/biblio/biblio_config.py +40 -0
  13. aurelian/agents/biblio/biblio_gradio.py +67 -0
  14. aurelian/agents/biblio/biblio_mcp.py +115 -0
  15. aurelian/agents/biblio/biblio_tools.py +164 -0
  16. aurelian/agents/biblio_agent.py +46 -0
  17. aurelian/agents/checklist/__init__.py +44 -0
  18. aurelian/agents/checklist/checklist_agent.py +85 -0
  19. aurelian/agents/checklist/checklist_config.py +28 -0
  20. aurelian/agents/checklist/checklist_gradio.py +70 -0
  21. aurelian/agents/checklist/checklist_mcp.py +86 -0
  22. aurelian/agents/checklist/checklist_tools.py +141 -0
  23. aurelian/agents/checklist/content/checklists.yaml +7 -0
  24. aurelian/agents/checklist/content/streams.csv +136 -0
  25. aurelian/agents/checklist_agent.py +40 -0
  26. aurelian/agents/chemistry/__init__.py +3 -0
  27. aurelian/agents/chemistry/chemistry_agent.py +46 -0
  28. aurelian/agents/chemistry/chemistry_config.py +71 -0
  29. aurelian/agents/chemistry/chemistry_evals.py +79 -0
  30. aurelian/agents/chemistry/chemistry_gradio.py +50 -0
  31. aurelian/agents/chemistry/chemistry_mcp.py +120 -0
  32. aurelian/agents/chemistry/chemistry_tools.py +121 -0
  33. aurelian/agents/chemistry/image_agent.py +15 -0
  34. aurelian/agents/d4d/__init__.py +30 -0
  35. aurelian/agents/d4d/d4d_agent.py +72 -0
  36. aurelian/agents/d4d/d4d_config.py +46 -0
  37. aurelian/agents/d4d/d4d_gradio.py +58 -0
  38. aurelian/agents/d4d/d4d_mcp.py +71 -0
  39. aurelian/agents/d4d/d4d_tools.py +157 -0
  40. aurelian/agents/d4d_agent.py +64 -0
  41. aurelian/agents/diagnosis/__init__.py +33 -0
  42. aurelian/agents/diagnosis/diagnosis_agent.py +53 -0
  43. aurelian/agents/diagnosis/diagnosis_config.py +48 -0
  44. aurelian/agents/diagnosis/diagnosis_evals.py +76 -0
  45. aurelian/agents/diagnosis/diagnosis_gradio.py +52 -0
  46. aurelian/agents/diagnosis/diagnosis_mcp.py +141 -0
  47. aurelian/agents/diagnosis/diagnosis_tools.py +204 -0
  48. aurelian/agents/diagnosis_agent.py +28 -0
  49. aurelian/agents/draw/__init__.py +3 -0
  50. aurelian/agents/draw/draw_agent.py +39 -0
  51. aurelian/agents/draw/draw_config.py +26 -0
  52. aurelian/agents/draw/draw_gradio.py +50 -0
  53. aurelian/agents/draw/draw_mcp.py +94 -0
  54. aurelian/agents/draw/draw_tools.py +100 -0
  55. aurelian/agents/draw/judge_agent.py +18 -0
  56. aurelian/agents/filesystem/__init__.py +0 -0
  57. aurelian/agents/filesystem/filesystem_config.py +27 -0
  58. aurelian/agents/filesystem/filesystem_gradio.py +49 -0
  59. aurelian/agents/filesystem/filesystem_mcp.py +89 -0
  60. aurelian/agents/filesystem/filesystem_tools.py +95 -0
  61. aurelian/agents/filesystem/py.typed +0 -0
  62. aurelian/agents/github/__init__.py +0 -0
  63. aurelian/agents/github/github_agent.py +83 -0
  64. aurelian/agents/github/github_cli.py +248 -0
  65. aurelian/agents/github/github_config.py +22 -0
  66. aurelian/agents/github/github_gradio.py +152 -0
  67. aurelian/agents/github/github_mcp.py +252 -0
  68. aurelian/agents/github/github_tools.py +408 -0
  69. aurelian/agents/github/github_tools.py.tmp +413 -0
  70. aurelian/agents/goann/__init__.py +13 -0
  71. aurelian/agents/goann/documents/Transcription_Factors_Annotation_Guidelines.md +1000 -0
  72. aurelian/agents/goann/documents/Transcription_Factors_Annotation_Guidelines.pdf +0 -0
  73. aurelian/agents/goann/documents/Transcription_Factors_Annotation_Guidelines_Paper.md +693 -0
  74. aurelian/agents/goann/documents/Transcription_Factors_Annotation_Guidelines_Paper.pdf +0 -0
  75. aurelian/agents/goann/goann_agent.py +90 -0
  76. aurelian/agents/goann/goann_config.py +90 -0
  77. aurelian/agents/goann/goann_evals.py +104 -0
  78. aurelian/agents/goann/goann_gradio.py +62 -0
  79. aurelian/agents/goann/goann_mcp.py +0 -0
  80. aurelian/agents/goann/goann_tools.py +65 -0
  81. aurelian/agents/gocam/__init__.py +43 -0
  82. aurelian/agents/gocam/documents/DNA-binding transcription factor activity annotation guidelines.docx +0 -0
  83. aurelian/agents/gocam/documents/DNA-binding transcription factor activity annotation guidelines.pdf +0 -0
  84. aurelian/agents/gocam/documents/DNA-binding_transcription_factor_activity_annotation_guidelines.md +100 -0
  85. aurelian/agents/gocam/documents/E3 ubiquitin ligases.docx +0 -0
  86. aurelian/agents/gocam/documents/E3 ubiquitin ligases.pdf +0 -0
  87. aurelian/agents/gocam/documents/E3_ubiquitin_ligases.md +134 -0
  88. aurelian/agents/gocam/documents/GO-CAM annotation guidelines README.docx +0 -0
  89. aurelian/agents/gocam/documents/GO-CAM annotation guidelines README.pdf +0 -0
  90. aurelian/agents/gocam/documents/GO-CAM modelling guidelines TO DO.docx +0 -0
  91. aurelian/agents/gocam/documents/GO-CAM modelling guidelines TO DO.pdf +0 -0
  92. aurelian/agents/gocam/documents/GO-CAM_annotation_guidelines_README.md +1 -0
  93. aurelian/agents/gocam/documents/GO-CAM_modelling_guidelines_TO_DO.md +3 -0
  94. aurelian/agents/gocam/documents/How to annotate complexes in GO-CAM.docx +0 -0
  95. aurelian/agents/gocam/documents/How to annotate complexes in GO-CAM.pdf +0 -0
  96. aurelian/agents/gocam/documents/How to annotate molecular adaptors.docx +0 -0
  97. aurelian/agents/gocam/documents/How to annotate molecular adaptors.pdf +0 -0
  98. aurelian/agents/gocam/documents/How to annotate sequestering proteins.docx +0 -0
  99. aurelian/agents/gocam/documents/How to annotate sequestering proteins.pdf +0 -0
  100. aurelian/agents/gocam/documents/How_to_annotate_complexes_in_GO-CAM.md +29 -0
  101. aurelian/agents/gocam/documents/How_to_annotate_molecular_adaptors.md +31 -0
  102. aurelian/agents/gocam/documents/How_to_annotate_sequestering_proteins.md +42 -0
  103. aurelian/agents/gocam/documents/Molecular adaptor activity.docx +0 -0
  104. aurelian/agents/gocam/documents/Molecular adaptor activity.pdf +0 -0
  105. aurelian/agents/gocam/documents/Molecular carrier activity.docx +0 -0
  106. aurelian/agents/gocam/documents/Molecular carrier activity.pdf +0 -0
  107. aurelian/agents/gocam/documents/Molecular_adaptor_activity.md +51 -0
  108. aurelian/agents/gocam/documents/Molecular_carrier_activity.md +41 -0
  109. aurelian/agents/gocam/documents/Protein sequestering activity.docx +0 -0
  110. aurelian/agents/gocam/documents/Protein sequestering activity.pdf +0 -0
  111. aurelian/agents/gocam/documents/Protein_sequestering_activity.md +50 -0
  112. aurelian/agents/gocam/documents/Signaling receptor activity annotation guidelines.docx +0 -0
  113. aurelian/agents/gocam/documents/Signaling receptor activity annotation guidelines.pdf +0 -0
  114. aurelian/agents/gocam/documents/Signaling_receptor_activity_annotation_guidelines.md +187 -0
  115. aurelian/agents/gocam/documents/Transcription coregulator activity.docx +0 -0
  116. aurelian/agents/gocam/documents/Transcription coregulator activity.pdf +0 -0
  117. aurelian/agents/gocam/documents/Transcription_coregulator_activity.md +36 -0
  118. aurelian/agents/gocam/documents/Transporter activity annotation annotation guidelines.docx +0 -0
  119. aurelian/agents/gocam/documents/Transporter activity annotation annotation guidelines.pdf +0 -0
  120. aurelian/agents/gocam/documents/Transporter_activity_annotation_annotation_guidelines.md +43 -0
  121. Regulatory Processes in GO-CAM.docx +0 -0
  122. Regulatory Processes in GO-CAM.pdf +0 -0
  123. aurelian/agents/gocam/documents/WIP_-_Regulation_and_Regulatory_Processes_in_GO-CAM.md +31 -0
  124. aurelian/agents/gocam/documents/md/DNA-binding_transcription_factor_activity_annotation_guidelines.md +131 -0
  125. aurelian/agents/gocam/documents/md/E3_ubiquitin_ligases.md +166 -0
  126. aurelian/agents/gocam/documents/md/GO-CAM_annotation_guidelines_README.md +1 -0
  127. aurelian/agents/gocam/documents/md/GO-CAM_modelling_guidelines_TO_DO.md +5 -0
  128. aurelian/agents/gocam/documents/md/How_to_annotate_complexes_in_GO-CAM.md +28 -0
  129. aurelian/agents/gocam/documents/md/How_to_annotate_molecular_adaptors.md +19 -0
  130. aurelian/agents/gocam/documents/md/How_to_annotate_sequestering_proteins.md +38 -0
  131. aurelian/agents/gocam/documents/md/Molecular_adaptor_activity.md +52 -0
  132. aurelian/agents/gocam/documents/md/Molecular_carrier_activity.md +59 -0
  133. aurelian/agents/gocam/documents/md/Protein_sequestering_activity.md +52 -0
  134. aurelian/agents/gocam/documents/md/Signaling_receptor_activity_annotation_guidelines.md +271 -0
  135. aurelian/agents/gocam/documents/md/Transcription_coregulator_activity.md +54 -0
  136. aurelian/agents/gocam/documents/md/Transporter_activity_annotation_annotation_guidelines.md +38 -0
  137. aurelian/agents/gocam/documents/md/WIP_-_Regulation_and_Regulatory_Processes_in_GO-CAM.md +39 -0
  138. aurelian/agents/gocam/documents/pandoc_md/Signaling_receptor_activity_annotation_guidelines.md +334 -0
  139. aurelian/agents/gocam/gocam_agent.py +240 -0
  140. aurelian/agents/gocam/gocam_config.py +85 -0
  141. aurelian/agents/gocam/gocam_curator_agent.py +46 -0
  142. aurelian/agents/gocam/gocam_evals.py +67 -0
  143. aurelian/agents/gocam/gocam_gradio.py +89 -0
  144. aurelian/agents/gocam/gocam_mcp.py +224 -0
  145. aurelian/agents/gocam/gocam_tools.py +294 -0
  146. aurelian/agents/linkml/__init__.py +0 -0
  147. aurelian/agents/linkml/linkml_agent.py +62 -0
  148. aurelian/agents/linkml/linkml_config.py +48 -0
  149. aurelian/agents/linkml/linkml_evals.py +66 -0
  150. aurelian/agents/linkml/linkml_gradio.py +45 -0
  151. aurelian/agents/linkml/linkml_mcp.py +186 -0
  152. aurelian/agents/linkml/linkml_tools.py +102 -0
  153. aurelian/agents/literature/__init__.py +3 -0
  154. aurelian/agents/literature/literature_agent.py +55 -0
  155. aurelian/agents/literature/literature_config.py +35 -0
  156. aurelian/agents/literature/literature_gradio.py +52 -0
  157. aurelian/agents/literature/literature_mcp.py +174 -0
  158. aurelian/agents/literature/literature_tools.py +182 -0
  159. aurelian/agents/monarch/__init__.py +25 -0
  160. aurelian/agents/monarch/monarch_agent.py +44 -0
  161. aurelian/agents/monarch/monarch_config.py +45 -0
  162. aurelian/agents/monarch/monarch_gradio.py +51 -0
  163. aurelian/agents/monarch/monarch_mcp.py +65 -0
  164. aurelian/agents/monarch/monarch_tools.py +113 -0
  165. aurelian/agents/oak/__init__.py +0 -0
  166. aurelian/agents/oak/oak_config.py +27 -0
  167. aurelian/agents/oak/oak_gradio.py +57 -0
  168. aurelian/agents/ontology_mapper/__init__.py +31 -0
  169. aurelian/agents/ontology_mapper/ontology_mapper_agent.py +56 -0
  170. aurelian/agents/ontology_mapper/ontology_mapper_config.py +50 -0
  171. aurelian/agents/ontology_mapper/ontology_mapper_evals.py +108 -0
  172. aurelian/agents/ontology_mapper/ontology_mapper_gradio.py +58 -0
  173. aurelian/agents/ontology_mapper/ontology_mapper_mcp.py +81 -0
  174. aurelian/agents/ontology_mapper/ontology_mapper_tools.py +147 -0
  175. aurelian/agents/phenopackets/__init__.py +3 -0
  176. aurelian/agents/phenopackets/phenopackets_agent.py +58 -0
  177. aurelian/agents/phenopackets/phenopackets_config.py +72 -0
  178. aurelian/agents/phenopackets/phenopackets_evals.py +99 -0
  179. aurelian/agents/phenopackets/phenopackets_gradio.py +55 -0
  180. aurelian/agents/phenopackets/phenopackets_mcp.py +178 -0
  181. aurelian/agents/phenopackets/phenopackets_tools.py +127 -0
  182. aurelian/agents/rag/__init__.py +40 -0
  183. aurelian/agents/rag/rag_agent.py +83 -0
  184. aurelian/agents/rag/rag_config.py +80 -0
  185. aurelian/agents/rag/rag_gradio.py +67 -0
  186. aurelian/agents/rag/rag_mcp.py +107 -0
  187. aurelian/agents/rag/rag_tools.py +189 -0
  188. aurelian/agents/rag_agent.py +54 -0
  189. aurelian/agents/robot/__init__.py +0 -0
  190. aurelian/agents/robot/assets/__init__.py +3 -0
  191. aurelian/agents/robot/assets/template.md +384 -0
  192. aurelian/agents/robot/robot_config.py +25 -0
  193. aurelian/agents/robot/robot_gradio.py +46 -0
  194. aurelian/agents/robot/robot_mcp.py +100 -0
  195. aurelian/agents/robot/robot_ontology_agent.py +139 -0
  196. aurelian/agents/robot/robot_tools.py +50 -0
  197. aurelian/agents/talisman/__init__.py +3 -0
  198. aurelian/agents/talisman/talisman_agent.py +126 -0
  199. aurelian/agents/talisman/talisman_config.py +66 -0
  200. aurelian/agents/talisman/talisman_gradio.py +50 -0
  201. aurelian/agents/talisman/talisman_mcp.py +168 -0
  202. aurelian/agents/talisman/talisman_tools.py +720 -0
  203. aurelian/agents/ubergraph/__init__.py +40 -0
  204. aurelian/agents/ubergraph/ubergraph_agent.py +71 -0
  205. aurelian/agents/ubergraph/ubergraph_config.py +79 -0
  206. aurelian/agents/ubergraph/ubergraph_gradio.py +48 -0
  207. aurelian/agents/ubergraph/ubergraph_mcp.py +69 -0
  208. aurelian/agents/ubergraph/ubergraph_tools.py +118 -0
  209. aurelian/agents/uniprot/__init__.py +37 -0
  210. aurelian/agents/uniprot/uniprot_agent.py +43 -0
  211. aurelian/agents/uniprot/uniprot_config.py +43 -0
  212. aurelian/agents/uniprot/uniprot_evals.py +99 -0
  213. aurelian/agents/uniprot/uniprot_gradio.py +48 -0
  214. aurelian/agents/uniprot/uniprot_mcp.py +168 -0
  215. aurelian/agents/uniprot/uniprot_tools.py +136 -0
  216. aurelian/agents/web/__init__.py +0 -0
  217. aurelian/agents/web/web_config.py +27 -0
  218. aurelian/agents/web/web_gradio.py +48 -0
  219. aurelian/agents/web/web_mcp.py +50 -0
  220. aurelian/agents/web/web_tools.py +108 -0
  221. aurelian/chat.py +23 -0
  222. aurelian/cli.py +800 -0
  223. aurelian/dependencies/__init__.py +0 -0
  224. aurelian/dependencies/workdir.py +78 -0
  225. aurelian/mcp/__init__.py +0 -0
  226. aurelian/mcp/amigo_mcp_test.py +86 -0
  227. aurelian/mcp/config_generator.py +123 -0
  228. aurelian/mcp/example_config.json +43 -0
  229. aurelian/mcp/generate_sample_config.py +37 -0
  230. aurelian/mcp/gocam_mcp_test.py +126 -0
  231. aurelian/mcp/linkml_mcp_tools.py +190 -0
  232. aurelian/mcp/mcp_discovery.py +87 -0
  233. aurelian/mcp/mcp_test.py +31 -0
  234. aurelian/mcp/phenopackets_mcp_test.py +103 -0
  235. aurelian/tools/__init__.py +0 -0
  236. aurelian/tools/web/__init__.py +0 -0
  237. aurelian/tools/web/url_download.py +51 -0
  238. aurelian/utils/__init__.py +0 -0
  239. aurelian/utils/async_utils.py +15 -0
  240. aurelian/utils/data_utils.py +32 -0
  241. aurelian/utils/documentation_manager.py +59 -0
  242. aurelian/utils/doi_fetcher.py +238 -0
  243. aurelian/utils/ontology_utils.py +68 -0
  244. aurelian/utils/pdf_fetcher.py +23 -0
  245. aurelian/utils/process_logs.py +100 -0
  246. aurelian/utils/pubmed_utils.py +238 -0
  247. aurelian/utils/pytest_report_to_markdown.py +67 -0
  248. aurelian/utils/robot_ontology_utils.py +112 -0
  249. aurelian/utils/search_utils.py +95 -0
  250. aurelian-0.3.2.dist-info/LICENSE +22 -0
  251. aurelian-0.3.2.dist-info/METADATA +105 -0
  252. aurelian-0.3.2.dist-info/RECORD +254 -0
  253. aurelian-0.3.2.dist-info/WHEEL +4 -0
  254. aurelian-0.3.2.dist-info/entry_points.txt +3 -0
aurelian/cli.py ADDED
@@ -0,0 +1,800 @@
1
+ """Command line interface for Aurelian agents."""
2
+
3
+ import logging
4
+ import os
5
+ from typing import Any, Awaitable, Callable, Optional, List
6
+
7
+ import click
8
+ from pydantic_ai.models.openai import OpenAIModel
9
+ from pydantic_ai.providers.openai import OpenAIProvider
10
+
11
+ from aurelian import __version__
12
+
13
+ __all__ = [
14
+ "main",
15
+ ]
16
+
17
+ logger = logging.getLogger(__name__)
18
+
19
+
20
+ def parse_multivalued(ctx, param, value: Optional[str]) -> Optional[List]:
21
+ """Parse a comma-separated string into a list."""
22
+ if not value:
23
+ return None
24
+ return value.split(',') if isinstance(value, str) and ',' in value else [value]
25
+
26
+
27
+ # Common CLI options
28
+ model_option = click.option(
29
+ "--model",
30
+ "-m",
31
+ help="The model to use for the agent.",
32
+ )
33
+ use_cborg_option = click.option(
34
+ "--use-cborg/--no-use-cborg",
35
+ default=False,
36
+ show_default=True,
37
+ help="Use CBORG as a model proxy (LBNL account required).",
38
+ )
39
+ agent_option = click.option(
40
+ "--agent",
41
+ "-a",
42
+ help="The agent to use (if non-default).",
43
+ )
44
+ workdir_option = click.option(
45
+ "--workdir",
46
+ "-w",
47
+ default="workdir",
48
+ show_default=True,
49
+ help="The working directory for the agent.",
50
+ )
51
+ share_option = click.option(
52
+ "--share/--no-share",
53
+ default=False,
54
+ show_default=True,
55
+ help="Share the agent GradIO UI via URL.",
56
+ )
57
+ ui_option = click.option(
58
+ "--ui/--no-ui",
59
+ default=False,
60
+ show_default=True,
61
+ help="Start the agent in UI mode instead of direct query mode.",
62
+ )
63
+ run_evals_option = click.option(
64
+ "--run-evals/--no-run-evals",
65
+ default=False,
66
+ show_default=True,
67
+ help="Run the agent in evaluation mode.",
68
+ )
69
+ ontologies_option = click.option(
70
+ "--ontologies",
71
+ "-i",
72
+ callback=parse_multivalued,
73
+ help="Comma-separated list of ontologies to use for the agent.",
74
+ )
75
+ server_port_option = click.option(
76
+ "--server-port",
77
+ "-p",
78
+ default=7860,
79
+ show_default=True,
80
+ help="The port to run the UI server on.",
81
+ )
82
+ db_path_option = click.option(
83
+ "--db-path",
84
+ "-d",
85
+ help="The path to the database.",
86
+ )
87
+ collection_name_option = click.option(
88
+ "--collection-name",
89
+ "-c",
90
+ help="The name of the collection.",
91
+ )
92
+
93
+
94
+ @click.group()
95
+ @click.option("-v", "--verbose", count=True)
96
+ @click.option("-q", "--quiet")
97
+ @click.version_option(__version__)
98
+ def main(verbose: int, quiet: bool):
99
+ """Main command for Aurelian.
100
+
101
+ Aurelian provides a collection of specialized agents for various scientific and biomedical tasks.
102
+ Each agent can be run in either direct query mode or UI mode:
103
+
104
+ - Direct query mode: Run the agent with a query (e.g., `aurelian diagnosis "patient with hypotonia"`).
105
+ - UI mode: Run the agent with `--ui` flag to start a chat interface.
106
+
107
+ Some agents also provide utility commands for specific operations.
108
+
109
+ :param verbose: Verbosity while running.
110
+ :param quiet: Boolean to be quiet or verbose.
111
+ """
112
+ if verbose >= 2:
113
+ logger.setLevel(level=logging.DEBUG)
114
+ elif verbose == 1:
115
+ logger.setLevel(level=logging.INFO)
116
+ else:
117
+ logger.setLevel(level=logging.WARNING)
118
+ if quiet:
119
+ logger.setLevel(level=logging.ERROR)
120
+ import logfire
121
+
122
+ logfire.configure()
123
+
124
+
125
+ def split_options(kwargs, agent_keys: Optional[List]=None, extra_agent_keys: Optional[List] = None):
126
+ """Split options into agent and launch options."""
127
+ if agent_keys is None:
128
+ agent_keys = ["model", "workdir", "ontologies", "db_path", "collection_name"]
129
+ if extra_agent_keys is not None:
130
+ agent_keys += extra_agent_keys
131
+ agent_options = {k: v for k, v in kwargs.items() if k in agent_keys}
132
+ launch_options = {k: v for k, v in kwargs.items() if k not in agent_keys}
133
+ return agent_options, launch_options
134
+
135
+
136
+ def run_agent(
137
+ agent_name: str,
138
+ agent_module: str,
139
+ query: Optional[tuple] = None,
140
+ ui: bool = False,
141
+ specialist_agent_name: Optional[str] = None,
142
+ agent_func_name: str = "run_sync",
143
+ join_char: str = " ",
144
+ use_cborg: bool = False,
145
+ **kwargs
146
+ ) -> None:
147
+ """Run an agent in either UI or direct query mode.
148
+
149
+ Args:
150
+ agent_name: Agent's name for import paths
151
+ agent_module: Fully qualified module path to the agent
152
+ query: Text query for direct mode
153
+ ui: Whether to force UI mode
154
+ specialist_agent_name: Name of the agent class to run
155
+ agent_func_name: Name of the function to run the agent
156
+ join_char: Character to join multi-part queries with
157
+ kwargs: Additional arguments for the agent
158
+ """
159
+ # DEPRECATED: use the new agent command instead
160
+ # Import required modules
161
+ # These are imported dynamically to avoid loading all agents on startup
162
+ if not agent_module:
163
+ agent_module = f"aurelian.agents.{agent_name}"
164
+ if not specialist_agent_name:
165
+ specialist_agent_name = agent_name
166
+ gradio_module = __import__(f"{agent_module}.{agent_name}_gradio", fromlist=["chat"])
167
+ agent_class = __import__(f"{agent_module}.{agent_name}_agent", fromlist=[f"{specialist_agent_name}_agent"])
168
+ config_module = __import__(f"{agent_module}.{agent_name}_config", fromlist=["get_config"])
169
+
170
+ chat_func = gradio_module.chat
171
+ agent = getattr(agent_class, f"{specialist_agent_name}_agent")
172
+ get_config = config_module.get_config
173
+
174
+ # Process agent and UI options
175
+ agent_keys = ["model", "use_cborg", "workdir", "ontologies", "db_path", "collection_name"]
176
+ agent_options, launch_options = split_options(kwargs, agent_keys=agent_keys)
177
+
178
+ deps = get_config()
179
+
180
+ # Set workdir if provided
181
+ if 'workdir' in agent_options and agent_options['workdir']:
182
+ if hasattr(deps, 'workdir'):
183
+ deps.workdir.location = agent_options['workdir']
184
+
185
+ # Remove workdir from agent options to avoid duplicates
186
+ agent_run_options = {k: v for k, v in agent_options.items() if k != 'workdir'}
187
+
188
+ if use_cborg:
189
+ cborg_api_key = os.environ.get("CBORG_API_KEY")
190
+ model = OpenAIModel(
191
+ agent_run_options.get("model", kwargs.get("model", "openai:gpt-4o")),
192
+ provider=OpenAIProvider(
193
+ base_url="https://api.cborg.lbl.gov",
194
+ api_key=cborg_api_key),
195
+ )
196
+ print(f"CBORG model: {model}")
197
+ agent_run_options["model"] = model
198
+
199
+ # Run in appropriate mode
200
+ if not ui and query:
201
+ # Direct query mode
202
+
203
+ # Run the agent and print results
204
+ agent_run_func = getattr(agent, agent_func_name)
205
+ r = agent_run_func(join_char.join(query), deps=deps, **agent_run_options)
206
+ print(r.data)
207
+ mjb = r.all_messages_json()
208
+ # decode messages from json bytes to dict:
209
+ if isinstance(mjb, bytes):
210
+ mjb = mjb.decode()
211
+ # print the messages
212
+ import json
213
+ all_messages = json.loads(mjb)
214
+ import yaml
215
+ # print(yaml.dump(all_messages, indent=2))
216
+ else:
217
+ print(f"Running {agent_name} in UI mode, agent options: {agent_options}")
218
+ # UI mode
219
+ gradio_ui = chat_func(deps=deps, **agent_run_options)
220
+ gradio_ui.launch(**launch_options)
221
+
222
+
223
+ @main.command()
224
+ @agent_option
225
+ @model_option
226
+ @use_cborg_option
227
+ @share_option
228
+ @server_port_option
229
+ @workdir_option
230
+ @ui_option
231
+ @run_evals_option
232
+ @click.argument("query", nargs=-1, required=False)
233
+ def agent(ui, query, agent, use_cborg=False, run_evals=False, **kwargs):
234
+ """NEW: Generic agent runner.
235
+
236
+ Run with a query for direct mode or with --ui for interactive chat mode.
237
+ """
238
+ if not agent:
239
+ raise click.UsageError("Error: --agent is required")
240
+ agent_module = f"aurelian.agents.{agent}"
241
+ specialist_agent_name = agent
242
+ gradio_module = __import__(f"{agent_module}.{agent}_gradio", fromlist=["chat"])
243
+ agent_class = __import__(f"{agent_module}.{agent}_agent", fromlist=[f"{specialist_agent_name}_agent"])
244
+ config_module = __import__(f"{agent_module}.{agent}_config", fromlist=["get_config"])
245
+
246
+ chat_func = gradio_module.chat
247
+ agent_obj = getattr(agent_class, f"{specialist_agent_name}_agent")
248
+ get_config = config_module.get_config
249
+
250
+ # Process agent and UI options
251
+ agent_keys = ["model", "use_cborg", "workdir", "ontologies", "db_path", "collection_name"]
252
+ agent_options, launch_options = split_options(kwargs, agent_keys=agent_keys)
253
+
254
+ deps = get_config()
255
+
256
+ # Set workdir if provided
257
+ if hasattr(deps, 'workdir'):
258
+ deps.workdir.location = kwargs['workdir']
259
+
260
+ # Remove workdir from agent options to avoid duplicates
261
+ agent_run_options = {k: v for k, v in agent_options.items() if k != 'workdir'}
262
+
263
+ # TODO: make this generic, for any proxy model
264
+ if use_cborg:
265
+ cborg_api_key = os.environ.get("CBORG_API_KEY")
266
+ model = OpenAIModel(
267
+ agent_run_options.get("model", "openai:gpt-4o"),
268
+ provider=OpenAIProvider(
269
+ base_url="https://api.cborg.lbl.gov",
270
+ api_key=cborg_api_key),
271
+ )
272
+ agent_run_options["model"] = model
273
+
274
+ # Run in appropriate mode
275
+ if not ui and query:
276
+ # Direct query mode
277
+ join_char = " "
278
+ # Run the agent and print results
279
+ agent_run_func = getattr(agent_obj, "run_sync")
280
+ r = agent_run_func(join_char.join(query), deps=deps, **agent_run_options)
281
+ print(r.data)
282
+ mjb = r.all_messages_json()
283
+ # decode messages from json bytes to dict:
284
+ if isinstance(mjb, bytes):
285
+ mjb = mjb.decode()
286
+ # print the messages
287
+ import json
288
+ all_messages = json.loads(mjb)
289
+ import yaml
290
+ # print(yaml.dump(all_messages, indent=2))
291
+ elif run_evals:
292
+ import sys
293
+ import importlib
294
+ # TODO: make this generic
295
+ package_name = f"{agent_module}.{agent}_evals"
296
+ module = importlib.import_module(package_name)
297
+ dataset = module.create_eval_dataset()
298
+
299
+ async def run_agent(inputs: str) -> Any:
300
+ result = await agent_obj.run(inputs, deps=deps, **agent_run_options)
301
+ return result.data
302
+
303
+ eval_func: Callable[[str], Awaitable[str]] = run_agent
304
+ report = dataset.evaluate_sync(eval_func)
305
+ report.print(include_input=True, include_output=True)
306
+ else:
307
+ print(f"Running {agent} in UI mode, agent options: {agent_options}")
308
+ # UI mode
309
+ gradio_ui = chat_func(deps=deps, **agent_run_options)
310
+ gradio_ui.launch(**launch_options)
311
+
312
+
313
+
314
+ @main.command()
315
+ @click.option("--limit", "-l", default=10, show_default=True, help="Number of results to return.")
316
+ @click.argument("ontology")
317
+ @click.argument("term")
318
+ def search_ontology(ontology: str, term: str, **kwargs):
319
+ """Search the ontology for the given query term.
320
+
321
+ Also has side effect of indexing. You may want to pre-index before
322
+ starting an individual UI.
323
+ """
324
+ import aurelian.utils.ontology_utils as ontology_utils
325
+ from oaklib import get_adapter
326
+
327
+ handle = "sqlite:obo:" + ontology
328
+ adapter = get_adapter(handle)
329
+ objs = ontology_utils.search_ontology(adapter, term, **kwargs)
330
+ for id, label in objs:
331
+ print(id, label)
332
+
333
+
334
+ @main.command()
335
+ @agent_option
336
+ @model_option
337
+ @use_cborg_option
338
+ @share_option
339
+ @server_port_option
340
+ @ui_option
341
+ @click.argument("query", nargs=-1, required=False)
342
+ def gocam(ui, query, agent, **kwargs):
343
+ """Start the GO-CAM Agent for gene ontology causal activity models.
344
+
345
+ The GO-CAM Agent helps create and analyze Gene Ontology Causal Activity Models,
346
+ which describe biological systems as molecular activities connected by causal
347
+ relationships.
348
+
349
+ Run with a query for direct mode or with --ui for interactive chat mode.
350
+ """
351
+ run_agent("gocam", "aurelian.agents.gocam", query=query, ui=ui, specialist_agent_name=agent, **kwargs)
352
+
353
+
354
+
355
+ @main.command()
356
+ @model_option
357
+ @workdir_option
358
+ @share_option
359
+ @server_port_option
360
+ @ui_option
361
+ @click.argument("query", nargs=-1, required=False)
362
+ def phenopackets(ui, query, **kwargs):
363
+ """Start the Phenopackets Agent for standardized phenotype data.
364
+
365
+ The Phenopackets Agent helps work with GA4GH Phenopackets, a standard
366
+ format for sharing disease and phenotype information for genomic
367
+ medicine.
368
+
369
+ Run with a query for direct mode or with --ui for interactive chat mode.
370
+ """
371
+ run_agent("phenopackets", "aurelian.agents.phenopackets", query=query, ui=ui, **kwargs)
372
+
373
+
374
+ @main.command()
375
+ @model_option
376
+ @workdir_option
377
+ @share_option
378
+ @server_port_option
379
+ @ui_option
380
+ @click.argument("query", nargs=-1, required=False)
381
+ def diagnosis(ui, query, **kwargs):
382
+ """Start the Diagnosis Agent for rare disease diagnosis.
383
+
384
+ The Diagnosis Agent assists in diagnosing rare diseases by leveraging the
385
+ Monarch Knowledge Base. It helps clinical geneticists evaluate potential
386
+ conditions based on patient phenotypes.
387
+
388
+ Run with a query for direct mode or with --ui for interactive chat mode.
389
+ """
390
+ run_agent("diagnosis", "aurelian.agents.diagnosis", query=query, ui=ui, **kwargs)
391
+
392
+
393
+ @main.command()
394
+ @model_option
395
+ @workdir_option
396
+ @share_option
397
+ @server_port_option
398
+ @ui_option
399
+ @click.argument("query", nargs=-1, required=False)
400
+ def checklist(ui, query, **kwargs):
401
+ """Start the Checklist Agent for paper evaluation.
402
+
403
+ The Checklist Agent evaluates scientific papers against established checklists
404
+ such as STREAMS, STORMS, and ARRIVE. It helps ensure that papers conform to
405
+ relevant reporting guidelines and best practices.
406
+
407
+ Run with a query for direct mode or with --ui for interactive chat mode.
408
+ """
409
+ run_agent("checklist", "aurelian.agents.checklist", query=query, ui=ui, **kwargs)
410
+
411
+
412
+ # Keep backward compatibility
413
+ @main.command()
414
+ @model_option
415
+ @workdir_option
416
+ @share_option
417
+ @server_port_option
418
+ def aria(**kwargs):
419
+ """Start the Checklist UI (deprecated, use 'checklist' instead)."""
420
+ run_agent("checklist", "aurelian.agents.checklist", ui=True, **kwargs)
421
+
422
+
423
+ @main.command()
424
+ @model_option
425
+ @workdir_option
426
+ @share_option
427
+ @server_port_option
428
+ @ui_option
429
+ @click.argument("query", nargs=-1, required=False)
430
+ def linkml(ui, query, **kwargs):
431
+ """Start the LinkML Agent for data modeling and schema validation.
432
+
433
+ The LinkML Agent helps create and validate data models and schemas using the
434
+ Linked data Modeling Language (LinkML). It can assist in generating schemas,
435
+ validating data against schemas, and modeling domain knowledge.
436
+
437
+ Run with a query for direct mode or with --ui for interactive chat mode.
438
+ """
439
+ run_agent("linkml", "aurelian.agents.linkml", query=query, ui=ui, **kwargs)
440
+
441
+
442
+ @main.command()
443
+ @model_option
444
+ @workdir_option
445
+ @share_option
446
+ @server_port_option
447
+ @ui_option
448
+ @click.argument("query", nargs=-1, required=False)
449
+ def robot(ui, query, **kwargs):
450
+ """Start the ROBOT Agent for ontology operations.
451
+
452
+ The ROBOT Agent provides natural language access to ontology operations
453
+ and manipulations using the ROBOT tool. It can create, modify, and analyze
454
+ ontologies through a chat interface.
455
+
456
+ Run with a query for direct mode or with --ui for interactive chat mode.
457
+ """
458
+ run_agent("robot", "aurelian.agents.robot", query=query, ui=ui, agent_func_name="chat", **kwargs)
459
+
460
+
461
+ @main.command()
462
+ @model_option
463
+ @workdir_option
464
+ @share_option
465
+ @server_port_option
466
+ @ui_option
467
+ @click.argument("query", nargs=-1, required=False)
468
+ def amigo(ui, query, **kwargs):
469
+ """Start the AmiGO Agent for Gene Ontology data exploration.
470
+
471
+ The AmiGO Agent provides access to the Gene Ontology (GO) and gene
472
+ product annotations. It helps users explore gene functions and
473
+ ontology relationships.
474
+
475
+ Run with a query for direct mode or with --ui for interactive chat mode.
476
+ """
477
+ run_agent("amigo", "aurelian.agents.amigo", query=query, ui=ui, **kwargs)
478
+
479
+
480
+ @main.command()
481
+ @model_option
482
+ @workdir_option
483
+ @share_option
484
+ @server_port_option
485
+ @ui_option
486
+ @db_path_option
487
+ @collection_name_option
488
+ @click.argument("query", nargs=-1, required=False)
489
+ def rag(ui, query, db_path, collection_name, **kwargs):
490
+ """Start the RAG Agent for document retrieval and generation.
491
+
492
+ The RAG (Retrieval-Augmented Generation) Agent provides a natural language
493
+ interface for exploring and searching document collections. It uses RAG
494
+ techniques to combine search capabilities with generative AI.
495
+
496
+ Run with a query for direct mode or with --ui for interactive chat mode.
497
+ """
498
+ if not db_path:
499
+ click.echo("Error: --db-path is required")
500
+ return
501
+
502
+ # Add special parameters to kwargs
503
+ kwargs["db_path"] = db_path
504
+ if collection_name:
505
+ kwargs["collection_name"] = collection_name
506
+
507
+ run_agent("rag", "aurelian.agents.rag", query=query, ui=ui, **kwargs)
508
+
509
+
510
+ @main.command()
511
+ @model_option
512
+ @workdir_option
513
+ @share_option
514
+ @server_port_option
515
+ @ui_option
516
+ @ontologies_option
517
+ @click.argument("query", nargs=-1, required=False)
518
+ def mapper(ui, query, ontologies, **kwargs):
519
+ """Start the Ontology Mapper Agent for mapping between ontologies.
520
+
521
+ The Ontology Mapper Agent helps translate terms between different ontologies
522
+ and vocabularies. It can find equivalent concepts across ontologies and
523
+ explain relationships.
524
+
525
+ Run with a query for direct mode or with --ui for interactive chat mode.
526
+ """
527
+ # Special handling for ontologies parameter
528
+ if ontologies:
529
+ if isinstance(ontologies, str):
530
+ ontologies = [ontologies]
531
+ kwargs["ontologies"] = ontologies
532
+
533
+ run_agent("ontology_mapper", "aurelian.agents.ontology_mapper", query=query, ui=ui, join_char="\n", **kwargs)
534
+
535
+
536
+ @main.command()
537
+ @click.argument("pmid")
538
+ def fulltext(pmid):
539
+ """Download full text for a PubMed article."""
540
+ from aurelian.utils.pubmed_utils import get_pmid_text
541
+ txt = get_pmid_text(pmid)
542
+ print(txt)
543
+
544
+
545
+ @main.command()
546
+ @click.argument("term")
547
+ def websearch(term):
548
+ """Search the web for a query term."""
549
+ from aurelian.utils.search_utils import web_search
550
+ txt = web_search(term)
551
+ print(txt)
552
+
553
+
554
+ @main.command()
555
+ @click.argument("url")
556
+ def geturl(url):
557
+ """Retrieve content from a URL."""
558
+ from aurelian.utils.search_utils import retrieve_web_page
559
+ txt = retrieve_web_page(url)
560
+ print(txt)
561
+
562
+
563
+ @main.command()
564
+ @model_option
565
+ @workdir_option
566
+ @share_option
567
+ @server_port_option
568
+ @ui_option
569
+ @click.argument("url", required=False)
570
+ def datasheets(ui, url, **kwargs):
571
+ """Start the Datasheets for Datasets (D4D) Agent.
572
+
573
+ The D4D Agent extracts structured metadata from dataset documentation
574
+ according to the Datasheets for Datasets schema. It can analyze both
575
+ web pages and PDF documents describing datasets.
576
+
577
+ Run with a URL for direct mode or with --ui for interactive chat mode.
578
+ """
579
+ run_agent("d4d", "aurelian.agents.d4d", query=(url,) if url else None, ui=ui, **kwargs)
580
+
581
+
582
+ @main.command()
583
+ @model_option
584
+ @workdir_option
585
+ @share_option
586
+ @server_port_option
587
+ @ui_option
588
+ @click.argument("query", nargs=-1, required=False)
589
+ def chemistry(ui, query, **kwargs):
590
+ """Start the Chemistry Agent for chemical structure analysis.
591
+
592
+ The Chemistry Agent helps interpret and work with chemical structures,
593
+ formulas, and related information.
594
+
595
+ Run with a query for direct mode or with --ui for interactive chat mode.
596
+ """
597
+ run_agent("chemistry", "aurelian.agents.chemistry", query=query, ui=ui, **kwargs)
598
+
599
+
600
+ @main.command()
601
+ @model_option
602
+ @workdir_option
603
+ @share_option
604
+ @server_port_option
605
+ @ui_option
606
+ @click.argument("query", nargs=-1, required=False)
607
+ def literature(ui, query, **kwargs):
608
+ """Start the Literature Agent for scientific publication analysis.
609
+
610
+ The Literature Agent provides tools for analyzing scientific publications,
611
+ extracting key information, and answering questions about research articles.
612
+
613
+ Run with a query for direct mode or with --ui for interactive chat mode.
614
+ """
615
+ run_agent("literature", "aurelian.agents.literature", query=query, ui=ui, **kwargs)
616
+
617
+
618
+ @main.command()
619
+ @model_option
620
+ @workdir_option
621
+ @share_option
622
+ @server_port_option
623
+ @ui_option
624
+ @click.argument("query", nargs=-1, required=False)
625
+ def biblio(ui, query, **kwargs):
626
+ """Start the Biblio Agent for bibliographic data management.
627
+
628
+ The Biblio Agent helps organize and search bibliographic data and citations.
629
+ It provides tools for searching a bibliography database, retrieving scientific
630
+ publications, and accessing web content.
631
+
632
+ Run with a query for direct mode or with --ui for interactive chat mode.
633
+ """
634
+ run_agent("biblio", "aurelian.agents.biblio", query=query, ui=ui, **kwargs)
635
+
636
+
637
+ @main.command()
638
+ @model_option
639
+ @workdir_option
640
+ @share_option
641
+ @server_port_option
642
+ @ui_option
643
+ @click.argument("query", nargs=-1, required=False)
644
+ def monarch(ui, query, **kwargs):
645
+ """Start the Monarch Agent for biomedical knowledge exploration.
646
+
647
+ The Monarch Agent provides access to relationships between genes, diseases,
648
+ phenotypes, and other biomedical entities through the Monarch Knowledge Base.
649
+
650
+ Run with a query for direct mode or with --ui for interactive chat mode.
651
+ """
652
+ run_agent("monarch", "aurelian.agents.monarch", query=query, ui=ui, **kwargs)
653
+
654
+
655
+ @main.command()
656
+ @model_option
657
+ @workdir_option
658
+ @share_option
659
+ @server_port_option
660
+ @ui_option
661
+ @click.argument("query", nargs=-1, required=False)
662
+ def ubergraph(ui, query, **kwargs):
663
+ """Start the UberGraph Agent for SPARQL-based ontology queries.
664
+
665
+ The UberGraph Agent provides a natural language interface to query ontologies
666
+ using SPARQL through the UberGraph endpoint. It helps users formulate and execute
667
+ SPARQL queries without needing to know the full SPARQL syntax.
668
+
669
+ Run with a query for direct mode or with --ui for interactive chat mode.
670
+ """
671
+ run_agent("ubergraph", "aurelian.agents.ubergraph", query=query, ui=ui, **kwargs)
672
+
673
+
674
+ @main.command()
675
+ @model_option
676
+ @workdir_option
677
+ @share_option
678
+ @server_port_option
679
+ @ui_option
680
+ @click.argument("query", nargs=-1, required=False)
681
+ def gene(ui, query, **kwargs):
682
+ """Start the Gene Agent for retrieving gene descriptions.
683
+
684
+ The Gene Agent retrieves descriptions for gene identifiers using the UniProt API.
685
+ It can process a single gene or a list of genes and returns detailed information
686
+ about gene function, products, and associations.
687
+
688
+ Run with a query for direct mode or with --ui for interactive chat mode.
689
+ """
690
+ run_agent("gene", "aurelian.agents.gene", query=query, ui=ui, **kwargs)
691
+
692
+ @main.command()
693
+ @model_option
694
+ @use_cborg_option
695
+ @workdir_option
696
+ @share_option
697
+ @server_port_option
698
+ @ui_option
699
+ @click.argument("query", nargs=-1, required=False)
700
+ def goann(ui, query, **kwargs):
701
+ """Start the GO Annotation Review Agent for evaluating GO annotations.
702
+
703
+ The GO Annotation Review Agent helps review GO annotations for accuracy
704
+ and proper evidence. It can evaluate annotations based on evidence codes,
705
+ identify potential over-annotations, and ensure compliance with GO guidelines,
706
+ particularly for transcription factors.
707
+
708
+ Run with a query for direct mode or with --ui for interactive chat mode.
709
+ """
710
+ run_agent("goann", "aurelian.agents.goann", query=query, ui=ui, **kwargs)
711
+
712
+
713
+ @main.command()
714
+ @model_option
715
+ @workdir_option
716
+ @share_option
717
+ @server_port_option
718
+ @ui_option
719
+ @click.argument("query", nargs=-1, required=False)
720
+ def github(ui, query, **kwargs):
721
+ """Start the GitHub Agent for repository interaction.
722
+
723
+ The GitHub Agent provides a natural language interface for interacting with GitHub
724
+ repositories. It can list/view pull requests and issues, find connections between PRs
725
+ and issues, search code, clone repositories, and examine commit history.
726
+
727
+ Requires GitHub CLI (gh) to be installed and authenticated.
728
+
729
+ Run with a query for direct mode or with --ui for interactive chat mode.
730
+ """
731
+ run_agent("github", "aurelian.agents.github", query=query, ui=ui, **kwargs)
732
+
733
+
734
+ @main.command()
735
+ @model_option
736
+ @workdir_option
737
+ @share_option
738
+ @server_port_option
739
+ @ui_option
740
+ @click.argument("query", nargs=-1, required=False)
741
+ def draw(ui, query, **kwargs):
742
+ """Start the Draw Agent for creating SVG drawings.
743
+
744
+ The Draw Agent creates SVG drawings based on text descriptions and provides
745
+ feedback on drawing quality from an art critic judge. It helps generate visual
746
+ representations from textual descriptions with a focus on clarity and simplicity.
747
+
748
+ Run with a query for direct mode or with --ui for interactive chat mode.
749
+ """
750
+ run_agent("draw", "aurelian.agents.draw", query=query, ui=ui, **kwargs)
751
+
752
+
753
+ @main.command()
754
+ @ui_option
755
+ @workdir_option
756
+ @share_option
757
+ @server_port_option
758
+ @click.argument("query", nargs=-1, required=False)
759
+ def talisman(ui, query, **kwargs):
760
+ """Start the Talisman Agent for advanced gene analysis.
761
+
762
+ The Talisman Agent retrieves descriptions for gene identifiers using UniProt and NCBI Entrez.
763
+ It can process a single gene, protein ID, or a list of genes and returns detailed information.
764
+ It also can analyze relationships between multiple genes to identify functional connections.
765
+
766
+ Run with a query for direct mode or with --ui for interactive chat mode.
767
+
768
+ Examples:
769
+ aurelian talisman TP53
770
+ aurelian talisman "TP53, MDM2"
771
+ aurelian talisman "BRCA1, BRCA2, ATM, PARP1"
772
+ """
773
+ run_agent("talisman", "aurelian.agents.talisman", query=query, ui=ui, **kwargs)
774
+ @model_option
775
+ @workdir_option
776
+ @share_option
777
+ @server_port_option
778
+ @ui_option
779
+ @click.argument("query", nargs=-1, required=False)
780
+ def reaction(ui, query, **kwargs):
781
+ """Start the Reaction Agent for biochemical reaction query and curation.
782
+
783
+ The Reaction Agent helps query and curate biochemical reactions from various sources
784
+ including RHEA and UniProt. It can identify enzymes, substrates, products, and
785
+ extract reaction information from scientific text.
786
+
787
+ Run with a query for direct mode or with --ui for interactive chat mode.
788
+ """
789
+ run_agent("reaction", "aurelian.agents.reaction", query=query, ui=ui, **kwargs)
790
+
791
+
792
+
793
+ # DO NOT REMOVE THIS LINE
794
+ # added this for mkdocstrings to work
795
+ # see https://github.com/bruce-szalwinski/mkdocs-typer/issues/18
796
+ #click_app = get_command(app)
797
+ #click_app.name = "aurelian"
798
+
799
+ if __name__ == "__main__":
800
+ main()