smxadk 0.1.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.
- smxadk-0.1.0/PKG-INFO +325 -0
- smxadk-0.1.0/README.md +313 -0
- smxadk-0.1.0/pyproject.toml +28 -0
- smxadk-0.1.0/setup.cfg +4 -0
- smxadk-0.1.0/smxadk/__init__.py +9 -0
- smxadk-0.1.0/smxadk/cli.py +93 -0
- smxadk-0.1.0/smxadk/client.py +191 -0
- smxadk-0.1.0/smxadk/deployment.py +134 -0
- smxadk-0.1.0/smxadk/schemas.py +19 -0
- smxadk-0.1.0/smxadk/templates.py +44 -0
- smxadk-0.1.0/smxadk.egg-info/PKG-INFO +325 -0
- smxadk-0.1.0/smxadk.egg-info/SOURCES.txt +14 -0
- smxadk-0.1.0/smxadk.egg-info/dependency_links.txt +1 -0
- smxadk-0.1.0/smxadk.egg-info/entry_points.txt +2 -0
- smxadk-0.1.0/smxadk.egg-info/requires.txt +3 -0
- smxadk-0.1.0/smxadk.egg-info/top_level.txt +1 -0
smxadk-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: smxadk
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: SyntaxMatrix Agent Development Kit for calling deployed SyntaxMatrix Agent Services.
|
|
5
|
+
Author: SyntaxMatrix
|
|
6
|
+
Project-URL: Knowledgebase, https://syntaxmatrix.com/smxadk
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
Requires-Dist: httpx>=0.28.1
|
|
10
|
+
Requires-Dist: pydantic>=2.10.0
|
|
11
|
+
Requires-Dist: PyYAML>=6.0.2
|
|
12
|
+
|
|
13
|
+
# smxADK
|
|
14
|
+
|
|
15
|
+
**smxADK** stands for **SyntaxMatrix Agent Development Kit**.
|
|
16
|
+
|
|
17
|
+
It is a lightweight Python SDK for calling a deployed SyntaxMatrix Agent Service from any Python project.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
For local development:
|
|
24
|
+
|
|
25
|
+
```powershell
|
|
26
|
+
pip install -e .
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Basic Usage
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
from smxadk import SMXAgentClient
|
|
35
|
+
|
|
36
|
+
client = SMXAgentClient(
|
|
37
|
+
base_url="https://your-agent-service-url"
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
response = client.chat(
|
|
41
|
+
message="Explain RAG in two short sentences.",
|
|
42
|
+
mode="expert",
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
print(response.answer)
|
|
46
|
+
print(response.usage.total_tokens)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Self-Hosting Model
|
|
55
|
+
|
|
56
|
+
smxADK is designed for **self-hosted SyntaxMatrix deployments**.
|
|
57
|
+
|
|
58
|
+
The client organisation owns and operates its own backend infrastructure:
|
|
59
|
+
|
|
60
|
+
```text
|
|
61
|
+
Client Application
|
|
62
|
+
↓
|
|
63
|
+
smxADK
|
|
64
|
+
↓
|
|
65
|
+
Client-owned Agent Service
|
|
66
|
+
↓
|
|
67
|
+
Client-owned LiteLLM Proxy
|
|
68
|
+
↓
|
|
69
|
+
Client-owned Ollama / vLLM backends
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
This means:
|
|
73
|
+
|
|
74
|
+
- the client owns the backend URLs;
|
|
75
|
+
- the client pays for their own GPUs, CPUs, storage, and networking;
|
|
76
|
+
- the client controls their own data boundary;
|
|
77
|
+
- SyntaxMatrix provides the SDK, deployment tooling, templates, and framework.
|
|
78
|
+
|
|
79
|
+
smxADK should not be hardcoded to use SyntaxMatrix-owned infrastructure.
|
|
80
|
+
The caller must provide the deployed Agent Service URL:
|
|
81
|
+
|
|
82
|
+
```python
|
|
83
|
+
from smxadk import SMXAgentClient
|
|
84
|
+
|
|
85
|
+
client = SMXAgentClient(
|
|
86
|
+
base_url="https://client-owned-agent-service-url"
|
|
87
|
+
)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Deployment Configuration
|
|
93
|
+
|
|
94
|
+
Client organisations define their available model routes in:
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
smx_deployment.yaml
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Example:
|
|
101
|
+
|
|
102
|
+
```yaml
|
|
103
|
+
agent_service:
|
|
104
|
+
supported_modes:
|
|
105
|
+
- light
|
|
106
|
+
- medium
|
|
107
|
+
- heavy
|
|
108
|
+
- expert
|
|
109
|
+
- expert-heavy
|
|
110
|
+
|
|
111
|
+
models:
|
|
112
|
+
light:
|
|
113
|
+
provider: ollama
|
|
114
|
+
model: your-light-model-name
|
|
115
|
+
api_base: https://client-light-ollama-service-url
|
|
116
|
+
|
|
117
|
+
medium:
|
|
118
|
+
provider: ollama
|
|
119
|
+
model: your-medium-model-name
|
|
120
|
+
api_base: https://client-medium-ollama-service-url
|
|
121
|
+
|
|
122
|
+
heavy:
|
|
123
|
+
provider: ollama
|
|
124
|
+
model: your-heavy-model-name
|
|
125
|
+
api_base: https://client-heavy-ollama-service-url
|
|
126
|
+
|
|
127
|
+
expert:
|
|
128
|
+
provider: openai_compatible
|
|
129
|
+
model: your-expert-model-name
|
|
130
|
+
api_base: https://client-expert-vllm-service-url/v1
|
|
131
|
+
|
|
132
|
+
expert-heavy:
|
|
133
|
+
provider: openai_compatible
|
|
134
|
+
model: your-expert-heavy-model-name
|
|
135
|
+
api_base: https://client-expert-heavy-vllm-service-url/v1
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
model: your-light-model-name
|
|
140
|
+
model: your-medium-model-name
|
|
141
|
+
model: your-expert-model-name
|
|
142
|
+
|
|
143
|
+
The client does not need to deploy every possible route.
|
|
144
|
+
They only declare the routes they actually have.
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Generating Deployment Files
|
|
149
|
+
|
|
150
|
+
Run:
|
|
151
|
+
|
|
152
|
+
```powershell
|
|
153
|
+
smxadk generate
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
This generates:
|
|
157
|
+
|
|
158
|
+
```text
|
|
159
|
+
../llm-proxy/config.yaml
|
|
160
|
+
../agent-service/supported_modes.txt
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
The generated LiteLLM config maps each route to the client-owned backend URL.
|
|
164
|
+
|
|
165
|
+
The generated `supported_modes.txt` tells the Agent Service which modes it should accept.
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Runtime Route Discovery
|
|
170
|
+
|
|
171
|
+
After deployment, applications can discover available routes:
|
|
172
|
+
|
|
173
|
+
```python
|
|
174
|
+
from smxadk import SMXAgentClient
|
|
175
|
+
|
|
176
|
+
client = SMXAgentClient(
|
|
177
|
+
base_url="https://client-owned-agent-service-url"
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
print(client.supported_modes())
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Example output:
|
|
184
|
+
|
|
185
|
+
```python
|
|
186
|
+
["light", "medium", "expert"]
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
If a caller requests a mode that is not supported, the Agent Service rejects it cleanly before calling LiteLLM.
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Separation of Responsibilities
|
|
194
|
+
|
|
195
|
+
```text
|
|
196
|
+
smx_deployment.yaml → client backend routes and model catalogue
|
|
197
|
+
LiteLLM Proxy → backend URL routing
|
|
198
|
+
Agent Service → request validation and orchestration
|
|
199
|
+
smxADK → client SDK for application developers
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
The ADK only talks to the Agent Service.
|
|
203
|
+
It does not need to know the individual model backend URLs.
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Health Check
|
|
208
|
+
|
|
209
|
+
```python
|
|
210
|
+
from smxadk import SMXAgentClient
|
|
211
|
+
|
|
212
|
+
client = SMXAgentClient(
|
|
213
|
+
base_url="https://your-agent-service-url"
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
health = client.health()
|
|
217
|
+
|
|
218
|
+
print(health.status)
|
|
219
|
+
print(health.supported_modes)
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Streaming Chat
|
|
225
|
+
|
|
226
|
+
```python
|
|
227
|
+
from smxadk import SMXAgentClient
|
|
228
|
+
|
|
229
|
+
client = SMXAgentClient(
|
|
230
|
+
base_url="https://your-agent-service-url"
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
for chunk in client.stream_chat(
|
|
234
|
+
message="Explain RAG in two short sentences.",
|
|
235
|
+
mode="expert",
|
|
236
|
+
):
|
|
237
|
+
print(chunk, end="", flush=True)
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## Supported Agent Service Endpoints
|
|
243
|
+
|
|
244
|
+
smxADK currently supports:
|
|
245
|
+
|
|
246
|
+
```text
|
|
247
|
+
GET /health
|
|
248
|
+
POST /chat
|
|
249
|
+
POST /chat/stream
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Explicit Model Routing
|
|
255
|
+
|
|
256
|
+
The caller must explicitly choose the model route.
|
|
257
|
+
|
|
258
|
+
Example:
|
|
259
|
+
|
|
260
|
+
```python
|
|
261
|
+
response = client.chat(
|
|
262
|
+
message="Write a short summary.",
|
|
263
|
+
mode="light",
|
|
264
|
+
)
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Available modes depend on the deployed Agent Service.
|
|
268
|
+
|
|
269
|
+
Current example modes:
|
|
270
|
+
|
|
271
|
+
```text
|
|
272
|
+
light
|
|
273
|
+
medium
|
|
274
|
+
heavy
|
|
275
|
+
expert
|
|
276
|
+
expert-heavy
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## Response Shape
|
|
282
|
+
|
|
283
|
+
`client.chat()` returns a `ChatResponse` object:
|
|
284
|
+
|
|
285
|
+
```python
|
|
286
|
+
response.answer
|
|
287
|
+
response.mode
|
|
288
|
+
response.usage.prompt_tokens
|
|
289
|
+
response.usage.completion_tokens
|
|
290
|
+
response.usage.total_tokens
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## Project Structure
|
|
296
|
+
|
|
297
|
+
```text
|
|
298
|
+
smx-adk/
|
|
299
|
+
├── pyproject.toml
|
|
300
|
+
├── README.md
|
|
301
|
+
└── smxadk/
|
|
302
|
+
├── __init__.py
|
|
303
|
+
├── client.py
|
|
304
|
+
└── schemas.py
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
## Design Goal
|
|
310
|
+
|
|
311
|
+
smxADK is designed to make deployed SyntaxMatrix Agent Services easy to plug into:
|
|
312
|
+
|
|
313
|
+
- FastAPI apps
|
|
314
|
+
- Dash apps
|
|
315
|
+
- Flask apps
|
|
316
|
+
- notebooks
|
|
317
|
+
- internal tools
|
|
318
|
+
- enterprise AI assistants
|
|
319
|
+
- SyntaxMatrix-based applications
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
## Licence
|
|
324
|
+
|
|
325
|
+
Proprietary / SyntaxMatrix.
|
smxadk-0.1.0/README.md
ADDED
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
# smxADK
|
|
2
|
+
|
|
3
|
+
**smxADK** stands for **SyntaxMatrix Agent Development Kit**.
|
|
4
|
+
|
|
5
|
+
It is a lightweight Python SDK for calling a deployed SyntaxMatrix Agent Service from any Python project.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
For local development:
|
|
12
|
+
|
|
13
|
+
```powershell
|
|
14
|
+
pip install -e .
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Basic Usage
|
|
20
|
+
|
|
21
|
+
```python
|
|
22
|
+
from smxadk import SMXAgentClient
|
|
23
|
+
|
|
24
|
+
client = SMXAgentClient(
|
|
25
|
+
base_url="https://your-agent-service-url"
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
response = client.chat(
|
|
29
|
+
message="Explain RAG in two short sentences.",
|
|
30
|
+
mode="expert",
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
print(response.answer)
|
|
34
|
+
print(response.usage.total_tokens)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Self-Hosting Model
|
|
43
|
+
|
|
44
|
+
smxADK is designed for **self-hosted SyntaxMatrix deployments**.
|
|
45
|
+
|
|
46
|
+
The client organisation owns and operates its own backend infrastructure:
|
|
47
|
+
|
|
48
|
+
```text
|
|
49
|
+
Client Application
|
|
50
|
+
↓
|
|
51
|
+
smxADK
|
|
52
|
+
↓
|
|
53
|
+
Client-owned Agent Service
|
|
54
|
+
↓
|
|
55
|
+
Client-owned LiteLLM Proxy
|
|
56
|
+
↓
|
|
57
|
+
Client-owned Ollama / vLLM backends
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
This means:
|
|
61
|
+
|
|
62
|
+
- the client owns the backend URLs;
|
|
63
|
+
- the client pays for their own GPUs, CPUs, storage, and networking;
|
|
64
|
+
- the client controls their own data boundary;
|
|
65
|
+
- SyntaxMatrix provides the SDK, deployment tooling, templates, and framework.
|
|
66
|
+
|
|
67
|
+
smxADK should not be hardcoded to use SyntaxMatrix-owned infrastructure.
|
|
68
|
+
The caller must provide the deployed Agent Service URL:
|
|
69
|
+
|
|
70
|
+
```python
|
|
71
|
+
from smxadk import SMXAgentClient
|
|
72
|
+
|
|
73
|
+
client = SMXAgentClient(
|
|
74
|
+
base_url="https://client-owned-agent-service-url"
|
|
75
|
+
)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Deployment Configuration
|
|
81
|
+
|
|
82
|
+
Client organisations define their available model routes in:
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
smx_deployment.yaml
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Example:
|
|
89
|
+
|
|
90
|
+
```yaml
|
|
91
|
+
agent_service:
|
|
92
|
+
supported_modes:
|
|
93
|
+
- light
|
|
94
|
+
- medium
|
|
95
|
+
- heavy
|
|
96
|
+
- expert
|
|
97
|
+
- expert-heavy
|
|
98
|
+
|
|
99
|
+
models:
|
|
100
|
+
light:
|
|
101
|
+
provider: ollama
|
|
102
|
+
model: your-light-model-name
|
|
103
|
+
api_base: https://client-light-ollama-service-url
|
|
104
|
+
|
|
105
|
+
medium:
|
|
106
|
+
provider: ollama
|
|
107
|
+
model: your-medium-model-name
|
|
108
|
+
api_base: https://client-medium-ollama-service-url
|
|
109
|
+
|
|
110
|
+
heavy:
|
|
111
|
+
provider: ollama
|
|
112
|
+
model: your-heavy-model-name
|
|
113
|
+
api_base: https://client-heavy-ollama-service-url
|
|
114
|
+
|
|
115
|
+
expert:
|
|
116
|
+
provider: openai_compatible
|
|
117
|
+
model: your-expert-model-name
|
|
118
|
+
api_base: https://client-expert-vllm-service-url/v1
|
|
119
|
+
|
|
120
|
+
expert-heavy:
|
|
121
|
+
provider: openai_compatible
|
|
122
|
+
model: your-expert-heavy-model-name
|
|
123
|
+
api_base: https://client-expert-heavy-vllm-service-url/v1
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
model: your-light-model-name
|
|
128
|
+
model: your-medium-model-name
|
|
129
|
+
model: your-expert-model-name
|
|
130
|
+
|
|
131
|
+
The client does not need to deploy every possible route.
|
|
132
|
+
They only declare the routes they actually have.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Generating Deployment Files
|
|
137
|
+
|
|
138
|
+
Run:
|
|
139
|
+
|
|
140
|
+
```powershell
|
|
141
|
+
smxadk generate
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
This generates:
|
|
145
|
+
|
|
146
|
+
```text
|
|
147
|
+
../llm-proxy/config.yaml
|
|
148
|
+
../agent-service/supported_modes.txt
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
The generated LiteLLM config maps each route to the client-owned backend URL.
|
|
152
|
+
|
|
153
|
+
The generated `supported_modes.txt` tells the Agent Service which modes it should accept.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Runtime Route Discovery
|
|
158
|
+
|
|
159
|
+
After deployment, applications can discover available routes:
|
|
160
|
+
|
|
161
|
+
```python
|
|
162
|
+
from smxadk import SMXAgentClient
|
|
163
|
+
|
|
164
|
+
client = SMXAgentClient(
|
|
165
|
+
base_url="https://client-owned-agent-service-url"
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
print(client.supported_modes())
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Example output:
|
|
172
|
+
|
|
173
|
+
```python
|
|
174
|
+
["light", "medium", "expert"]
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
If a caller requests a mode that is not supported, the Agent Service rejects it cleanly before calling LiteLLM.
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Separation of Responsibilities
|
|
182
|
+
|
|
183
|
+
```text
|
|
184
|
+
smx_deployment.yaml → client backend routes and model catalogue
|
|
185
|
+
LiteLLM Proxy → backend URL routing
|
|
186
|
+
Agent Service → request validation and orchestration
|
|
187
|
+
smxADK → client SDK for application developers
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
The ADK only talks to the Agent Service.
|
|
191
|
+
It does not need to know the individual model backend URLs.
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Health Check
|
|
196
|
+
|
|
197
|
+
```python
|
|
198
|
+
from smxadk import SMXAgentClient
|
|
199
|
+
|
|
200
|
+
client = SMXAgentClient(
|
|
201
|
+
base_url="https://your-agent-service-url"
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
health = client.health()
|
|
205
|
+
|
|
206
|
+
print(health.status)
|
|
207
|
+
print(health.supported_modes)
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## Streaming Chat
|
|
213
|
+
|
|
214
|
+
```python
|
|
215
|
+
from smxadk import SMXAgentClient
|
|
216
|
+
|
|
217
|
+
client = SMXAgentClient(
|
|
218
|
+
base_url="https://your-agent-service-url"
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
for chunk in client.stream_chat(
|
|
222
|
+
message="Explain RAG in two short sentences.",
|
|
223
|
+
mode="expert",
|
|
224
|
+
):
|
|
225
|
+
print(chunk, end="", flush=True)
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Supported Agent Service Endpoints
|
|
231
|
+
|
|
232
|
+
smxADK currently supports:
|
|
233
|
+
|
|
234
|
+
```text
|
|
235
|
+
GET /health
|
|
236
|
+
POST /chat
|
|
237
|
+
POST /chat/stream
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## Explicit Model Routing
|
|
243
|
+
|
|
244
|
+
The caller must explicitly choose the model route.
|
|
245
|
+
|
|
246
|
+
Example:
|
|
247
|
+
|
|
248
|
+
```python
|
|
249
|
+
response = client.chat(
|
|
250
|
+
message="Write a short summary.",
|
|
251
|
+
mode="light",
|
|
252
|
+
)
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
Available modes depend on the deployed Agent Service.
|
|
256
|
+
|
|
257
|
+
Current example modes:
|
|
258
|
+
|
|
259
|
+
```text
|
|
260
|
+
light
|
|
261
|
+
medium
|
|
262
|
+
heavy
|
|
263
|
+
expert
|
|
264
|
+
expert-heavy
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## Response Shape
|
|
270
|
+
|
|
271
|
+
`client.chat()` returns a `ChatResponse` object:
|
|
272
|
+
|
|
273
|
+
```python
|
|
274
|
+
response.answer
|
|
275
|
+
response.mode
|
|
276
|
+
response.usage.prompt_tokens
|
|
277
|
+
response.usage.completion_tokens
|
|
278
|
+
response.usage.total_tokens
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## Project Structure
|
|
284
|
+
|
|
285
|
+
```text
|
|
286
|
+
smx-adk/
|
|
287
|
+
├── pyproject.toml
|
|
288
|
+
├── README.md
|
|
289
|
+
└── smxadk/
|
|
290
|
+
├── __init__.py
|
|
291
|
+
├── client.py
|
|
292
|
+
└── schemas.py
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## Design Goal
|
|
298
|
+
|
|
299
|
+
smxADK is designed to make deployed SyntaxMatrix Agent Services easy to plug into:
|
|
300
|
+
|
|
301
|
+
- FastAPI apps
|
|
302
|
+
- Dash apps
|
|
303
|
+
- Flask apps
|
|
304
|
+
- notebooks
|
|
305
|
+
- internal tools
|
|
306
|
+
- enterprise AI assistants
|
|
307
|
+
- SyntaxMatrix-based applications
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## Licence
|
|
312
|
+
|
|
313
|
+
Proprietary / SyntaxMatrix.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=69", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "smxadk"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "SyntaxMatrix Agent Development Kit for calling deployed SyntaxMatrix Agent Services."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
authors = [
|
|
12
|
+
{ name = "SyntaxMatrix" }
|
|
13
|
+
]
|
|
14
|
+
dependencies = [
|
|
15
|
+
"httpx>=0.28.1",
|
|
16
|
+
"pydantic>=2.10.0",
|
|
17
|
+
"PyYAML>=6.0.2"
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[project.urls]
|
|
21
|
+
Knowledgebase = "https://syntaxmatrix.com/smxadk"
|
|
22
|
+
|
|
23
|
+
[tool.setuptools.packages.find]
|
|
24
|
+
where = ["."]
|
|
25
|
+
include = ["smxadk*"]
|
|
26
|
+
|
|
27
|
+
[project.scripts]
|
|
28
|
+
smxadk = "smxadk.cli:main"
|
smxadk-0.1.0/setup.cfg
ADDED