solana-agent 20.1.0__py3-none-any.whl → 20.1.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.
- solana_agent/interfaces/services/routing.py +1 -1
- {solana_agent-20.1.0.dist-info → solana_agent-20.1.2.dist-info}/METADATA +70 -9
- {solana_agent-20.1.0.dist-info → solana_agent-20.1.2.dist-info}/RECORD +5 -5
- {solana_agent-20.1.0.dist-info → solana_agent-20.1.2.dist-info}/LICENSE +0 -0
- {solana_agent-20.1.0.dist-info → solana_agent-20.1.2.dist-info}/WHEEL +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: solana-agent
|
3
|
-
Version: 20.1.
|
3
|
+
Version: 20.1.2
|
4
4
|
Summary: Agentic IQ
|
5
5
|
License: MIT
|
6
6
|
Keywords: ai,openai,ai agents,agi
|
@@ -56,7 +56,7 @@ Build your AI business in three lines of code!
|
|
56
56
|
* Seamless text and audio streaming with real-time multi-modal processing
|
57
57
|
* Persistent memory that preserves context across all agent interactions
|
58
58
|
* Streamlined message history for all agent interactions
|
59
|
-
* Intelligent query routing to agents with optimal domain expertise
|
59
|
+
* Intelligent query routing to agents with optimal domain expertise or your own custom routing
|
60
60
|
* Unified value system ensuring brand-aligned agent responses
|
61
61
|
* Powerful tool integration using standard Python packages and/or inline classes
|
62
62
|
* Assigned tools are utilized by agents automatically and effectively
|
@@ -77,13 +77,11 @@ You can install Solana Agent using pip:
|
|
77
77
|
|
78
78
|
## Usage
|
79
79
|
|
80
|
-
###
|
80
|
+
### Business Alignment Config - Optional
|
81
81
|
|
82
82
|
```python
|
83
|
-
from solana_agent import SolanaAgent
|
84
|
-
|
85
83
|
config = {
|
86
|
-
"business": {
|
84
|
+
"business": {
|
87
85
|
"mission": "To provide users with a one-stop shop for their queries.",
|
88
86
|
"values": {
|
89
87
|
"Friendliness": "Users must be treated fairly, openly, and with friendliness.",
|
@@ -94,14 +92,37 @@ config = {
|
|
94
92
|
],
|
95
93
|
"voice": "The voice of the brand is that of a research business."
|
96
94
|
},
|
97
|
-
|
95
|
+
}
|
96
|
+
```
|
97
|
+
|
98
|
+
### Conversational History Config - Optional
|
99
|
+
|
100
|
+
```python
|
101
|
+
config = {
|
102
|
+
"mongo": {
|
98
103
|
"connection_string": "mongodb://localhost:27017",
|
99
104
|
"database": "solana_agent"
|
100
105
|
},
|
101
|
-
|
106
|
+
}
|
107
|
+
```
|
108
|
+
|
109
|
+
### Conversational Memory Config - Optional
|
110
|
+
|
111
|
+
```python
|
112
|
+
config = {
|
113
|
+
"zep": {
|
102
114
|
"api_key": "your-zep-api-key",
|
103
115
|
"base_url": "your-zep-base-url", # not applicable if using Zep Cloud
|
104
116
|
},
|
117
|
+
}
|
118
|
+
```
|
119
|
+
|
120
|
+
### Text/Text Streaming
|
121
|
+
|
122
|
+
```python
|
123
|
+
from solana_agent import SolanaAgent
|
124
|
+
|
125
|
+
config = {
|
105
126
|
"openai": {
|
106
127
|
"api_key": "your-openai-api-key",
|
107
128
|
},
|
@@ -368,12 +389,52 @@ async for response in solana_agent.process("user123", "What are the latest AI de
|
|
368
389
|
print(response, end="")
|
369
390
|
```
|
370
391
|
|
392
|
+
### Custom Routing
|
393
|
+
|
394
|
+
```python
|
395
|
+
from solana_agent import SolanaAgent
|
396
|
+
from solana_agent.interfaces.services.routing import RoutingService as RoutingServiceInterface
|
397
|
+
|
398
|
+
config = {
|
399
|
+
"openai": {
|
400
|
+
"api_key": "your-openai-api-key",
|
401
|
+
},
|
402
|
+
"agents": [
|
403
|
+
{
|
404
|
+
"name": "research_specialist",
|
405
|
+
"instructions": "You are an expert researcher who synthesizes complex information clearly.",
|
406
|
+
"specialization": "Research and knowledge synthesis",
|
407
|
+
},
|
408
|
+
{
|
409
|
+
"name": "customer_support",
|
410
|
+
"instructions": "You provide friendly, helpful customer support responses.",
|
411
|
+
"specialization": "Customer inquiries",
|
412
|
+
}
|
413
|
+
],
|
414
|
+
}
|
415
|
+
|
416
|
+
class Router(RoutingServiceInterface)
|
417
|
+
def __init__(self):
|
418
|
+
# your router initialization - delete the following pass
|
419
|
+
pass
|
420
|
+
|
421
|
+
async def route_query(self, query: str) -> str:
|
422
|
+
# a simple example to route always to customer_support agent
|
423
|
+
return "customer_support"
|
424
|
+
|
425
|
+
router = Router()
|
426
|
+
|
427
|
+
solana_agent = SolanaAgent(config=config)
|
428
|
+
|
429
|
+
async for response in solana_agent.process("user123", "What are the latest AI developments?", router=router):
|
430
|
+
print(response, end="")
|
431
|
+
```
|
432
|
+
|
371
433
|
## Notes
|
372
434
|
* Solana Agent agents can only call one tool per response.
|
373
435
|
* Solana Agent agents choose the best tool for the job.
|
374
436
|
* Solana Agent tools do not use OpenAI function calling.
|
375
437
|
* Solana Agent tools are async functions.
|
376
|
-
* Solana Agent will use OpenAI for audio and Ollama and for text if both config vars are set
|
377
438
|
|
378
439
|
## Local Setup
|
379
440
|
|
@@ -17,7 +17,7 @@ solana_agent/interfaces/providers/llm.py,sha256=f58kDrvESBfIr2XoZJ-VVa8vL56qyuhk
|
|
17
17
|
solana_agent/interfaces/providers/memory.py,sha256=oNOH8WZXVW8assDigIWZAWiwkxbpDiKupxA2RB6tQvQ,1010
|
18
18
|
solana_agent/interfaces/services/agent.py,sha256=34luGrUF5FNXLhF6JXwbfOSuo_SbMOmLMywG310sMDw,2082
|
19
19
|
solana_agent/interfaces/services/query.py,sha256=m8Uc0uXT3apSOhX3N1QjLMPk1KdJhj7HDrJjWUpDPBc,1309
|
20
|
-
solana_agent/interfaces/services/routing.py,sha256=
|
20
|
+
solana_agent/interfaces/services/routing.py,sha256=UzJC-z-Q9puTWPFGEo2_CAhIxuxP5IRnze7S66NSrsI,397
|
21
21
|
solana_agent/plugins/__init__.py,sha256=coZdgJKq1ExOaj6qB810i3rEhbjdVlrkN76ozt_Ojgo,193
|
22
22
|
solana_agent/plugins/manager.py,sha256=Il49hXeqvu0b02pURNNp7mY8kp9_sqpi_vJIWBW5Hc0,5044
|
23
23
|
solana_agent/plugins/registry.py,sha256=5S0DlUQKogsg1zLiRUIGMHEmGYHtOovU-S-5W1Mwo1A,3639
|
@@ -29,7 +29,7 @@ solana_agent/services/__init__.py,sha256=ab_NXJmwYUCmCrCzuTlZ47bJZINW0Y0F5jfQ9Oo
|
|
29
29
|
solana_agent/services/agent.py,sha256=MdSPIC81JNuP2hfzXNGWOnRfe7OxwYHgDVZAphVCCo8,16450
|
30
30
|
solana_agent/services/query.py,sha256=QduAeiltFTwNDlAbC_emu544U4XGNioj-OauRGt9HSY,11070
|
31
31
|
solana_agent/services/routing.py,sha256=PMCSG5m3uLMaHMj3dxNvNfcFZaeaDi7kMr7AEBCzwDE,6499
|
32
|
-
solana_agent-20.1.
|
33
|
-
solana_agent-20.1.
|
34
|
-
solana_agent-20.1.
|
35
|
-
solana_agent-20.1.
|
32
|
+
solana_agent-20.1.2.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
|
33
|
+
solana_agent-20.1.2.dist-info/METADATA,sha256=y7oFOfQr9TJPAAHWslK14bhQkbtER9y4V1wMIaVvagY,13966
|
34
|
+
solana_agent-20.1.2.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
35
|
+
solana_agent-20.1.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|