solana-agent 29.1.5__py3-none-any.whl → 29.2.0__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.
@@ -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"),
@@ -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.
@@ -10,7 +10,7 @@ solana_agent/domains/__init__.py,sha256=HiC94wVPRy-QDJSSRywCRrhrFfTBeHjfi5z-QfZv
10
10
  solana_agent/domains/agent.py,sha256=3Q1wg4eIul0CPpaYBOjEthKTfcdhf1SAiWc2R-IMGO8,2561
11
11
  solana_agent/domains/routing.py,sha256=1yR4IswGcmREGgbOOI6TKCfuM7gYGOhQjLkBqnZ-rNo,582
12
12
  solana_agent/factories/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- solana_agent/factories/agent_factory.py,sha256=Zxdk9bJ00cEek4gdKnfxG9Fcgjgt_ATb0W0xYctgpmI,14288
13
+ solana_agent/factories/agent_factory.py,sha256=P8d-wGdWhksu79jngwTtL4jOeMjeo3OfiUJhwPWVh7U,15897
14
14
  solana_agent/guardrails/pii.py,sha256=FCz1IC3mmkr41QFFf5NaC0fwJrVkwFsxgyOCS2POO5I,4428
15
15
  solana_agent/interfaces/__init__.py,sha256=IQs1WIM1FeKP1-kY2FEfyhol_dB-I-VAe2rD6jrVF6k,355
16
16
  solana_agent/interfaces/client/client.py,sha256=hFYe04lFGbp4BDlUMOnYQrp_SQXFPcktGOwsi0F87vU,3140
@@ -32,12 +32,12 @@ solana_agent/plugins/tools/auto_tool.py,sha256=uihijtlc9CCqCIaRcwPuuN7o1SHIpWL2G
32
32
  solana_agent/repositories/__init__.py,sha256=fP83w83CGzXLnSdq-C5wbw9EhWTYtqE2lQTgp46-X_4,163
33
33
  solana_agent/repositories/memory.py,sha256=SKQJJisrERccqd4cm4ERlp5BmKHVQAp1fzp8ce4i2bw,8377
34
34
  solana_agent/services/__init__.py,sha256=iko0c2MlF8b_SA_nuBGFllr2E3g_JowOrOzGcnU9tkA,162
35
- solana_agent/services/agent.py,sha256=QoeQq_OEWyLdBS0FPa-lXm5qiE0RnRfrCKiFTfOSGE0,42369
35
+ solana_agent/services/agent.py,sha256=0zehiZyTw91IQ_nskxYZF8plecA66m5rD-OA7Cr1Xq8,42462
36
36
  solana_agent/services/knowledge_base.py,sha256=ZvOPrSmcNDgUzz4bJIQ4LeRl9vMZiK9hOfs71IpB7Bk,32735
37
37
  solana_agent/services/query.py,sha256=ENUfs4WSTpODMRXppDVW-Y3li9jYn8pOfQIHIPerUdQ,18498
38
38
  solana_agent/services/routing.py,sha256=C5Ku4t9TqvY7S8wlUPMTC04HCrT4Ib3E8Q8yX0lVU_s,7137
39
- solana_agent-29.1.5.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
40
- solana_agent-29.1.5.dist-info/METADATA,sha256=20UQizPZr3dgxnakQU9NaPQw65RFz5ZduSN0VUssauw,35804
41
- solana_agent-29.1.5.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
42
- solana_agent-29.1.5.dist-info/entry_points.txt,sha256=-AuT_mfqk8dlZ0pHuAjx1ouAWpTRjpqvEUa6YV3lmc0,53
43
- solana_agent-29.1.5.dist-info/RECORD,,
39
+ solana_agent-29.2.0.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
40
+ solana_agent-29.2.0.dist-info/METADATA,sha256=7GiWgj6IbAnxg-xP5kvROu_qUFYK7ZUcf3H-w84My_o,35946
41
+ solana_agent-29.2.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
42
+ solana_agent-29.2.0.dist-info/entry_points.txt,sha256=-AuT_mfqk8dlZ0pHuAjx1ouAWpTRjpqvEUa6YV3lmc0,53
43
+ solana_agent-29.2.0.dist-info/RECORD,,