solana-agent 28.3.3__tar.gz → 29.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 (42) hide show
  1. {solana_agent-28.3.3 → solana_agent-29.1.0}/PKG-INFO +38 -5
  2. {solana_agent-28.3.3 → solana_agent-29.1.0}/README.md +35 -2
  3. {solana_agent-28.3.3 → solana_agent-29.1.0}/pyproject.toml +3 -3
  4. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/adapters/mongodb_adapter.py +10 -0
  5. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/client/solana_agent.py +0 -42
  6. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/factories/agent_factory.py +24 -0
  7. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/interfaces/client/client.py +0 -21
  8. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/interfaces/services/knowledge_base.py +0 -25
  9. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/services/knowledge_base.py +247 -351
  10. {solana_agent-28.3.3 → solana_agent-29.1.0}/LICENSE +0 -0
  11. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/__init__.py +0 -0
  12. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/adapters/__init__.py +0 -0
  13. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/adapters/openai_adapter.py +0 -0
  14. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/adapters/pinecone_adapter.py +0 -0
  15. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/cli.py +0 -0
  16. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/client/__init__.py +0 -0
  17. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/domains/__init__.py +0 -0
  18. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/domains/agent.py +0 -0
  19. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/domains/routing.py +0 -0
  20. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/factories/__init__.py +0 -0
  21. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/guardrails/pii.py +0 -0
  22. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/interfaces/__init__.py +0 -0
  23. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/interfaces/guardrails/guardrails.py +0 -0
  24. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/interfaces/plugins/plugins.py +0 -0
  25. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/interfaces/providers/data_storage.py +0 -0
  26. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/interfaces/providers/llm.py +0 -0
  27. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/interfaces/providers/memory.py +0 -0
  28. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/interfaces/providers/vector_storage.py +0 -0
  29. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/interfaces/services/agent.py +0 -0
  30. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/interfaces/services/query.py +0 -0
  31. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/interfaces/services/routing.py +0 -0
  32. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/plugins/__init__.py +0 -0
  33. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/plugins/manager.py +0 -0
  34. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/plugins/registry.py +0 -0
  35. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/plugins/tools/__init__.py +0 -0
  36. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/plugins/tools/auto_tool.py +0 -0
  37. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/repositories/__init__.py +0 -0
  38. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/repositories/memory.py +0 -0
  39. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/services/__init__.py +0 -0
  40. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/services/agent.py +0 -0
  41. {solana_agent-28.3.3 → solana_agent-29.1.0}/solana_agent/services/query.py +0 -0
  42. {solana_agent-28.3.3 → solana_agent-29.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: 28.3.3
3
+ Version: 29.1.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
@@ -18,7 +18,7 @@ Requires-Dist: instructor (==1.7.9)
18
18
  Requires-Dist: llama-index-core (==0.12.32)
19
19
  Requires-Dist: llama-index-embeddings-openai (==0.3.1)
20
20
  Requires-Dist: logfire (==3.14.1)
21
- Requires-Dist: openai (==1.76.2)
21
+ Requires-Dist: openai (==1.77.0)
22
22
  Requires-Dist: pillow (==11.2.1)
23
23
  Requires-Dist: pinecone (==6.0.2)
24
24
  Requires-Dist: pydantic (>=2)
@@ -27,7 +27,7 @@ Requires-Dist: pypdf (==5.4.0)
27
27
  Requires-Dist: rich (>=13,<14.0)
28
28
  Requires-Dist: scrubadub (==2.0.1)
29
29
  Requires-Dist: typer (==0.15.3)
30
- Requires-Dist: zep-cloud (==2.11.0)
30
+ Requires-Dist: zep-cloud (==2.12.1)
31
31
  Project-URL: Documentation, https://docs.solana-agent.com
32
32
  Project-URL: Homepage, https://solana-agent.com
33
33
  Project-URL: Repository, https://github.com/truemagic-coder/solana-agent
@@ -55,6 +55,7 @@ Build your AI agents in three lines of code!
55
55
  * Three lines of code setup
56
56
  * Simple Agent Definition
57
57
  * Fast Responses
58
+ * Multi-Vendor Support
58
59
  * Solana Ecosystem Integration
59
60
  * Multi-Agent Swarm
60
61
  * Multi-Modal (Images & Audio & Text)
@@ -79,6 +80,7 @@ Build your AI agents in three lines of code!
79
80
  * Easy three lines of code setup
80
81
  * Simple agent definition using JSON
81
82
  * Fast AI responses
83
+ * Multi-vendor support including OpenAI, Grok, and Gemini AI services
82
84
  * Solana Ecosystem Integration via [AgentiPy](https://github.com/niceberginc/agentipy)
83
85
  * MCP tool usage with first-class support for [Zapier](https://zapier.com/mcp)
84
86
  * Integrated observability and tracing via [Pydantic Logfire](https://pydantic.dev/logfire)
@@ -112,7 +114,8 @@ Build your AI agents in three lines of code!
112
114
 
113
115
  ### AI Models Used
114
116
 
115
- * [gpt-4.1](https://platform.openai.com/docs/models/gpt-4.1) (agent)
117
+ **OpenAI**
118
+ * [gpt-4.1](https://platform.openai.com/docs/models/gpt-4.1) (agent - can be overridden)
116
119
  * [gpt-4.1-nano](https://platform.openai.com/docs/models/gpt-4.1-nano) (router)
117
120
  * [text-embedding-3-large](https://platform.openai.com/docs/models/text-embedding-3-large) (embedding)
118
121
  * [tts-1](https://platform.openai.com/docs/models/tts-1) (audio TTS)
@@ -120,6 +123,12 @@ Build your AI agents in three lines of code!
120
123
  * [gpt-image-1](https://platform.openai.com/docs/models/gpt-image-1) (image generation)
121
124
  * [gpt-4o-mini-search-preview](https://platform.openai.com/docs/models/gpt-4o-mini-search-preview) (Internet search)
122
125
 
126
+ **Grok**
127
+ * [grok-3-fast](https://x.ai/api#pricing) (agent - optional)
128
+
129
+ **Gemini**
130
+ * [gemini-2.5-pro-preview-03-25](https://ai.google.dev/gemini-api/docs/models#gemini-2.5-pro-preview-03-25) (agent - optional)
131
+
123
132
  ## Installation
124
133
 
125
134
  You can install Solana Agent using pip:
@@ -421,9 +430,33 @@ config = {
421
430
  }
422
431
  ```
423
432
 
433
+ ### Grok
434
+
435
+ `grok-3-fast` can be used instead of `gpt-4.1` for the agent model
436
+
437
+ ```python
438
+ config = {
439
+ "grok": {
440
+ "api_key": "your-grok-api-key",
441
+ },
442
+ }
443
+ ```
444
+
445
+ ### Gemini
446
+
447
+ `gemini-2.5-pro-preview-03-25` can be used instead of `gpt-4.1` for the agent model
448
+
449
+ ```python
450
+ config = {
451
+ "gemini": {
452
+ "api_key": "your-gemini-api-key",
453
+ },
454
+ }
455
+ ```
456
+
424
457
  ### Knowledge Base
425
458
 
426
- The Knowledge Base (KB) is meant to store text values and/or small PDFs.
459
+ The Knowledge Base (KB) is meant to store text values and/or PDFs (extracts text) - can handle very large PDFs.
427
460
 
428
461
  ```python
429
462
  config = {
@@ -20,6 +20,7 @@ Build your AI agents in three lines of code!
20
20
  * Three lines of code setup
21
21
  * Simple Agent Definition
22
22
  * Fast Responses
23
+ * Multi-Vendor Support
23
24
  * Solana Ecosystem Integration
24
25
  * Multi-Agent Swarm
25
26
  * Multi-Modal (Images & Audio & Text)
@@ -44,6 +45,7 @@ Build your AI agents in three lines of code!
44
45
  * Easy three lines of code setup
45
46
  * Simple agent definition using JSON
46
47
  * Fast AI responses
48
+ * Multi-vendor support including OpenAI, Grok, and Gemini AI services
47
49
  * Solana Ecosystem Integration via [AgentiPy](https://github.com/niceberginc/agentipy)
48
50
  * MCP tool usage with first-class support for [Zapier](https://zapier.com/mcp)
49
51
  * Integrated observability and tracing via [Pydantic Logfire](https://pydantic.dev/logfire)
@@ -77,7 +79,8 @@ Build your AI agents in three lines of code!
77
79
 
78
80
  ### AI Models Used
79
81
 
80
- * [gpt-4.1](https://platform.openai.com/docs/models/gpt-4.1) (agent)
82
+ **OpenAI**
83
+ * [gpt-4.1](https://platform.openai.com/docs/models/gpt-4.1) (agent - can be overridden)
81
84
  * [gpt-4.1-nano](https://platform.openai.com/docs/models/gpt-4.1-nano) (router)
82
85
  * [text-embedding-3-large](https://platform.openai.com/docs/models/text-embedding-3-large) (embedding)
83
86
  * [tts-1](https://platform.openai.com/docs/models/tts-1) (audio TTS)
@@ -85,6 +88,12 @@ Build your AI agents in three lines of code!
85
88
  * [gpt-image-1](https://platform.openai.com/docs/models/gpt-image-1) (image generation)
86
89
  * [gpt-4o-mini-search-preview](https://platform.openai.com/docs/models/gpt-4o-mini-search-preview) (Internet search)
87
90
 
91
+ **Grok**
92
+ * [grok-3-fast](https://x.ai/api#pricing) (agent - optional)
93
+
94
+ **Gemini**
95
+ * [gemini-2.5-pro-preview-03-25](https://ai.google.dev/gemini-api/docs/models#gemini-2.5-pro-preview-03-25) (agent - optional)
96
+
88
97
  ## Installation
89
98
 
90
99
  You can install Solana Agent using pip:
@@ -386,9 +395,33 @@ config = {
386
395
  }
387
396
  ```
388
397
 
398
+ ### Grok
399
+
400
+ `grok-3-fast` can be used instead of `gpt-4.1` for the agent model
401
+
402
+ ```python
403
+ config = {
404
+ "grok": {
405
+ "api_key": "your-grok-api-key",
406
+ },
407
+ }
408
+ ```
409
+
410
+ ### Gemini
411
+
412
+ `gemini-2.5-pro-preview-03-25` can be used instead of `gpt-4.1` for the agent model
413
+
414
+ ```python
415
+ config = {
416
+ "gemini": {
417
+ "api_key": "your-gemini-api-key",
418
+ },
419
+ }
420
+ ```
421
+
389
422
  ### Knowledge Base
390
423
 
391
- The Knowledge Base (KB) is meant to store text values and/or small PDFs.
424
+ The Knowledge Base (KB) is meant to store text values and/or PDFs (extracts text) - can handle very large PDFs.
392
425
 
393
426
  ```python
394
427
  config = {
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "solana-agent"
3
- version = "28.3.3"
3
+ version = "29.1.0"
4
4
  description = "AI Agents for Solana"
5
5
  authors = ["Bevan Hunt <bevan@bevanhunt.com>"]
6
6
  license = "MIT"
@@ -24,10 +24,10 @@ python_paths = [".", "tests"]
24
24
 
25
25
  [tool.poetry.dependencies]
26
26
  python = ">=3.12,<4.0"
27
- openai = "1.76.2"
27
+ openai = "1.77.0"
28
28
  pydantic = ">=2"
29
29
  pymongo = "4.12.1"
30
- zep-cloud = "2.11.0"
30
+ zep-cloud = "2.12.1"
31
31
  instructor = "1.7.9"
32
32
  pinecone = "6.0.2"
33
33
  llama-index-core = "0.12.32"
@@ -32,6 +32,16 @@ class MongoDBAdapter(DataStorageProvider):
32
32
  self.db[collection].insert_one(document)
33
33
  return document["_id"]
34
34
 
35
+ def insert_many(self, collection: str, documents: List[Dict]) -> List[str]:
36
+ for document in documents:
37
+ if "_id" not in document:
38
+ document["_id"] = str(uuid.uuid4())
39
+ result = self.db[collection].insert_many(documents)
40
+ return [str(doc_id) for doc_id in result.inserted_ids]
41
+
42
+ def delete_many(self, collection: str, query: Dict):
43
+ return self.db[collection].delete_many(query)
44
+
35
45
  def find_one(self, collection: str, query: Dict) -> Optional[Dict]:
36
46
  return self.db[collection].find_one(query)
37
47
 
@@ -227,48 +227,6 @@ class SolanaAgent(SolanaAgentInterface):
227
227
  kb = self._ensure_kb()
228
228
  return await kb.delete_document(document_id, namespace)
229
229
 
230
- async def kb_update_document(
231
- self,
232
- document_id: str,
233
- text: Optional[str] = None,
234
- metadata: Optional[Dict[str, Any]] = None,
235
- namespace: Optional[str] = None,
236
- ) -> bool:
237
- """
238
- Update an existing document in the knowledge base.
239
-
240
- Args:
241
- document_id: ID of document to update.
242
- text: Optional new text content.
243
- metadata: Optional metadata to update.
244
- namespace: Optional Pinecone namespace.
245
-
246
- Returns:
247
- True if successful.
248
- """
249
- kb = self._ensure_kb()
250
- return await kb.update_document(document_id, text, metadata, namespace)
251
-
252
- async def kb_add_documents_batch(
253
- self,
254
- documents: List[Dict[str, Any]],
255
- namespace: Optional[str] = None,
256
- batch_size: int = 50,
257
- ) -> List[str]:
258
- """
259
- Add multiple documents to the knowledge base in batches.
260
-
261
- Args:
262
- documents: List of documents ({'text': ..., 'metadata': ...}).
263
- namespace: Optional Pinecone namespace.
264
- batch_size: Number of documents per batch.
265
-
266
- Returns:
267
- List of added document IDs.
268
- """
269
- kb = self._ensure_kb()
270
- return await kb.add_documents_batch(documents, namespace, batch_size)
271
-
272
230
  async def kb_add_pdf_document(
273
231
  self,
274
232
  pdf_data: Union[bytes, str],
@@ -168,6 +168,30 @@ class SolanaAgentFactory:
168
168
  output_guardrails=output_guardrails,
169
169
  )
170
170
 
171
+ if "gemini" in config and "api_key" in config["gemini"]:
172
+ # Create primary services
173
+ agent_service = AgentService(
174
+ llm_provider=llm_adapter,
175
+ business_mission=business_mission,
176
+ config=config,
177
+ api_key=config["gemini"]["api_key"],
178
+ base_url="https://generativelanguage.googleapis.com/v1beta/openai/",
179
+ model="gemini-2.5-pro-preview-03-25",
180
+ output_guardrails=output_guardrails,
181
+ ) # pragma: no cover
182
+
183
+ elif "grok" in config and "api_key" in config["grok"]:
184
+ # Create primary services
185
+ agent_service = AgentService(
186
+ llm_provider=llm_adapter,
187
+ business_mission=business_mission,
188
+ config=config,
189
+ api_key=config["grok"]["api_key"],
190
+ base_url="https://api.x.ai/v1",
191
+ model="grok-3-fast",
192
+ output_guardrails=output_guardrails,
193
+ ) # pragma: no cover
194
+
171
195
  # Create routing service
172
196
  routing_service = RoutingService(
173
197
  llm_provider=llm_adapter,
@@ -91,27 +91,6 @@ class SolanaAgent(ABC):
91
91
  """Delete a document from the knowledge base."""
92
92
  pass
93
93
 
94
- @abstractmethod
95
- async def kb_update_document(
96
- self,
97
- document_id: str,
98
- text: Optional[str] = None,
99
- metadata: Optional[Dict[str, Any]] = None,
100
- namespace: Optional[str] = None,
101
- ) -> bool:
102
- """Update an existing document in the knowledge base."""
103
- pass
104
-
105
- @abstractmethod
106
- async def kb_add_documents_batch(
107
- self,
108
- documents: List[Dict[str, Any]],
109
- namespace: Optional[str] = None,
110
- batch_size: int = 50,
111
- ) -> List[str]:
112
- """Add multiple documents to the knowledge base in batches."""
113
- pass
114
-
115
94
  @abstractmethod
116
95
  async def kb_add_pdf_document(
117
96
  self,
@@ -44,31 +44,6 @@ class KnowledgeBaseService(ABC):
44
44
  """
45
45
  pass
46
46
 
47
- @abstractmethod
48
- async def update_document(
49
- self,
50
- document_id: str,
51
- text: Optional[str] = None,
52
- metadata: Optional[Dict[str, Any]] = None,
53
- namespace: Optional[str] = None,
54
- ) -> bool:
55
- """
56
- Update an existing document in the knowledge base.
57
- """
58
- pass
59
-
60
- @abstractmethod
61
- async def add_documents_batch(
62
- self,
63
- documents: List[Dict[str, Any]],
64
- namespace: Optional[str] = None,
65
- batch_size: int = 50,
66
- ) -> List[str]:
67
- """
68
- Add multiple documents in batches.
69
- """
70
- pass
71
-
72
47
  @abstractmethod
73
48
  async def add_pdf_document(
74
49
  self,