doctorcli 1.0.0__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.
- doctorcli-1.0.0/LICENSE +21 -0
- doctorcli-1.0.0/MANIFEST.in +3 -0
- doctorcli-1.0.0/PKG-INFO +159 -0
- doctorcli-1.0.0/README.md +123 -0
- doctorcli-1.0.0/pyproject.toml +58 -0
- doctorcli-1.0.0/setup.cfg +4 -0
- doctorcli-1.0.0/src/doctorcli/__init__.py +5 -0
- doctorcli-1.0.0/src/doctorcli/__main__.py +5 -0
- doctorcli-1.0.0/src/doctorcli/agents.py +133 -0
- doctorcli-1.0.0/src/doctorcli/app.py +3 -0
- doctorcli-1.0.0/src/doctorcli/application.py +943 -0
- doctorcli-1.0.0/src/doctorcli/cli.py +45 -0
- doctorcli-1.0.0/src/doctorcli/constants.py +12 -0
- doctorcli-1.0.0/src/doctorcli/domain/__init__.py +1 -0
- doctorcli-1.0.0/src/doctorcli/domain/models.py +205 -0
- doctorcli-1.0.0/src/doctorcli/exceptions.py +14 -0
- doctorcli-1.0.0/src/doctorcli/provider_profiles.py +70 -0
- doctorcli-1.0.0/src/doctorcli/providers/__init__.py +1 -0
- doctorcli-1.0.0/src/doctorcli/providers/base.py +143 -0
- doctorcli-1.0.0/src/doctorcli/providers/claude_provider.py +102 -0
- doctorcli-1.0.0/src/doctorcli/providers/gemini_provider.py +167 -0
- doctorcli-1.0.0/src/doctorcli/providers/groq_provider.py +11 -0
- doctorcli-1.0.0/src/doctorcli/providers/lmstudio_provider.py +11 -0
- doctorcli-1.0.0/src/doctorcli/providers/ollama_provider.py +72 -0
- doctorcli-1.0.0/src/doctorcli/providers/openai_compatible.py +206 -0
- doctorcli-1.0.0/src/doctorcli/providers/openai_provider.py +11 -0
- doctorcli-1.0.0/src/doctorcli/providers/registry.py +28 -0
- doctorcli-1.0.0/src/doctorcli/runtime.py +61 -0
- doctorcli-1.0.0/src/doctorcli/services/__init__.py +1 -0
- doctorcli-1.0.0/src/doctorcli/services/chat_service.py +209 -0
- doctorcli-1.0.0/src/doctorcli/services/memory_service.py +25 -0
- doctorcli-1.0.0/src/doctorcli/services/scope_guard.py +14 -0
- doctorcli-1.0.0/src/doctorcli/services/session_service.py +64 -0
- doctorcli-1.0.0/src/doctorcli/storage/__init__.py +1 -0
- doctorcli-1.0.0/src/doctorcli/storage/filesystem.py +66 -0
- doctorcli-1.0.0/src/doctorcli/storage/session_store.py +62 -0
- doctorcli-1.0.0/src/doctorcli/storage/settings_store.py +62 -0
- doctorcli-1.0.0/src/doctorcli/tool_profiles.py +42 -0
- doctorcli-1.0.0/src/doctorcli/tools/__init__.py +1 -0
- doctorcli-1.0.0/src/doctorcli/tools/base.py +29 -0
- doctorcli-1.0.0/src/doctorcli/tools/registry.py +20 -0
- doctorcli-1.0.0/src/doctorcli/tools/tavily_tool.py +70 -0
- doctorcli-1.0.0/src/doctorcli/tools/wikipedia_tool.py +77 -0
- doctorcli-1.0.0/src/doctorcli/ui/__init__.py +1 -0
- doctorcli-1.0.0/src/doctorcli/ui/console.py +22 -0
- doctorcli-1.0.0/src/doctorcli/ui/menus.py +154 -0
- doctorcli-1.0.0/src/doctorcli.egg-info/PKG-INFO +159 -0
- doctorcli-1.0.0/src/doctorcli.egg-info/SOURCES.txt +50 -0
- doctorcli-1.0.0/src/doctorcli.egg-info/dependency_links.txt +1 -0
- doctorcli-1.0.0/src/doctorcli.egg-info/entry_points.txt +2 -0
- doctorcli-1.0.0/src/doctorcli.egg-info/requires.txt +10 -0
- doctorcli-1.0.0/src/doctorcli.egg-info/top_level.txt +1 -0
doctorcli-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 AIMLDev726
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
doctorcli-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: doctorcli
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Specialist-first medical AI CLI with persistent sessions, markdown streaming, optional tools, and multi-provider model support.
|
|
5
|
+
Author: AIMLDev726
|
|
6
|
+
Maintainer: AIMLDev726
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Project-URL: Homepage, https://github.com/AIMLDev726/doctorcli
|
|
9
|
+
Project-URL: Repository, https://github.com/AIMLDev726/doctorcli
|
|
10
|
+
Project-URL: Issues, https://github.com/AIMLDev726/doctorcli/issues
|
|
11
|
+
Keywords: ai,cli,doctor,healthcare,llm,medical,rich,terminal
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
21
|
+
Classifier: Topic :: Software Development :: User Interfaces
|
|
22
|
+
Classifier: Topic :: Terminals
|
|
23
|
+
Requires-Python: >=3.11
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: httpx<1.0.0,>=0.27.0
|
|
27
|
+
Requires-Dist: platformdirs<5.0.0,>=4.2.0
|
|
28
|
+
Requires-Dist: pydantic<3.0.0,>=2.8.0
|
|
29
|
+
Requires-Dist: rich<14.0.0,>=13.7.0
|
|
30
|
+
Requires-Dist: typer<1.0.0,>=0.12.3
|
|
31
|
+
Provides-Extra: dev
|
|
32
|
+
Requires-Dist: build<2.0.0,>=1.2.0; extra == "dev"
|
|
33
|
+
Requires-Dist: pytest<9.0.0,>=8.2.0; extra == "dev"
|
|
34
|
+
Requires-Dist: twine<7.0.0,>=6.0.0; extra == "dev"
|
|
35
|
+
Dynamic: license-file
|
|
36
|
+
|
|
37
|
+
# doctorcli
|
|
38
|
+
|
|
39
|
+
[GitHub Repository](https://github.com/AIMLDev726/doctorcli)
|
|
40
|
+
|
|
41
|
+
`doctorcli` is a specialist-first medical AI CLI for structured conversations, persistent sessions, optional live tools, and multi-provider model support.
|
|
42
|
+
|
|
43
|
+
## Why use doctorcli
|
|
44
|
+
|
|
45
|
+
`doctorcli` is built for people who want a focused terminal experience instead of a generic chat window. It gives you specialist personas, saved sessions, provider and model control, and a clean markdown-rendered interface for medical Q&A workflows.
|
|
46
|
+
|
|
47
|
+
## Highlights
|
|
48
|
+
|
|
49
|
+
- Specialist personas for multiple medical domains
|
|
50
|
+
- Rich terminal UI with streaming markdown responses
|
|
51
|
+
- Persistent sessions with memory across runs
|
|
52
|
+
- Live model discovery and default model selection per provider
|
|
53
|
+
- Optional session tools such as Wikipedia and Tavily web search
|
|
54
|
+
- Visible tool-call output with returned sources in chat
|
|
55
|
+
- Support for OpenAI, Gemini, Groq, Claude, Ollama, and LM Studio
|
|
56
|
+
|
|
57
|
+
## Installation
|
|
58
|
+
|
|
59
|
+
Install from PyPI:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
pip install doctorcli
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Install from source:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
pip install .
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Install in editable mode for development:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
pip install -e ".[dev]"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Quick start
|
|
78
|
+
|
|
79
|
+
Run the CLI:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
doctorcli
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Typical flow:
|
|
86
|
+
|
|
87
|
+
1. Open the app.
|
|
88
|
+
2. Choose a specialist.
|
|
89
|
+
3. Start a new session or continue an existing one.
|
|
90
|
+
4. Select a provider and model.
|
|
91
|
+
5. Optionally attach tools for that session.
|
|
92
|
+
6. Ask questions and continue the session later with memory preserved.
|
|
93
|
+
|
|
94
|
+
## Supported providers
|
|
95
|
+
|
|
96
|
+
Cloud providers:
|
|
97
|
+
|
|
98
|
+
- OpenAI
|
|
99
|
+
- Gemini
|
|
100
|
+
- Groq
|
|
101
|
+
- Claude
|
|
102
|
+
|
|
103
|
+
Local providers:
|
|
104
|
+
|
|
105
|
+
- Ollama
|
|
106
|
+
- LM Studio
|
|
107
|
+
|
|
108
|
+
## Supported tools
|
|
109
|
+
|
|
110
|
+
- Wikipedia: reference lookup for conditions, medications, symptoms, and background topics
|
|
111
|
+
- Tavily: live web search for current medical and factual context
|
|
112
|
+
|
|
113
|
+
When a model uses an attached tool, `doctorcli` shows the tool call, the returned summary, and the available sources directly in the chat transcript.
|
|
114
|
+
|
|
115
|
+
## Session features
|
|
116
|
+
|
|
117
|
+
- Create named sessions with a consultation reason
|
|
118
|
+
- Reopen past sessions with the original provider and model setup
|
|
119
|
+
- Keep a running transcript and memory through the session lifecycle
|
|
120
|
+
- Use `/memory`, `/session`, `/settings`, and `/exit` commands inside chat
|
|
121
|
+
|
|
122
|
+
## Local storage
|
|
123
|
+
|
|
124
|
+
`doctorcli` stores local state in your platform application directories.
|
|
125
|
+
|
|
126
|
+
- Settings: `doctorcli/settings.json`
|
|
127
|
+
- Sessions: `doctorcli/sessions/*.json`
|
|
128
|
+
- Cached provider model catalogs: stored with settings
|
|
129
|
+
|
|
130
|
+
## Development
|
|
131
|
+
|
|
132
|
+
Run tests:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
python -m pytest
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Build release artifacts:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
python -m build
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Validate artifacts before publishing:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
python -m twine check dist/*
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Contributing
|
|
151
|
+
|
|
152
|
+
Contributions, issues, and feature requests are welcome.
|
|
153
|
+
|
|
154
|
+
- Repository: [github.com/AIMLDev726/doctorcli](https://github.com/AIMLDev726/doctorcli)
|
|
155
|
+
- Issues: [github.com/AIMLDev726/doctorcli/issues](https://github.com/AIMLDev726/doctorcli/issues)
|
|
156
|
+
|
|
157
|
+
## License
|
|
158
|
+
|
|
159
|
+
MIT
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# doctorcli
|
|
2
|
+
|
|
3
|
+
[GitHub Repository](https://github.com/AIMLDev726/doctorcli)
|
|
4
|
+
|
|
5
|
+
`doctorcli` is a specialist-first medical AI CLI for structured conversations, persistent sessions, optional live tools, and multi-provider model support.
|
|
6
|
+
|
|
7
|
+
## Why use doctorcli
|
|
8
|
+
|
|
9
|
+
`doctorcli` is built for people who want a focused terminal experience instead of a generic chat window. It gives you specialist personas, saved sessions, provider and model control, and a clean markdown-rendered interface for medical Q&A workflows.
|
|
10
|
+
|
|
11
|
+
## Highlights
|
|
12
|
+
|
|
13
|
+
- Specialist personas for multiple medical domains
|
|
14
|
+
- Rich terminal UI with streaming markdown responses
|
|
15
|
+
- Persistent sessions with memory across runs
|
|
16
|
+
- Live model discovery and default model selection per provider
|
|
17
|
+
- Optional session tools such as Wikipedia and Tavily web search
|
|
18
|
+
- Visible tool-call output with returned sources in chat
|
|
19
|
+
- Support for OpenAI, Gemini, Groq, Claude, Ollama, and LM Studio
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
Install from PyPI:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install doctorcli
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Install from source:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pip install .
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Install in editable mode for development:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pip install -e ".[dev]"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Quick start
|
|
42
|
+
|
|
43
|
+
Run the CLI:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
doctorcli
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Typical flow:
|
|
50
|
+
|
|
51
|
+
1. Open the app.
|
|
52
|
+
2. Choose a specialist.
|
|
53
|
+
3. Start a new session or continue an existing one.
|
|
54
|
+
4. Select a provider and model.
|
|
55
|
+
5. Optionally attach tools for that session.
|
|
56
|
+
6. Ask questions and continue the session later with memory preserved.
|
|
57
|
+
|
|
58
|
+
## Supported providers
|
|
59
|
+
|
|
60
|
+
Cloud providers:
|
|
61
|
+
|
|
62
|
+
- OpenAI
|
|
63
|
+
- Gemini
|
|
64
|
+
- Groq
|
|
65
|
+
- Claude
|
|
66
|
+
|
|
67
|
+
Local providers:
|
|
68
|
+
|
|
69
|
+
- Ollama
|
|
70
|
+
- LM Studio
|
|
71
|
+
|
|
72
|
+
## Supported tools
|
|
73
|
+
|
|
74
|
+
- Wikipedia: reference lookup for conditions, medications, symptoms, and background topics
|
|
75
|
+
- Tavily: live web search for current medical and factual context
|
|
76
|
+
|
|
77
|
+
When a model uses an attached tool, `doctorcli` shows the tool call, the returned summary, and the available sources directly in the chat transcript.
|
|
78
|
+
|
|
79
|
+
## Session features
|
|
80
|
+
|
|
81
|
+
- Create named sessions with a consultation reason
|
|
82
|
+
- Reopen past sessions with the original provider and model setup
|
|
83
|
+
- Keep a running transcript and memory through the session lifecycle
|
|
84
|
+
- Use `/memory`, `/session`, `/settings`, and `/exit` commands inside chat
|
|
85
|
+
|
|
86
|
+
## Local storage
|
|
87
|
+
|
|
88
|
+
`doctorcli` stores local state in your platform application directories.
|
|
89
|
+
|
|
90
|
+
- Settings: `doctorcli/settings.json`
|
|
91
|
+
- Sessions: `doctorcli/sessions/*.json`
|
|
92
|
+
- Cached provider model catalogs: stored with settings
|
|
93
|
+
|
|
94
|
+
## Development
|
|
95
|
+
|
|
96
|
+
Run tests:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
python -m pytest
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Build release artifacts:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
python -m build
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Validate artifacts before publishing:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
python -m twine check dist/*
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Contributing
|
|
115
|
+
|
|
116
|
+
Contributions, issues, and feature requests are welcome.
|
|
117
|
+
|
|
118
|
+
- Repository: [github.com/AIMLDev726/doctorcli](https://github.com/AIMLDev726/doctorcli)
|
|
119
|
+
- Issues: [github.com/AIMLDev726/doctorcli/issues](https://github.com/AIMLDev726/doctorcli/issues)
|
|
120
|
+
|
|
121
|
+
## License
|
|
122
|
+
|
|
123
|
+
MIT
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=69", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "doctorcli"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "Specialist-first medical AI CLI with persistent sessions, markdown streaming, optional tools, and multi-provider model support."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [{ name = "AIMLDev726" }]
|
|
14
|
+
maintainers = [{ name = "AIMLDev726" }]
|
|
15
|
+
keywords = ["ai", "cli", "doctor", "healthcare", "llm", "medical", "rich", "terminal"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 5 - Production/Stable",
|
|
18
|
+
"Environment :: Console",
|
|
19
|
+
"Intended Audience :: Developers",
|
|
20
|
+
"Intended Audience :: End Users/Desktop",
|
|
21
|
+
"Operating System :: OS Independent",
|
|
22
|
+
"Programming Language :: Python :: 3",
|
|
23
|
+
"Programming Language :: Python :: 3.11",
|
|
24
|
+
"Programming Language :: Python :: 3.12",
|
|
25
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
26
|
+
"Topic :: Software Development :: User Interfaces",
|
|
27
|
+
"Topic :: Terminals",
|
|
28
|
+
]
|
|
29
|
+
dependencies = [
|
|
30
|
+
"httpx>=0.27.0,<1.0.0",
|
|
31
|
+
"platformdirs>=4.2.0,<5.0.0",
|
|
32
|
+
"pydantic>=2.8.0,<3.0.0",
|
|
33
|
+
"rich>=13.7.0,<14.0.0",
|
|
34
|
+
"typer>=0.12.3,<1.0.0",
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
[project.optional-dependencies]
|
|
38
|
+
dev = [
|
|
39
|
+
"build>=1.2.0,<2.0.0",
|
|
40
|
+
"pytest>=8.2.0,<9.0.0",
|
|
41
|
+
"twine>=6.0.0,<7.0.0",
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
[project.urls]
|
|
45
|
+
Homepage = "https://github.com/AIMLDev726/doctorcli"
|
|
46
|
+
Repository = "https://github.com/AIMLDev726/doctorcli"
|
|
47
|
+
Issues = "https://github.com/AIMLDev726/doctorcli/issues"
|
|
48
|
+
|
|
49
|
+
[project.scripts]
|
|
50
|
+
doctorcli = "doctorcli.cli:main"
|
|
51
|
+
|
|
52
|
+
[tool.setuptools]
|
|
53
|
+
package-dir = { "" = "src" }
|
|
54
|
+
|
|
55
|
+
[tool.setuptools.packages.find]
|
|
56
|
+
where = ["src"]
|
|
57
|
+
|
|
58
|
+
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from doctorcli.domain.models import AgentProfile
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def _health_scope_suffix() -> str:
|
|
7
|
+
return (
|
|
8
|
+
" Limit yourself to health, symptoms, medications, labs, prevention, nutrition, "
|
|
9
|
+
"mental health, fitness recovery, and care-navigation questions. If a prompt is "
|
|
10
|
+
"clearly non-medical or general trivia, refuse briefly and redirect the user back "
|
|
11
|
+
"to a health-related question."
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
AGENTS: list[AgentProfile] = [
|
|
16
|
+
AgentProfile(
|
|
17
|
+
id="general-medicine",
|
|
18
|
+
name="General Medicine Consultant",
|
|
19
|
+
specialty="Primary care, triage, symptom framing",
|
|
20
|
+
summary="Broad first-line assessment, symptom organization, and escalation guidance.",
|
|
21
|
+
communication_style="Structured, concise, clinically clear, escalation-aware.",
|
|
22
|
+
system_prompt=(
|
|
23
|
+
"You are a general medicine AI consultant. Be specific, professional, and "
|
|
24
|
+
"clear. Ask focused follow-up questions when needed. Organize responses "
|
|
25
|
+
"under concise headings when helpful. Do not be generic. Distinguish "
|
|
26
|
+
"between urgent red flags, likely explanations, at-home care, and when "
|
|
27
|
+
"to seek in-person care. Never claim to diagnose with certainty."
|
|
28
|
+
+ _health_scope_suffix()
|
|
29
|
+
),
|
|
30
|
+
),
|
|
31
|
+
AgentProfile(
|
|
32
|
+
id="cardiology",
|
|
33
|
+
name="Cardiology Specialist",
|
|
34
|
+
specialty="Heart symptoms, blood pressure, cardiovascular risk",
|
|
35
|
+
summary="Focused cardiovascular interpretation with clear risk stratification.",
|
|
36
|
+
communication_style="Risk-first, evidence-oriented, direct.",
|
|
37
|
+
system_prompt=(
|
|
38
|
+
"You are a cardiology-focused AI consultant. Respond with precise "
|
|
39
|
+
"cardiovascular reasoning, identify red-flag symptoms, and clearly separate "
|
|
40
|
+
"emergency concerns from routine issues. Be professional, helpful, and "
|
|
41
|
+
"specific. Avoid generic reassurance."
|
|
42
|
+
+ _health_scope_suffix()
|
|
43
|
+
),
|
|
44
|
+
),
|
|
45
|
+
AgentProfile(
|
|
46
|
+
id="dermatology",
|
|
47
|
+
name="Dermatology Specialist",
|
|
48
|
+
specialty="Rashes, lesions, skin irritation, skincare reactions",
|
|
49
|
+
summary="Pattern-based skin guidance with differential framing and care escalation.",
|
|
50
|
+
communication_style="Visual-pattern aware, practical, cautious.",
|
|
51
|
+
system_prompt=(
|
|
52
|
+
"You are a dermatology-focused AI consultant. Ask targeted questions about "
|
|
53
|
+
"distribution, duration, triggers, texture, pain, itch, and exposures. "
|
|
54
|
+
"Provide clear differentials, home-care guidance, and escalation criteria. "
|
|
55
|
+
"Be specific and concise."
|
|
56
|
+
+ _health_scope_suffix()
|
|
57
|
+
),
|
|
58
|
+
),
|
|
59
|
+
AgentProfile(
|
|
60
|
+
id="endocrinology",
|
|
61
|
+
name="Endocrinology Specialist",
|
|
62
|
+
specialty="Diabetes, thyroid, hormones, metabolic symptoms",
|
|
63
|
+
summary="Hormonal and metabolic pattern review with monitoring guidance.",
|
|
64
|
+
communication_style="Numbers-aware, monitoring-oriented, methodical.",
|
|
65
|
+
system_prompt=(
|
|
66
|
+
"You are an endocrinology-focused AI consultant. Prioritize trends, lab "
|
|
67
|
+
"context, medication effects, metabolic symptoms, and monitoring plans. "
|
|
68
|
+
"Be exact and organized. State when physician review or urgent care is needed."
|
|
69
|
+
+ _health_scope_suffix()
|
|
70
|
+
),
|
|
71
|
+
),
|
|
72
|
+
AgentProfile(
|
|
73
|
+
id="gastroenterology",
|
|
74
|
+
name="Gastroenterology Specialist",
|
|
75
|
+
specialty="Digestive symptoms, reflux, bowel changes, abdominal pain",
|
|
76
|
+
summary="Digestive-system focused interpretation with severity sorting.",
|
|
77
|
+
communication_style="Symptom-pattern focused, practical, escalation-conscious.",
|
|
78
|
+
system_prompt=(
|
|
79
|
+
"You are a gastroenterology-focused AI consultant. Ask concise follow-up "
|
|
80
|
+
"questions about timing, stool changes, diet, fever, bleeding, weight loss, "
|
|
81
|
+
"and medication history. Be direct, organized, and clinically careful."
|
|
82
|
+
+ _health_scope_suffix()
|
|
83
|
+
),
|
|
84
|
+
),
|
|
85
|
+
AgentProfile(
|
|
86
|
+
id="orthopedics",
|
|
87
|
+
name="Orthopedics Specialist",
|
|
88
|
+
specialty="Joint pain, injuries, mobility, sports strain",
|
|
89
|
+
summary="Musculoskeletal evaluation with self-care and escalation guidance.",
|
|
90
|
+
communication_style="Functional, anatomy-oriented, practical.",
|
|
91
|
+
system_prompt=(
|
|
92
|
+
"You are an orthopedics-focused AI consultant. Structure responses around "
|
|
93
|
+
"mechanism of injury, pain location, swelling, instability, function limits, "
|
|
94
|
+
"and red flags. Be practical and specific, not generic."
|
|
95
|
+
+ _health_scope_suffix()
|
|
96
|
+
),
|
|
97
|
+
),
|
|
98
|
+
AgentProfile(
|
|
99
|
+
id="pediatrics",
|
|
100
|
+
name="Pediatrics Specialist",
|
|
101
|
+
specialty="Infants, children, developmental and common pediatric concerns",
|
|
102
|
+
summary="Age-aware pediatric support with strong safety escalation.",
|
|
103
|
+
communication_style="Age-specific, safety-first, calm and clear.",
|
|
104
|
+
system_prompt=(
|
|
105
|
+
"You are a pediatrics-focused AI consultant. Tailor guidance to the child's "
|
|
106
|
+
"age, weight, feeding, hydration, activity, fever pattern, and breathing "
|
|
107
|
+
"status. Highlight urgent warning signs clearly. Keep communication precise "
|
|
108
|
+
"and parent-friendly without being generic."
|
|
109
|
+
+ _health_scope_suffix()
|
|
110
|
+
),
|
|
111
|
+
),
|
|
112
|
+
AgentProfile(
|
|
113
|
+
id="womens-health",
|
|
114
|
+
name="Women's Health Specialist",
|
|
115
|
+
specialty="Gynecologic symptoms, menstrual concerns, hormonal issues",
|
|
116
|
+
summary="Focused women's health guidance with red-flag triage.",
|
|
117
|
+
communication_style="Respectful, clinically structured, clear.",
|
|
118
|
+
system_prompt=(
|
|
119
|
+
"You are a women's-health-focused AI consultant. Ask targeted questions "
|
|
120
|
+
"about cycle timing, discharge, bleeding, pain, pregnancy possibility, "
|
|
121
|
+
"contraception, and associated symptoms. Be specific, clear, and careful "
|
|
122
|
+
"about urgent escalation."
|
|
123
|
+
+ _health_scope_suffix()
|
|
124
|
+
),
|
|
125
|
+
),
|
|
126
|
+
]
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def get_agent(agent_id: str) -> AgentProfile:
|
|
130
|
+
for agent in AGENTS:
|
|
131
|
+
if agent.id == agent_id:
|
|
132
|
+
return agent
|
|
133
|
+
raise KeyError(f"Unknown agent id: {agent_id}")
|