solana-agent 27.1.0__tar.gz → 27.3.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 (40) hide show
  1. solana_agent-27.1.0/README.md → solana_agent-27.3.0/PKG-INFO +177 -70
  2. solana_agent-27.1.0/PKG-INFO → solana_agent-27.3.0/README.md +147 -96
  3. {solana_agent-27.1.0 → solana_agent-27.3.0}/pyproject.toml +6 -2
  4. solana_agent-27.1.0/solana_agent/adapters/llm_adapter.py → solana_agent-27.3.0/solana_agent/adapters/openai_adapter.py +59 -5
  5. solana_agent-27.3.0/solana_agent/adapters/pinecone_adapter.py +496 -0
  6. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/client/solana_agent.py +145 -1
  7. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/factories/agent_factory.py +74 -8
  8. solana_agent-27.3.0/solana_agent/interfaces/client/client.py +115 -0
  9. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/interfaces/providers/llm.py +20 -0
  10. solana_agent-27.3.0/solana_agent/interfaces/providers/vector_storage.py +59 -0
  11. solana_agent-27.3.0/solana_agent/interfaces/services/knowledge_base.py +86 -0
  12. solana_agent-27.3.0/solana_agent/services/knowledge_base.py +771 -0
  13. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/services/query.py +33 -2
  14. solana_agent-27.1.0/solana_agent/interfaces/client/client.py +0 -45
  15. {solana_agent-27.1.0 → solana_agent-27.3.0}/LICENSE +0 -0
  16. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/__init__.py +0 -0
  17. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/adapters/__init__.py +0 -0
  18. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/adapters/mongodb_adapter.py +0 -0
  19. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/client/__init__.py +0 -0
  20. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/domains/__init__.py +0 -0
  21. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/domains/agent.py +0 -0
  22. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/domains/routing.py +0 -0
  23. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/factories/__init__.py +0 -0
  24. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/interfaces/__init__.py +0 -0
  25. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/interfaces/plugins/plugins.py +0 -0
  26. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/interfaces/providers/data_storage.py +0 -0
  27. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/interfaces/providers/memory.py +0 -0
  28. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/interfaces/services/agent.py +0 -0
  29. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/interfaces/services/query.py +0 -0
  30. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/interfaces/services/routing.py +0 -0
  31. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/plugins/__init__.py +0 -0
  32. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/plugins/manager.py +0 -0
  33. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/plugins/registry.py +0 -0
  34. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/plugins/tools/__init__.py +0 -0
  35. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/plugins/tools/auto_tool.py +0 -0
  36. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/repositories/__init__.py +0 -0
  37. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/repositories/memory.py +0 -0
  38. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/services/__init__.py +0 -0
  39. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/services/agent.py +0 -0
  40. {solana_agent-27.1.0 → solana_agent-27.3.0}/solana_agent/services/routing.py +0 -0
@@ -1,3 +1,32 @@
1
+ Metadata-Version: 2.3
2
+ Name: solana-agent
3
+ Version: 27.3.0
4
+ Summary: Agentic IQ
5
+ License: MIT
6
+ Keywords: ai,openai,ai agents,agi
7
+ Author: Bevan Hunt
8
+ Author-email: bevan@bevanhunt.com
9
+ Requires-Python: >=3.12,<4.0
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
17
+ Requires-Dist: instructor (>=1.7.9,<2.0.0)
18
+ Requires-Dist: llama-index-core (>=0.12.30,<0.13.0)
19
+ Requires-Dist: llama-index-embeddings-openai (>=0.3.1,<0.4.0)
20
+ Requires-Dist: openai (>=1.74.0,<2.0.0)
21
+ Requires-Dist: pinecone (>=6.0.2,<7.0.0)
22
+ Requires-Dist: pydantic (>=2.11.3,<3.0.0)
23
+ Requires-Dist: pymongo (>=4.12.0,<5.0.0)
24
+ Requires-Dist: pypdf (>=5.4.0,<6.0.0)
25
+ Requires-Dist: zep-cloud (>=2.10.1,<3.0.0)
26
+ Project-URL: Documentation, https://docs.solana-agent.com
27
+ Project-URL: Repository, https://github.com/truemagic-coder/solana-agent
28
+ Description-Content-Type: text/markdown
29
+
1
30
  # Solana Agent
