solana-agent 27.0.0__tar.gz → 27.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.
Files changed (35) hide show
  1. {solana_agent-27.0.0 → solana_agent-27.1.0}/PKG-INFO +60 -3
  2. {solana_agent-27.0.0 → solana_agent-27.1.0}/README.md +58 -1
  3. {solana_agent-27.0.0 → solana_agent-27.1.0}/pyproject.toml +2 -2
  4. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/adapters/llm_adapter.py +19 -3
  5. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/factories/agent_factory.py +68 -11
  6. {solana_agent-27.0.0 → solana_agent-27.1.0}/LICENSE +0 -0
  7. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/__init__.py +0 -0
  8. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/adapters/__init__.py +0 -0
  9. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/adapters/mongodb_adapter.py +0 -0
  10. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/client/__init__.py +0 -0
  11. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/client/solana_agent.py +0 -0
  12. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/domains/__init__.py +0 -0
  13. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/domains/agent.py +0 -0
  14. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/domains/routing.py +0 -0
  15. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/factories/__init__.py +0 -0
  16. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/interfaces/__init__.py +0 -0
  17. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/interfaces/client/client.py +0 -0
  18. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/interfaces/plugins/plugins.py +0 -0
  19. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/interfaces/providers/data_storage.py +0 -0
  20. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/interfaces/providers/llm.py +0 -0
  21. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/interfaces/providers/memory.py +0 -0
  22. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/interfaces/services/agent.py +0 -0
  23. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/interfaces/services/query.py +0 -0
  24. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/interfaces/services/routing.py +0 -0
  25. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/plugins/__init__.py +0 -0
  26. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/plugins/manager.py +0 -0
  27. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/plugins/registry.py +0 -0
  28. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/plugins/tools/__init__.py +0 -0
  29. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/plugins/tools/auto_tool.py +0 -0
  30. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/repositories/__init__.py +0 -0
  31. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/repositories/memory.py +0 -0
  32. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/services/__init__.py +0 -0
  33. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/services/agent.py +0 -0
  34. {solana_agent-27.0.0 → solana_agent-27.1.0}/solana_agent/services/query.py +0 -0
  35. {solana_agent-27.0.0 → solana_agent-27.1.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.0.0
3
+ Version: 27.1.0
4
4
  Summary: Agentic IQ
5
5
  License: MIT
6
6
  Keywords: ai,openai,ai agents,agi
@@ -18,7 +18,7 @@ Requires-Dist: instructor (>=1.7.9,<2.0.0)
18
18
  Requires-Dist: openai (>=1.72.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.0,<3.0.0)
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,25 @@ 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 Provider
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
85
  * [gpt-4o-mini](https://platform.openai.com/docs/models/gpt-4o-mini)
86
+ * [gemini-2.0-flash](https://ai.google.dev/gemini-api/docs/models#gemini-2.0-flash)
87
+ * [grok-3-mini-fast-beta](https://docs.x.ai/docs/models#models-and-pricing)
86
88
  * [tts-1](https://platform.openai.com/docs/models/tts-1)
87
89
  * [gpt-4o-mini-transcribe](https://platform.openai.com/docs/models/gpt-4o-mini-transcribe)
88
90
 
91
+ It is recommended to use all three LLM providers as it is the best setup.
92
+
93
+ Gemini makes the routing about 2x faster.
94
+
95
+ Grok is a fast reasoning model and makes the answers and conversation much better.
96
+
97
+ OpenAI is required while Gemini and Grok are optional.
89
98
 
90
99
  ## Installation
91
100
 
@@ -146,6 +155,12 @@ Keep this in mind while designing your agentic systems using Solana Agent.
146
155
  from solana_agent import SolanaAgent
147
156
 
148
157
  config = {
158
+ "grok": {
159
+ "api_key": "your-grok-api-key",
160
+ },
161
+ "gemini": {
162
+ "api_key": "your-gemini-api-key",
163
+ },
149
164
  "openai": {
150
165
  "api_key": "your-openai-api-key",
151
166
  },
@@ -175,6 +190,12 @@ async for response in solana_agent.process("user123", "What are the latest AI de
175
190
  from solana_agent import SolanaAgent
176
191
 
177
192
  config = {
193
+ "grok": {
194
+ "api_key": "your-grok-api-key",
195
+ },
196
+ "gemini": {
197
+ "api_key": "your-gemini-api-key",
198
+ },
178
199
  "openai": {
179
200
  "api_key": "your-openai-api-key",
180
201
  },
@@ -206,6 +227,12 @@ async for response in solana_agent.process("user123", audio_content, output_form
206
227
  from solana_agent import SolanaAgent
207
228
 
208
229
  config = {
230
+ "grok": {
231
+ "api_key": "your-grok-api-key",
232
+ },
233
+ "gemini": {
234
+ "api_key": "your-gemini-api-key",
235
+ },
209
236
  "openai": {
210
237
  "api_key": "your-openai-api-key",
211
238
  },
@@ -235,6 +262,12 @@ async for response in solana_agent.process("user123", "What is the latest news o
235
262
  from solana_agent import SolanaAgent
236
263
 
237
264
  config = {
265
+ "grok": {
266
+ "api_key": "your-grok-api-key",
267
+ },
268
+ "gemini": {
269
+ "api_key": "your-gemini-api-key",
270
+ },
238
271
  "openai": {
239
272
  "api_key": "your-openai-api-key",
240
273
  },
@@ -318,6 +351,12 @@ Tools can be used from plugins like Solana Agent Kit (sakit) or via inline tools
318
351
  from solana_agent import SolanaAgent
319
352
 
320
353
  config = {
354
+ "grok": {
355
+ "api_key": "your-grok-api-key",
356
+ },
357
+ "gemini": {
358
+ "api_key": "your-gemini-api-key",
359
+ },
321
360
  "openai": {
322
361
  "api_key": "your-openai-api-key",
323
362
  },
@@ -400,6 +439,12 @@ class TestTool(Tool):
400
439
  }
401
440
 
402
441
  config = {
442
+ "grok": {
443
+ "api_key": "your-grok-api-key",
444
+ },
445
+ "gemini": {
446
+ "api_key": "your-gemini-api-key",
447
+ },
403
448
  "openai": {
404
449
  "api_key": "your-openai-api-key",
405
450
  },
@@ -439,6 +484,12 @@ This knowledge is accessible to all your AI agents.
439
484
  from solana_agent import SolanaAgent
440
485
 
441
486
  config = {
487
+ "grok": {
488
+ "api_key": "your-grok-api-key",
489
+ },
490
+ "gemini": {
491
+ "api_key": "your-gemini-api-key",
492
+ },
442
493
  "openai": {
443
494
  "api_key": "your-openai-api-key",
444
495
  },
@@ -466,6 +517,12 @@ from solana_agent import SolanaAgent
466
517
  from solana_agent.interfaces.services.routing import RoutingService as RoutingServiceInterface
467
518
 
468
519
  config = {
520
+ "grok": {
521
+ "api_key": "your-grok-api-key",
522
+ },
523
+ "gemini": {
524
+ "api_key": "your-gemini-api-key",
525
+ },
469
526
  "openai": {
470
527
  "api_key": "your-openai-api-key",
471
528
  },
@@ -51,16 +51,25 @@ 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 Provider
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
60
  * [gpt-4o-mini](https://platform.openai.com/docs/models/gpt-4o-mini)
61
+ * [gemini-2.0-flash](https://ai.google.dev/gemini-api/docs/models#gemini-2.0-flash)
62
+ * [grok-3-mini-fast-beta](https://docs.x.ai/docs/models#models-and-pricing)
61
63
  * [tts-1](https://platform.openai.com/docs/models/tts-1)
62
64
  * [gpt-4o-mini-transcribe](https://platform.openai.com/docs/models/gpt-4o-mini-transcribe)
63
65
 
66
+ It is recommended to use all three LLM providers as it is the best setup.
67
+
68
+ Gemini makes the routing about 2x faster.
69
+
70
+ Grok is a fast reasoning model and makes the answers and conversation much better.
71
+
72
+ OpenAI is required while Gemini and Grok are optional.
64
73
 
65
74
  ## Installation
66
75
 
@@ -121,6 +130,12 @@ Keep this in mind while designing your agentic systems using Solana Agent.
121
130
  from solana_agent import SolanaAgent
122
131
 
123
132
  config = {
133
+ "grok": {
134
+ "api_key": "your-grok-api-key",
135
+ },
136
+ "gemini": {
137
+ "api_key": "your-gemini-api-key",
138
+ },
124
139
  "openai": {
125
140
  "api_key": "your-openai-api-key",
126
141
  },
@@ -150,6 +165,12 @@ async for response in solana_agent.process("user123", "What are the latest AI de
150
165
  from solana_agent import SolanaAgent
151
166
 
152
167
  config = {
168
+ "grok": {
169
+ "api_key": "your-grok-api-key",
170
+ },
171
+ "gemini": {
172
+ "api_key": "your-gemini-api-key",
173
+ },
153
174
  "openai": {
154
175
  "api_key": "your-openai-api-key",
155
176
  },
@@ -181,6 +202,12 @@ async for response in solana_agent.process("user123", audio_content, output_form
181
202
  from solana_agent import SolanaAgent
182
203
 
183
204
  config = {
205
+ "grok": {
206
+ "api_key": "your-grok-api-key",
207
+ },
208
+ "gemini": {
209
+ "api_key": "your-gemini-api-key",
210
+ },
184
211
  "openai": {
185
212
  "api_key": "your-openai-api-key",
186
213
  },
@@ -210,6 +237,12 @@ async for response in solana_agent.process("user123", "What is the latest news o
210
237
  from solana_agent import SolanaAgent
211
238
 
212
239
  config = {
240
+ "grok": {
241
+ "api_key": "your-grok-api-key",
242
+ },
243
+ "gemini": {
244
+ "api_key": "your-gemini-api-key",
245
+ },
213
246
  "openai": {
214
247
  "api_key": "your-openai-api-key",
215
248
  },
@@ -293,6 +326,12 @@ Tools can be used from plugins like Solana Agent Kit (sakit) or via inline tools
293
326
  from solana_agent import SolanaAgent
294
327
 
295
328
  config = {
329
+ "grok": {
330
+ "api_key": "your-grok-api-key",
331
+ },
332
+ "gemini": {
333
+ "api_key": "your-gemini-api-key",
334
+ },
296
335
  "openai": {
297
336
  "api_key": "your-openai-api-key",
298
337
  },
@@ -375,6 +414,12 @@ class TestTool(Tool):
375
414
  }
376
415
 
377
416
  config = {
417
+ "grok": {
418
+ "api_key": "your-grok-api-key",
419
+ },
420
+ "gemini": {
421
+ "api_key": "your-gemini-api-key",
422
+ },
378
423
  "openai": {
379
424
  "api_key": "your-openai-api-key",
380
425
  },
@@ -414,6 +459,12 @@ This knowledge is accessible to all your AI agents.
414
459
  from solana_agent import SolanaAgent
415
460
 
416
461
  config = {
462
+ "grok": {
463
+ "api_key": "your-grok-api-key",
464
+ },
465
+ "gemini": {
466
+ "api_key": "your-gemini-api-key",
467
+ },
417
468
  "openai": {
418
469
  "api_key": "your-openai-api-key",
419
470
  },
@@ -441,6 +492,12 @@ from solana_agent import SolanaAgent
441
492
  from solana_agent.interfaces.services.routing import RoutingService as RoutingServiceInterface
442
493
 
443
494
  config = {
495
+ "grok": {
496
+ "api_key": "your-grok-api-key",
497
+ },
498
+ "gemini": {
499
+ "api_key": "your-gemini-api-key",
500
+ },
444
501
  "openai": {
445
502
  "api_key": "your-openai-api-key",
446
503
  },
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "solana-agent"
3
- version = "27.0.0"
3
+ version = "27.1.0"
4
4
  description = "Agentic IQ"
5
5
  authors = ["Bevan Hunt <bevan@bevanhunt.com>"]
6
6
  license = "MIT"
@@ -26,7 +26,7 @@ python = ">=3.12,<4.0"
26
26
  openai = "^1.72.0"
27
27
  pydantic = "^2.11.3"
28
28
  pymongo = "^4.12.0"
29
- zep-cloud = "^2.10.0"
29
+ zep-cloud = "^2.10.1"
30
30
  instructor = "^1.7.9"
31
31
 
32
32
  [tool.poetry.group.dev.dependencies]
@@ -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
- self.client, mode=Mode.JSON)
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 self.client.chat.completions.create(
231
+ completion = await client.chat.completions.create(
216
232
  model=self.parse_model,
217
233
  messages=[
218
234
  {"role": "system", "content": fallback_system_prompt},
@@ -86,18 +86,75 @@ class SolanaAgentFactory:
86
86
  zep_api_key=config["zep"].get("api_key")
87
87
  )
88
88
 
89
- # Create primary services
90
- agent_service = AgentService(
91
- llm_provider=llm_adapter,
92
- business_mission=business_mission,
93
- config=config,
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
- # Create routing service
97
- routing_service = RoutingService(
98
- llm_provider=llm_adapter,
99
- agent_service=agent_service,
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