solana-agent 29.1.5__tar.gz → 29.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.
Files changed (42) hide show
  1. {solana_agent-29.1.5 → solana_agent-29.2.0}/PKG-INFO +22 -12
  2. {solana_agent-29.1.5 → solana_agent-29.2.0}/README.md +16 -6
  3. {solana_agent-29.1.5 → solana_agent-29.2.0}/pyproject.toml +7 -7
  4. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/factories/agent_factory.py +44 -5
  5. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/services/agent.py +4 -3
  6. {solana_agent-29.1.5 → solana_agent-29.2.0}/LICENSE +0 -0
  7. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/__init__.py +0 -0
  8. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/adapters/__init__.py +0 -0
  9. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/adapters/mongodb_adapter.py +0 -0
  10. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/adapters/openai_adapter.py +0 -0
  11. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/adapters/pinecone_adapter.py +0 -0
  12. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/cli.py +0 -0
  13. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/client/__init__.py +0 -0
  14. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/client/solana_agent.py +0 -0
  15. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/domains/__init__.py +0 -0
  16. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/domains/agent.py +0 -0
  17. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/domains/routing.py +0 -0
  18. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/factories/__init__.py +0 -0
  19. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/guardrails/pii.py +0 -0
  20. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/interfaces/__init__.py +0 -0
  21. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/interfaces/client/client.py +0 -0
  22. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/interfaces/guardrails/guardrails.py +0 -0
  23. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/interfaces/plugins/plugins.py +0 -0
  24. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/interfaces/providers/data_storage.py +0 -0
  25. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/interfaces/providers/llm.py +0 -0
  26. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/interfaces/providers/memory.py +0 -0
  27. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/interfaces/providers/vector_storage.py +0 -0
  28. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/interfaces/services/agent.py +0 -0
  29. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/interfaces/services/knowledge_base.py +0 -0
  30. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/interfaces/services/query.py +0 -0
  31. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/interfaces/services/routing.py +0 -0
  32. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/plugins/__init__.py +0 -0
  33. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/plugins/manager.py +0 -0
  34. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/plugins/registry.py +0 -0
  35. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/plugins/tools/__init__.py +0 -0
  36. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/plugins/tools/auto_tool.py +0 -0
  37. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/repositories/__init__.py +0 -0
  38. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/repositories/memory.py +0 -0
  39. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/services/__init__.py +0 -0
  40. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/services/knowledge_base.py +0 -0
  41. {solana_agent-29.1.5 → solana_agent-29.2.0}/solana_agent/services/query.py +0 -0
  42. {solana_agent-29.1.5 → solana_agent-29.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: 29.1.5
3
+ Version: 29.2.0
4
4
  Summary: AI Agents for Solana
5
5
  License: MIT
6
6
  Keywords: solana,solana ai,solana agent,ai,ai agent,ai agents
@@ -14,19 +14,19 @@ Classifier: Programming Language :: Python :: 3
14
14
  Classifier: Programming Language :: Python :: 3.12
15
15
  Classifier: Programming Language :: Python :: 3.13
16
16
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
17
- Requires-Dist: instructor (==1.8.2)
17
+ Requires-Dist: instructor (==1.8.3)
18
18
  Requires-Dist: llama-index-core (==0.12.37)
19
19
  Requires-Dist: llama-index-embeddings-openai (==0.3.1)
20
- Requires-Dist: logfire (==3.16.0)
21
- Requires-Dist: openai (==1.79.0)
20
+ Requires-Dist: logfire (==3.16.1)
21
+ Requires-Dist: openai (==1.82.0)
22
22
  Requires-Dist: pillow (==11.2.1)
23
- Requires-Dist: pinecone (==6.0.2)
23
+ Requires-Dist: pinecone (==7.0.1)
24
24
  Requires-Dist: pydantic (>=2)
25
25
  Requires-Dist: pymongo (==4.13.0)
26
26
  Requires-Dist: pypdf (==5.5.0)
27
27
  Requires-Dist: rich (>=13,<14.0)
28
28
  Requires-Dist: scrubadub (==2.0.1)
29
- Requires-Dist: typer (==0.15.4)
29
+ Requires-Dist: typer (==0.16.0)
30
30
  Requires-Dist: zep-cloud (==2.12.3)
31
31
  Project-URL: Documentation, https://docs.solana-agent.com
32
32
  Project-URL: Homepage, https://solana-agent.com
@@ -116,7 +116,7 @@ Build your AI agents in three lines of code!
116
116
 
117
117
  **OpenAI**
118
118
  * [gpt-4.1](https://platform.openai.com/docs/models/gpt-4.1) (agent - can be overridden)
119
- * [gpt-4.1-nano](https://platform.openai.com/docs/models/gpt-4.1-nano) (router)
119
+ * [gpt-4.1-nano](https://platform.openai.com/docs/models/gpt-4.1-nano) (router - can be overridden)
120
120
  * [text-embedding-3-large](https://platform.openai.com/docs/models/text-embedding-3-large) (embedding)
121
121
  * [tts-1](https://platform.openai.com/docs/models/tts-1) (audio TTS)
122
122
  * [gpt-4o-mini-transcribe](https://platform.openai.com/docs/models/gpt-4o-mini-transcribe) (audio transcription)
@@ -125,12 +125,16 @@ Build your AI agents in three lines of code!
125
125
 
126
126
  **Grok**
127
127
  * [grok-3-fast](https://x.ai/api#pricing) (agent - optional)
128
+ * [grok-3-mini-fast](https://x.ai/api#pricing) (router - optional)
128
129
  * [grok-2-image](https://x.ai/api#pricing) (image generation - optional)
129
130
 
130
131
  **Gemini**
131
- * [gemini-2.5-flash-preview-04-17](https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview) (agent - optional)
132
+ * [gemini-2.5-flash-preview-04-17](https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview) (agent & router - optional)
132
133
  * [imagen-3.0-generate-002](https://ai.google.dev/gemini-api/docs/models#imagen-3) (image generation - optional)
133
134
 
135
+ **Ollama**
136
+ * [gemma:4b-it-qat](https://ollama.com/library/gemma3) - (agent & router - optional)
137
+
134
138
  ## Installation
135
139
 
136
140
  You can install Solana Agent using pip:
@@ -434,8 +438,6 @@ config = {
434
438
 
435
439
  ### Grok
436
440
 
437
- `grok-3-fast` can be used instead of `gpt-4.1` for the agent model
438
-
439
441
  ```python
440
442
  config = {
441
443
  "grok": {
@@ -446,8 +448,6 @@ config = {
446
448
 
447
449
  ### Gemini
448
450
 
449
- `gemini-2.5-pro-preview-03-25` can be used instead of `gpt-4.1` for the agent model
450
-
451
451
  ```python
452
452
  config = {
453
453
  "gemini": {
@@ -456,6 +456,16 @@ config = {
456
456
  }
457
457
  ```
458
458
 
459
+ ### Ollama
460
+
461
+ ```python
462
+ config = {
463
+ "ollama": {
464
+ "api_key": "use-this-key-1010"
465
+ },
466
+ }
467
+ ```
468
+
459
469
  ### Knowledge Base
460
470
 
461
471
  The Knowledge Base (KB) is meant to store text values and/or PDFs (extracts text) - can handle very large PDFs.
@@ -81,7 +81,7 @@ Build your AI agents in three lines of code!
81
81
 
82
82
  **OpenAI**
83
83
  * [gpt-4.1](https://platform.openai.com/docs/models/gpt-4.1) (agent - can be overridden)
84
- * [gpt-4.1-nano](https://platform.openai.com/docs/models/gpt-4.1-nano) (router)
84
+ * [gpt-4.1-nano](https://platform.openai.com/docs/models/gpt-4.1-nano) (router - can be overridden)
85
85
  * [text-embedding-3-large](https://platform.openai.com/docs/models/text-embedding-3-large) (embedding)
86
86
  * [tts-1](https://platform.openai.com/docs/models/tts-1) (audio TTS)
87
87
  * [gpt-4o-mini-transcribe](https://platform.openai.com/docs/models/gpt-4o-mini-transcribe) (audio transcription)
@@ -90,12 +90,16 @@ Build your AI agents in three lines of code!
90
90
 
91
91
  **Grok**
92
92
  * [grok-3-fast](https://x.ai/api#pricing) (agent - optional)
93
+ * [grok-3-mini-fast](https://x.ai/api#pricing) (router - optional)
93
94
  * [grok-2-image](https://x.ai/api#pricing) (image generation - optional)
94
95
 
95
96
  **Gemini**
96
- * [gemini-2.5-flash-preview-04-17](https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview) (agent - optional)
97
+ * [gemini-2.5-flash-preview-04-17](https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview) (agent & router - optional)
97
98
  * [imagen-3.0-generate-002](https://ai.google.dev/gemini-api/docs/models#imagen-3) (image generation - optional)
98
99
 
100
+ **Ollama**
101
+ * [gemma:4b-it-qat](https://ollama.com/library/gemma3) - (agent & router - optional)
102
+
99
103
  ## Installation
100
104
 
101
105
  You can install Solana Agent using pip:
@@ -399,8 +403,6 @@ config = {
399
403
 
400
404
  ### Grok
401
405
 
402
- `grok-3-fast` can be used instead of `gpt-4.1` for the agent model
403
-
404
406
  ```python
405
407
  config = {
406
408
  "grok": {
@@ -411,8 +413,6 @@ config = {
411
413
 
412
414
  ### Gemini
413
415
 
414
- `gemini-2.5-pro-preview-03-25` can be used instead of `gpt-4.1` for the agent model
415
-
416
416
  ```python
417
417
  config = {
418
418
  "gemini": {
@@ -421,6 +421,16 @@ config = {
421
421
  }
422
422
  ```
423
423
 
424
+ ### Ollama
425
+
426
+ ```python
427
+ config = {
428
+ "ollama": {
429
+ "api_key": "use-this-key-1010"
430
+ },
431
+ }
432
+ ```
433
+
424
434
  ### Knowledge Base
425
435
 
426
436
  The Knowledge Base (KB) is meant to store text values and/or PDFs (extracts text) - can handle very large PDFs.
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "solana-agent"
3
- version = "29.1.5"
3
+ version = "29.2.0"
4
4
  description = "AI Agents for Solana"
5
5
  authors = ["Bevan Hunt <bevan@bevanhunt.com>"]
6
6
  license = "MIT"
@@ -24,25 +24,25 @@ python_paths = [".", "tests"]
24
24
 
25
25
  [tool.poetry.dependencies]
26
26
  python = ">=3.12,<4.0"
27
- openai = "1.79.0"
27
+ openai = "1.82.0"
28
28
  pydantic = ">=2"
29
29
  pymongo = "4.13.0"
30
30
  zep-cloud = "2.12.3"
31
- instructor = "1.8.2"
32
- pinecone = "6.0.2"
31
+ instructor = "1.8.3"
32
+ pinecone = "7.0.1"
33
33
  llama-index-core = "0.12.37"
34
34
  llama-index-embeddings-openai = "0.3.1"
35
35
  pypdf = "5.5.0"
36
36
  scrubadub = "2.0.1"
37
- logfire = "3.16.0"
38
- typer = "0.15.4"
37
+ logfire = "3.16.1"
38
+ typer = "0.16.0"
39
39
  rich = ">=13,<14.0"
40
40
  pillow = "11.2.1"
41
41
 
42
42
  [tool.poetry.group.dev.dependencies]
43
43
  pytest = "^8.3.5"
44
44
  pytest-cov = "^6.1.1"
45
- pytest-asyncio = "^0.26.0"
45
+ pytest-asyncio = "^1.0.0"
46
46
  pytest-mock = "^3.14.0"
47
47
  pytest-github-actions-annotate-failures = "^0.3.0"
48
48
  sphinx = "^8.2.3"
@@ -168,6 +168,12 @@ class SolanaAgentFactory:
168
168
  output_guardrails=output_guardrails,
169
169
  )
170
170
 
171
+ # Create routing service
172
+ routing_service = RoutingService(
173
+ llm_provider=llm_adapter,
174
+ agent_service=agent_service,
175
+ )
176
+
171
177
  if "gemini" in config and "api_key" in config["gemini"]:
172
178
  # Create primary services
173
179
  agent_service = AgentService(
@@ -180,6 +186,15 @@ class SolanaAgentFactory:
180
186
  output_guardrails=output_guardrails,
181
187
  ) # pragma: no cover
182
188
 
189
+ # Create routing service
190
+ routing_service = RoutingService(
191
+ llm_provider=llm_adapter,
192
+ agent_service=agent_service,
193
+ api_key=config["gemini"]["api_key"],
194
+ base_url="https://generativelanguage.googleapis.com/v1beta/openai/",
195
+ model="gemini-2.5-flash-preview-05-20",
196
+ ) # pragma: no cover
197
+
183
198
  elif "grok" in config and "api_key" in config["grok"]:
184
199
  # Create primary services
185
200
  agent_service = AgentService(
@@ -192,11 +207,35 @@ class SolanaAgentFactory:
192
207
  output_guardrails=output_guardrails,
193
208
  ) # pragma: no cover
194
209
 
195
- # Create routing service
196
- routing_service = RoutingService(
197
- llm_provider=llm_adapter,
198
- agent_service=agent_service,
199
- )
210
+ # Create routing service
211
+ routing_service = RoutingService(
212
+ llm_provider=llm_adapter,
213
+ agent_service=agent_service,
214
+ api_key=config["gemini"]["api_key"],
215
+ base_url="https://api.x.ai/v1",
216
+ model="grok-3-mini-fast",
217
+ ) # pragma: no cover
218
+
219
+ elif "ollama" in config and "api_key" in config["ollama"]:
220
+ # Create primary services
221
+ agent_service = AgentService(
222
+ llm_provider=llm_adapter,
223
+ business_mission=business_mission,
224
+ config=config,
225
+ api_key=config["ollama"]["api_key"],
226
+ base_url="http://localhost:11434/v1",
227
+ model="gemma3:4b-it-qat",
228
+ output_guardrails=output_guardrails,
229
+ ) # pragma: no cover
230
+
231
+ # Create routing service
232
+ routing_service = RoutingService(
233
+ llm_provider=llm_adapter,
234
+ agent_service=agent_service,
235
+ api_key=config["ollama"]["api_key"],
236
+ base_url="http://localhost:11434/v1",
237
+ model="gemma3:4b-it-qat",
238
+ ) # pragma: no cover
200
239
 
201
240
  # Debug the agent service tool registry
202
241
  logger.debug( # Use logger.debug
@@ -773,13 +773,14 @@ class AgentService(AgentServiceInterface):
773
773
 
774
774
  def _get_tool_usage_prompt(self, agent_name: str) -> str:
775
775
  """Generate marker-based instructions for tool usage."""
776
- tools = self.get_agent_tools(agent_name)
777
- if not tools:
776
+ # Only include tools actually assigned to this agent
777
+ agent_tools = self.tool_registry.get_agent_tools(agent_name)
778
+ if not agent_tools:
778
779
  return ""
779
780
 
780
781
  # Simplify tool representation for the prompt
781
782
  simplified_tools = []
782
- for tool in tools:
783
+ for tool in agent_tools:
783
784
  simplified_tool = {
784
785
  "name": tool.get("name"),
785
786
  "description": tool.get("description"),
File without changes