2
31
 
3
32
  [![PyPI - Version](https://img.shields.io/pypi/v/solana-agent)](https://pypi.org/project/solana-agent/)
@@ -26,6 +55,7 @@ Build your AI business in three lines of code!
26
55
  * Business Alignment
27
56
  * Extensible Tooling
28
57
  * Simple Business Definition
58
+ * Knowledge Base with PDF support
29
59
  * Tested & Secure
30
60
  * Built in Python
31
61
  * Powers [CometHeart](https://cometheart.com) & [WalletBubbles](https://walletbubbles.com)
@@ -45,6 +75,7 @@ Build your AI business in three lines of code!
45
75
  * Powerful tool integration using standard Python packages and/or inline tools
46
76
  * Assigned tools are utilized by agents automatically and effectively
47
77
  * Simple business definition using JSON
78
+ * Integrated Knowledge Base with semantic search and automatic PDF chunking
48
79
 
49
80
  ## Stack
50
81
 
@@ -54,22 +85,17 @@ Build your AI business in three lines of code!
54
85
  * [OpenAI](https://openai.com), [Google](https://ai.google.dev), [xAI](https://x.ai) - LLM Providers
55
86
  * [MongoDB](https://mongodb.com) - Conversational History (optional)
56
87
  * [Zep Cloud](https://getzep.com) - Conversational Memory (optional)
88
+ * [Pinecone](https://pinecone.io) - Knowledge Base (optional)
57
89
 
58
90
  ### LLMs
59
91
 
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)
63
- * [tts-1](https://platform.openai.com/docs/models/tts-1)
64
- * [gpt-4o-mini-transcribe](https://platform.openai.com/docs/models/gpt-4o-mini-transcribe)
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.
92
+ * [gpt-4.1-mini](https://platform.openai.com/docs/models/gpt-4.1-mini) (agent)
93
+ * [gpt-4.1-nano](https://platform.openai.com/docs/models/gpt-4.1-nano) (router)
94
+ * [text-embedding-3-large](https://platform.openai.com/docs/models/text-embedding-3-large) or [text-embedding-3-small](https://platform.openai.com/docs/models/text-embedding-3-small) (embedding)
95
+ * [tts-1](https://platform.openai.com/docs/models/tts-1) (audio TTS)
96
+ * [gpt-4o-mini-transcribe](https://platform.openai.com/docs/models/gpt-4o-mini-transcribe) (audio transcription)
97
+ * [gemini-2.0-flash](https://ai.google.dev/gemini-api/docs/models#gemini-2.0-flash) (optional)
98
+ * [grok-3-mini-fast-beta](https://docs.x.ai/docs/models#models-and-pricing) (optional)
73
99
 
74
100
  ## Installation
75
101
 
@@ -130,12 +156,6 @@ Keep this in mind while designing your agentic systems using Solana Agent.
130
156
  from solana_agent import SolanaAgent
131
157
 
132
158
  config = {
133
- "grok": {
134
- "api_key": "your-grok-api-key",
135
- },
136
- "gemini": {
137
- "api_key": "your-gemini-api-key",
138
- },
139
159
  "openai": {
140
160
  "api_key": "your-openai-api-key",
141
161
  },
@@ -165,12 +185,6 @@ async for response in solana_agent.process("user123", "What are the latest AI de
165
185
  from solana_agent import SolanaAgent
166
186
 
167
187
  config = {
168
- "grok": {
169
- "api_key": "your-grok-api-key",
170
- },
171
- "gemini": {
172
- "api_key": "your-gemini-api-key",
173
- },
174
188
  "openai": {
175
189
  "api_key": "your-openai-api-key",
176
190
  },
@@ -190,7 +204,7 @@ config = {
190
204
 
191
205
  solana_agent = SolanaAgent(config=config)
192
206
 
193
- audio_content = audio_file.read()
207
+ audio_content = await audio_file.read()
194
208
 
195
209
  async for response in solana_agent.process("user123", audio_content, output_format="audio", audio_voice="nova", audio_input_format="webm", audio_output_format="aac"):
196
210
  print(response, end="")
@@ -202,12 +216,6 @@ async for response in solana_agent.process("user123", audio_content, output_form
202
216
  from solana_agent import SolanaAgent
203
217
 
204
218
  config = {
205
- "grok": {
206
- "api_key": "your-grok-api-key",
207
- },
208
- "gemini": {
209
- "api_key": "your-gemini-api-key",
210
- },
211
219
  "openai": {
212
220
  "api_key": "your-openai-api-key",
213
221
  },
@@ -237,12 +245,6 @@ async for response in solana_agent.process("user123", "What is the latest news o
237
245
  from solana_agent import SolanaAgent
238
246
 
239
247
  config = {
240
- "grok": {
241
- "api_key": "your-grok-api-key",
242
- },
243
- "gemini": {
244
- "api_key": "your-gemini-api-key",
245
- },
246
248
  "openai": {
247
249
  "api_key": "your-openai-api-key",
248
250
  },
@@ -262,7 +264,7 @@ config = {
262
264
 
263
265
  solana_agent = SolanaAgent(config=config)
264
266
 
265
- audio_content = audio_file.read()
267
+ audio_content = await audio_file.read()
266
268
 
267
269
  async for response in solana_agent.process("user123", audio_content, audio_input_format="aac"):
268
270
  print(response, end="")
@@ -309,6 +311,138 @@ config = {
309
311
  }
310
312
  ```
311
313
 
314
+ ### Gemini
315
+
316
+ This allows Gemini to replace OpenAI for agent and router.
317
+
318
+ ```python
319
+ config = {
320
+ "gemini": {
321
+ "api_key": "your-gemini-api-key",
322
+ },
323
+ }
324
+ ```
325
+
326
+ ### Grok
327
+
328
+ This allows Grok to replace OpenAI (or Gemini) for agent.
329
+
330
+ ```python
331
+ config = {
332
+ "grok": {
333
+ "api_key": "your-grok-api-key",
334
+ },
335
+ }
336
+ ```
337
+
338
+ ### Knowledge Base
339
+
340
+ The Knowledge Base (KB) is meant to store text values and/or small PDFs.
341
+
342
+ ```python
343
+ config = {
344
+ "knowledge_base": {
345
+ "pinecone": {
346
+ "api_key": "your-pinecone-api-key",
347
+ "index_name": "your-pinecone-index-name",
348
+ }
349
+ },
350
+ "mongo": {
351
+ "connection_string": "your-mongo-connection-string",
352
+ "database": "your-database-name"
353
+ },
354
+ }
355
+ ```
356
+
357
+ #### Example for KB (text)
358
+
359
+ ```python
360
+ from solana_agent import SolanaAgent
361
+
362
+ config = {
363
+ "openai": {
364
+ "api_key": "your-openai-api-key",
365
+ },
366
+ "knowledge_base": {
367
+ "pinecone": {
368
+ "api_key": "your-pinecone-api-key",
369
+ "index_name": "your-pinecone-index-name",
370
+ }
371
+ },
372
+ "mongo": {
373
+ "connection_string": "your-mongo-connection-string",
374
+ "database": "your-database-name"
375
+ },
376
+ "agents": [
377
+ {
378
+ "name": "kb_expert",
379
+ "instructions": "You answer questions based on the provided knowledge base documents.",
380
+ "specialization": "Company Knowledge",
381
+ }
382
+ ]
383
+ }
384
+
385
+ solana_agent = SolanaAgent(config=config)
386
+
387
+ doc_text = "Solana Agent is a Python framework for building multi-agent AI systems."
388
+ doc_metadata = {
389
+ "source": "internal_docs",
390
+ "version": "1.0",
391
+ "tags": ["framework", "python", "ai"]
392
+ }
393
+ await solana_agent.kb_add_document(text=doc_text, metadata=doc_metadata)
394
+
395
+ async for response in solana_agent.process("user123", "What is Solana Agent?"):
396
+ print(response, end="")
397
+ ```
398
+
399
+ #### Example for KB (pdf)
400
+
401
+ ```python
402
+ from solana_agent import SolanaAgent
403
+
404
+ config = {
405
+ "openai": {
406
+ "api_key": "your-openai-api-key",
407
+ },
408
+ "knowledge_base": {
409
+ "pinecone": {
410
+ "api_key": "your-pinecone-api-key",
411
+ "index_name": "your-pinecone-index-name",
412
+ }
413
+ },
414
+ "mongo": {
415
+ "connection_string": "your-mongo-connection-string",
416
+ "database": "your-database-name"
417
+ },
418
+ "agents": [
419
+ {
420
+ "name": "kb_expert",
421
+ "instructions": "You answer questions based on the provided knowledge base documents.",
422
+ "specialization": "Company Knowledge",
423
+ }
424
+ ]
425
+ }
426
+
427
+ solana_agent = SolanaAgent(config=config)
428
+
429
+ pdf_bytes = await pdf_file.read()
430
+
431
+ pdf_metadata = {
432
+ "source": "annual_report_2024.pdf",
433
+ "year": 2024,
434
+ "tags": ["finance", "report"]
435
+ }
436
+
437
+ await solana_agent.kb_add_pdf_document(
438
+ pdf_data=pdf_bytes,
439
+ metadata=pdf_metadata,
440
+ )
441
+
442
+ async for response in solana_agent.process("user123", "Summarize the annual report for 2024."):
443
+ print(response, end="")
444
+ ```
445
+
312
446
  ## Tools
313
447
 
314
448
  Tools can be used from plugins like Solana Agent Kit (sakit) or via inline tools. Tools available via plugins integrate automatically with Solana Agent.
@@ -326,12 +460,6 @@ Tools can be used from plugins like Solana Agent Kit (sakit) or via inline tools
326
460
  from solana_agent import SolanaAgent
327
461
 
328
462
  config = {
329
- "grok": {
330
- "api_key": "your-grok-api-key",
331
- },
332
- "gemini": {
333
- "api_key": "your-gemini-api-key",
334
- },
335
463
  "openai": {
336
464
  "api_key": "your-openai-api-key",
337
465
  },
@@ -414,12 +542,6 @@ class TestTool(Tool):
414
542
  }
415
543
 
416
544
  config = {
417
- "grok": {
418
- "api_key": "your-grok-api-key",
419
- },
420
- "gemini": {
421
- "api_key": "your-gemini-api-key",
422
- },
423
545
  "openai": {
424
546
  "api_key": "your-openai-api-key",
425
547
  },
@@ -447,24 +569,14 @@ async for response in solana_agent.process("user123", "What are the latest AI de
447
569
  print(response, end="")
448
570
  ```
449
571
 
450
- ## Agent Training
451
-
452
- Many use cases for Solana Agent require training your agents on your company data.
572
+ ## Advanced Customization
453
573
 
454
- This can be accomplished via runtime prompt injection. Integrations that work well with this method are vector stores like Pinecone and FAQs.
455
-
456
- This knowledge is accessible to all your AI agents.
574
+ ### Runtime Prompt Injection
457
575
 
458
576
  ```python
459
577
  from solana_agent import SolanaAgent
460
578
 
461
579
  config = {
462
- "grok": {
463
- "api_key": "your-grok-api-key",
464
- },
465
- "gemini": {
466
- "api_key": "your-gemini-api-key",
467
- },
468
580
  "openai": {
469
581
  "api_key": "your-openai-api-key",
470
582
  },
@@ -483,7 +595,7 @@ async for response in solana_agent.process("user123", "How do replace the latch
483
595
  print(response, end="")
484
596
  ```
485
597
 
486
- ## Custom Routing
598
+ ### Custom Routing
487
599
 
488
600
  In advanced cases like implementing a ticketing system on-top of Solana Agent - you can use your own router.
489
601
 
@@ -492,12 +604,6 @@ from solana_agent import SolanaAgent
492
604
  from solana_agent.interfaces.services.routing import RoutingService as RoutingServiceInterface
493
605
 
494
606
  config = {
495
- "grok": {
496
- "api_key": "your-grok-api-key",
497
- },
498
- "gemini": {
499
- "api_key": "your-gemini-api-key",
500
- },
501
607
  "openai": {
502
608
  "api_key": "your-openai-api-key",
503
609
  },
@@ -575,3 +681,4 @@ To run the test suite locally run `poetry run pytest --cov=solana_agent --cov-re
575
681
  ## License
576
682
 
577
683
  This project is licensed under the MIT License - see the LICENSE file for details.
684
+