solana-agent 27.0.0__tar.gz → 27.2.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.
- {solana_agent-27.0.0 → solana_agent-27.2.0}/PKG-INFO +34 -8
- {solana_agent-27.0.0 → solana_agent-27.2.0}/README.md +31 -5
- {solana_agent-27.0.0 → solana_agent-27.2.0}/pyproject.toml +3 -3
- solana_agent-27.0.0/solana_agent/adapters/llm_adapter.py → solana_agent-27.2.0/solana_agent/adapters/openai_adapter.py +21 -5
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/factories/agent_factory.py +69 -12
- {solana_agent-27.0.0 → solana_agent-27.2.0}/LICENSE +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/__init__.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/adapters/__init__.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/adapters/mongodb_adapter.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/client/__init__.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/client/solana_agent.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/domains/__init__.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/domains/agent.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/domains/routing.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/factories/__init__.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/interfaces/__init__.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/interfaces/client/client.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/interfaces/plugins/plugins.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/interfaces/providers/data_storage.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/interfaces/providers/llm.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/interfaces/providers/memory.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/interfaces/services/agent.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/interfaces/services/query.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/interfaces/services/routing.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/plugins/__init__.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/plugins/manager.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/plugins/registry.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/plugins/tools/__init__.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/plugins/tools/auto_tool.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/repositories/__init__.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/repositories/memory.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/services/__init__.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/services/agent.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/services/query.py +0 -0
- {solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/services/routing.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: solana-agent
|
3
|
-
Version: 27.
|
3
|
+
Version: 27.2.0
|
4
4
|
Summary: Agentic IQ
|
5
5
|
License: MIT
|
6
6
|
Keywords: ai,openai,ai agents,agi
|
@@ -15,10 +15,10 @@ Classifier: Programming Language :: Python :: 3.12
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.13
|
16
16
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
17
17
|
Requires-Dist: instructor (>=1.7.9,<2.0.0)
|
18
|
-
Requires-Dist: openai (>=1.
|
18
|
+
Requires-Dist: openai (>=1.74.0,<2.0.0)
|
19
19
|
Requires-Dist: pydantic (>=2.11.3,<3.0.0)
|
20
20
|
Requires-Dist: pymongo (>=4.12.0,<5.0.0)
|
21
|
-
Requires-Dist: zep-cloud (>=2.10.
|
21
|
+
Requires-Dist: zep-cloud (>=2.10.1,<3.0.0)
|
22
22
|
Project-URL: Documentation, https://docs.solana-agent.com
|
23
23
|
Project-URL: Repository, https://github.com/truemagic-coder/solana-agent
|
24
24
|
Description-Content-Type: text/markdown
|
@@ -76,16 +76,18 @@ Build your AI business in three lines of code!
|
|
76
76
|
### Tech
|
77
77
|
|
78
78
|
* [Python](https://python.org) - Programming Language
|
79
|
-
* [OpenAI](https://openai.com) - LLM
|
79
|
+
* [OpenAI](https://openai.com), [Google](https://ai.google.dev), [xAI](https://x.ai) - LLM Providers
|
80
80
|
* [MongoDB](https://mongodb.com) - Conversational History (optional)
|
81
81
|
* [Zep Cloud](https://getzep.com) - Conversational Memory (optional)
|
82
82
|
|
83
83
|
### LLMs
|
84
84
|
|
85
|
-
* [gpt-
|
86
|
-
* [
|
87
|
-
* [
|
88
|
-
|
85
|
+
* [gpt-4.1-mini](https://platform.openai.com/docs/models/gpt-4.1-mini) (agent)
|
86
|
+
* [gpt-4.1-nano](https://platform.openai.com/docs/models/gpt-4.1-nano) (router)
|
87
|
+
* [gemini-2.0-flash](https://ai.google.dev/gemini-api/docs/models#gemini-2.0-flash) (optional)
|
88
|
+
* [grok-3-mini-fast-beta](https://docs.x.ai/docs/models#models-and-pricing) (optional)
|
89
|
+
* [tts-1](https://platform.openai.com/docs/models/tts-1) (audio TTS)
|
90
|
+
* [gpt-4o-mini-transcribe](https://platform.openai.com/docs/models/gpt-4o-mini-transcribe) (audio transcription)
|
89
91
|
|
90
92
|
## Installation
|
91
93
|
|
@@ -301,6 +303,30 @@ config = {
|
|
301
303
|
}
|
302
304
|
```
|
303
305
|
|
306
|
+
### Gemini
|
307
|
+
|
308
|
+
This allows Gemini to replace OpenAI for agent and router.
|
309
|
+
|
310
|
+
```python
|
311
|
+
config = {
|
312
|
+
"gemini": {
|
313
|
+
"api_key": "your-gemini-api-key",
|
314
|
+
},
|
315
|
+
}
|
316
|
+
```
|
317
|
+
|
318
|
+
### Grok
|
319
|
+
|
320
|
+
This allows Grok to replace OpenAI (or Gemini) for agent.
|
321
|
+
|
322
|
+
```python
|
323
|
+
config = {
|
324
|
+
"grok": {
|
325
|
+
"api_key": "your-grok-api-key",
|
326
|
+
},
|
327
|
+
}
|
328
|
+
```
|
329
|
+
|
304
330
|
## Tools
|
305
331
|
|
306
332
|
Tools can be used from plugins like Solana Agent Kit (sakit) or via inline tools. Tools available via plugins integrate automatically with Solana Agent.
|
@@ -51,16 +51,18 @@ Build your AI business in three lines of code!
|
|
51
51
|
### Tech
|
52
52
|
|
53
53
|
* [Python](https://python.org) - Programming Language
|
54
|
-
* [OpenAI](https://openai.com) - LLM
|
54
|
+
* [OpenAI](https://openai.com), [Google](https://ai.google.dev), [xAI](https://x.ai) - LLM Providers
|
55
55
|
* [MongoDB](https://mongodb.com) - Conversational History (optional)
|
56
56
|
* [Zep Cloud](https://getzep.com) - Conversational Memory (optional)
|
57
57
|
|
58
58
|
### LLMs
|
59
59
|
|
60
|
-
* [gpt-
|
61
|
-
* [
|
62
|
-
* [
|
63
|
-
|
60
|
+
* [gpt-4.1-mini](https://platform.openai.com/docs/models/gpt-4.1-mini) (agent)
|
61
|
+
* [gpt-4.1-nano](https://platform.openai.com/docs/models/gpt-4.1-nano) (router)
|
62
|
+
* [gemini-2.0-flash](https://ai.google.dev/gemini-api/docs/models#gemini-2.0-flash) (optional)
|
63
|
+
* [grok-3-mini-fast-beta](https://docs.x.ai/docs/models#models-and-pricing) (optional)
|
64
|
+
* [tts-1](https://platform.openai.com/docs/models/tts-1) (audio TTS)
|
65
|
+
* [gpt-4o-mini-transcribe](https://platform.openai.com/docs/models/gpt-4o-mini-transcribe) (audio transcription)
|
64
66
|
|
65
67
|
## Installation
|
66
68
|
|
@@ -276,6 +278,30 @@ config = {
|
|
276
278
|
}
|
277
279
|
```
|
278
280
|
|
281
|
+
### Gemini
|
282
|
+
|
283
|
+
This allows Gemini to replace OpenAI for agent and router.
|
284
|
+
|
285
|
+
```python
|
286
|
+
config = {
|
287
|
+
"gemini": {
|
288
|
+
"api_key": "your-gemini-api-key",
|
289
|
+
},
|
290
|
+
}
|
291
|
+
```
|
292
|
+
|
293
|
+
### Grok
|
294
|
+
|
295
|
+
This allows Grok to replace OpenAI (or Gemini) for agent.
|
296
|
+
|
297
|
+
```python
|
298
|
+
config = {
|
299
|
+
"grok": {
|
300
|
+
"api_key": "your-grok-api-key",
|
301
|
+
},
|
302
|
+
}
|
303
|
+
```
|
304
|
+
|
279
305
|
## Tools
|
280
306
|
|
281
307
|
Tools can be used from plugins like Solana Agent Kit (sakit) or via inline tools. Tools available via plugins integrate automatically with Solana Agent.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "solana-agent"
|
3
|
-
version = "27.
|
3
|
+
version = "27.2.0"
|
4
4
|
description = "Agentic IQ"
|
5
5
|
authors = ["Bevan Hunt <bevan@bevanhunt.com>"]
|
6
6
|
license = "MIT"
|
@@ -23,10 +23,10 @@ python_paths = [".", "tests"]
|
|
23
23
|
|
24
24
|
[tool.poetry.dependencies]
|
25
25
|
python = ">=3.12,<4.0"
|
26
|
-
openai = "^1.
|
26
|
+
openai = "^1.74.0"
|
27
27
|
pydantic = "^2.11.3"
|
28
28
|
pymongo = "^4.12.0"
|
29
|
-
zep-cloud = "^2.10.
|
29
|
+
zep-cloud = "^2.10.1"
|
30
30
|
instructor = "^1.7.9"
|
31
31
|
|
32
32
|
[tool.poetry.group.dev.dependencies]
|
@@ -20,8 +20,8 @@ class OpenAIAdapter(LLMProvider):
|
|
20
20
|
|
21
21
|
def __init__(self, api_key: str):
|
22
22
|
self.client = AsyncOpenAI(api_key=api_key)
|
23
|
-
self.parse_model = "gpt-
|
24
|
-
self.text_model = "gpt-
|
23
|
+
self.parse_model = "gpt-4.1-nano"
|
24
|
+
self.text_model = "gpt-4.1-mini"
|
25
25
|
self.transcription_model = "gpt-4o-mini-transcribe"
|
26
26
|
self.tts_model = "tts-1"
|
27
27
|
|
@@ -170,7 +170,6 @@ class OpenAIAdapter(LLMProvider):
|
|
170
170
|
if model:
|
171
171
|
self.parse_model = model
|
172
172
|
|
173
|
-
# Create a patched client with TOOLS_STRICT mode
|
174
173
|
patched_client = instructor.from_openai(
|
175
174
|
client, mode=Mode.TOOLS_STRICT)
|
176
175
|
|
@@ -187,9 +186,17 @@ class OpenAIAdapter(LLMProvider):
|
|
187
186
|
f"Error with instructor parsing (TOOLS_STRICT mode): {e}")
|
188
187
|
|
189
188
|
try:
|
189
|
+
if api_key and base_url:
|
190
|
+
client = AsyncOpenAI(api_key=api_key, base_url=base_url)
|
191
|
+
else:
|
192
|
+
client = self.client
|
193
|
+
|
194
|
+
if model:
|
195
|
+
self.parse_model = model
|
196
|
+
|
190
197
|
# First fallback: Try regular JSON mode
|
191
198
|
patched_client = instructor.from_openai(
|
192
|
-
|
199
|
+
client, mode=Mode.JSON)
|
193
200
|
response = await patched_client.chat.completions.create(
|
194
201
|
model=self.parse_model,
|
195
202
|
messages=messages,
|
@@ -201,6 +208,15 @@ class OpenAIAdapter(LLMProvider):
|
|
201
208
|
print(f"JSON mode fallback also failed: {json_error}")
|
202
209
|
|
203
210
|
try:
|
211
|
+
if api_key and base_url:
|
212
|
+
client = AsyncOpenAI(
|
213
|
+
api_key=api_key, base_url=base_url)
|
214
|
+
else:
|
215
|
+
client = self.client
|
216
|
+
|
217
|
+
if model:
|
218
|
+
self.parse_model = model
|
219
|
+
|
204
220
|
# Final fallback: Manual extraction with a detailed prompt
|
205
221
|
fallback_system_prompt = f"""
|
206
222
|
{system_prompt}
|
@@ -212,7 +228,7 @@ class OpenAIAdapter(LLMProvider):
|
|
212
228
|
"""
|
213
229
|
|
214
230
|
# Regular completion without instructor
|
215
|
-
completion = await
|
231
|
+
completion = await client.chat.completions.create(
|
216
232
|
model=self.parse_model,
|
217
233
|
messages=[
|
218
234
|
{"role": "system", "content": fallback_system_prompt},
|
@@ -15,7 +15,7 @@ from solana_agent.services.routing import RoutingService
|
|
15
15
|
from solana_agent.repositories.memory import MemoryRepository
|
16
16
|
|
17
17
|
# Adapter imports
|
18
|
-
from solana_agent.adapters.
|
18
|
+
from solana_agent.adapters.openai_adapter import OpenAIAdapter
|
19
19
|
from solana_agent.adapters.mongodb_adapter import MongoDBAdapter
|
20
20
|
|
21
21
|
# Domain and plugin imports
|
@@ -86,18 +86,75 @@ class SolanaAgentFactory:
|
|
86
86
|
zep_api_key=config["zep"].get("api_key")
|
87
87
|
)
|
88
88
|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
89
|
+
if "gemini" in config and "api_key" in config["gemini"] and not "grok" in config:
|
90
|
+
# Create primary services
|
91
|
+
agent_service = AgentService(
|
92
|
+
llm_provider=llm_adapter,
|
93
|
+
business_mission=business_mission,
|
94
|
+
config=config,
|
95
|
+
api_key=config["gemini"]["api_key"],
|
96
|
+
base_url="https://generativelanguage.googleapis.com/v1beta/openai/",
|
97
|
+
model="gemini-2.0-flash",
|
98
|
+
)
|
95
99
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
100
|
+
# Create routing service
|
101
|
+
routing_service = RoutingService(
|
102
|
+
llm_provider=llm_adapter,
|
103
|
+
agent_service=agent_service,
|
104
|
+
api_key=config["gemini"]["api_key"],
|
105
|
+
base_url="https://generativelanguage.googleapis.com/v1beta/openai/",
|
106
|
+
model="gemini-2.0-flash",
|
107
|
+
)
|
108
|
+
|
109
|
+
elif "gemini" in config and "api_key" in config["gemini"] and "grok" in config and "api_key" in config["grok"]:
|
110
|
+
# Create primary services
|
111
|
+
agent_service = AgentService(
|
112
|
+
llm_provider=llm_adapter,
|
113
|
+
business_mission=business_mission,
|
114
|
+
config=config,
|
115
|
+
api_key=config["grok"]["api_key"],
|
116
|
+
base_url="https://api.x.ai/v1",
|
117
|
+
model="grok-3-mini-fast-beta",
|
118
|
+
)
|
119
|
+
# Create routing service
|
120
|
+
routing_service = RoutingService(
|
121
|
+
llm_provider=llm_adapter,
|
122
|
+
agent_service=agent_service,
|
123
|
+
api_key=config["gemini"]["api_key"],
|
124
|
+
base_url="https://generativelanguage.googleapis.com/v1beta/openai/",
|
125
|
+
model="gemini-2.0-flash",
|
126
|
+
)
|
127
|
+
|
128
|
+
elif "grok" in config and "api_key" in config["grok"] and not "gemini" in config:
|
129
|
+
# Create primary services
|
130
|
+
agent_service = AgentService(
|
131
|
+
llm_provider=llm_adapter,
|
132
|
+
business_mission=business_mission,
|
133
|
+
config=config,
|
134
|
+
api_key=config["grok"]["api_key"],
|
135
|
+
base_url="https://api.x.ai/v1",
|
136
|
+
model="grok-3-mini-fast-beta",
|
137
|
+
)
|
138
|
+
|
139
|
+
# Create routing service
|
140
|
+
routing_service = RoutingService(
|
141
|
+
llm_provider=llm_adapter,
|
142
|
+
agent_service=agent_service,
|
143
|
+
)
|
144
|
+
|
145
|
+
else:
|
146
|
+
# Create primary services
|
147
|
+
agent_service = AgentService(
|
148
|
+
llm_provider=llm_adapter,
|
149
|
+
business_mission=business_mission,
|
150
|
+
config=config,
|
151
|
+
)
|
152
|
+
|
153
|
+
# Create routing service
|
154
|
+
routing_service = RoutingService(
|
155
|
+
llm_provider=llm_adapter,
|
156
|
+
agent_service=agent_service,
|
157
|
+
)
|
101
158
|
|
102
159
|
# Debug the agent service tool registry
|
103
160
|
print(
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{solana_agent-27.0.0 → solana_agent-27.2.0}/solana_agent/interfaces/providers/data_storage.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|