solana-agent 28.3.0__tar.gz → 28.3.2__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.0/README.md → solana_agent-28.3.2/PKG-INFO +95 -0
  2. solana_agent-28.3.0/PKG-INFO → solana_agent-28.3.2/README.md +59 -36
  3. {solana_agent-28.3.0 → solana_agent-28.3.2}/pyproject.toml +15 -15
  4. {solana_agent-28.3.0 → solana_agent-28.3.2}/LICENSE +0 -0
  5. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/__init__.py +0 -0
  6. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/adapters/__init__.py +0 -0
  7. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/adapters/mongodb_adapter.py +0 -0
  8. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/adapters/openai_adapter.py +0 -0
  9. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/adapters/pinecone_adapter.py +0 -0
  10. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/cli.py +0 -0
  11. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/client/__init__.py +0 -0
  12. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/client/solana_agent.py +0 -0
  13. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/domains/__init__.py +0 -0
  14. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/domains/agent.py +0 -0
  15. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/domains/routing.py +0 -0
  16. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/factories/__init__.py +0 -0
  17. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/factories/agent_factory.py +0 -0
  18. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/guardrails/pii.py +0 -0
  19. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/interfaces/__init__.py +0 -0
  20. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/interfaces/client/client.py +0 -0
  21. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/interfaces/guardrails/guardrails.py +0 -0
  22. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/interfaces/plugins/plugins.py +0 -0
  23. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/interfaces/providers/data_storage.py +0 -0
  24. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/interfaces/providers/llm.py +0 -0
  25. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/interfaces/providers/memory.py +0 -0
  26. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/interfaces/providers/vector_storage.py +0 -0
  27. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/interfaces/services/agent.py +0 -0
  28. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/interfaces/services/knowledge_base.py +0 -0
  29. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/interfaces/services/query.py +0 -0
  30. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/interfaces/services/routing.py +0 -0
  31. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/plugins/__init__.py +0 -0
  32. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/plugins/manager.py +0 -0
  33. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/plugins/registry.py +0 -0
  34. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/plugins/tools/__init__.py +0 -0
  35. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/plugins/tools/auto_tool.py +0 -0
  36. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/repositories/__init__.py +0 -0
  37. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/repositories/memory.py +0 -0
  38. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/services/__init__.py +0 -0
  39. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/services/agent.py +0 -0
  40. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/services/knowledge_base.py +0 -0
  41. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/services/query.py +0 -0
  42. {solana_agent-28.3.0 → solana_agent-28.3.2}/solana_agent/services/routing.py +0 -0
@@ -1,3 +1,38 @@
1
+ Metadata-Version: 2.3
2
+ Name: solana-agent
3
+ Version: 28.3.2
4
+ Summary: AI Agents for Solana
5
+ License: MIT
6
+ Keywords: solana,solana ai,solana agent,ai,ai agent,ai agents
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)
18
+ Requires-Dist: llama-index-core (==0.12.32)
19
+ Requires-Dist: llama-index-embeddings-openai (==0.3.1)
20
+ Requires-Dist: logfire (==3.14.1)
21
+ Requires-Dist: openai (==1.76.2)
22
+ Requires-Dist: pillow (==11.2.1)
23
+ Requires-Dist: pinecone (==6.0.2)
24
+ Requires-Dist: pydantic (>=2)
25
+ Requires-Dist: pymongo (==4.12.1)
26
+ Requires-Dist: pypdf (==5.4.0)
27
+ Requires-Dist: rich (>=13,<14.0)
28
+ Requires-Dist: scrubadub (==2.0.1)
29
+ Requires-Dist: typer (==0.15.3)
30
+ Requires-Dist: zep-cloud (==2.11.0)
31
+ Project-URL: Documentation, https://docs.solana-agent.com
32
+ Project-URL: Homepage, https://solana-agent.com
33
+ Project-URL: Repository, https://github.com/truemagic-coder/solana-agent
34
+ Description-Content-Type: text/markdown
35
+
1
36
  # Solana Agent
2
37
 
3
38
  [![PyPI - Version](https://img.shields.io/pypi/v/solana-agent)](https://pypi.org/project/solana-agent/)
@@ -29,9 +64,11 @@ Build your AI agents in three lines of code!
29
64
  * Business Alignment
30
65
  * Extensible Tooling
31
66
  * Automatic Tool Workflows
67
+ * Autonomous Operation
32
68
  * Knowledge Base
33
69
  * MCP Support
34
70
  * Guardrails
71
+ * Image Generation
35
72
  * Pydantic Logfire
36
73
  * Tested & Secure
37
74
  * Built in Python
@@ -56,7 +93,9 @@ Build your AI agents in three lines of code!
56
93
  * Assigned tools are utilized by agents automatically and effectively
57
94
  * Integrated Knowledge Base with semantic search and automatic PDF chunking
58
95
  * Input and output guardrails for content filtering, safety, and data sanitization
96
+ * Generate custom images based on text prompts with storage on S3 compatible services
59
97
  * Automatic sequential tool workflows allowing agents to chain multiple tools
98
+ * Combine with event-driven systems to create autonomous agents
60
99
 
61
100
  ## Stack
62
101
 
@@ -78,6 +117,7 @@ Build your AI agents in three lines of code!
78
117
  * [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)
79
118
  * [tts-1](https://platform.openai.com/docs/models/tts-1) (audio TTS)
80
119
  * [gpt-4o-mini-transcribe](https://platform.openai.com/docs/models/gpt-4o-mini-transcribe) (audio transcription)
120
+ * [gpt-image-1](https://platform.openai.com/docs/models/gpt-image-1) (image generation)
81
121
 
82
122
  ## Installation
83
123
 
@@ -568,6 +608,8 @@ class MyOutputGuardrail(OutputGuardrail):
568
608
 
569
609
  ## Tools
570
610
 
611
+ Tools empower agents to interact with external systems, fetch data, or perform actions. They can be used reactively within a user conversation or proactively when an agent is triggered autonomously.
612
+
571
613
  Tools can be used from plugins like Solana Agent Kit (sakit) or via inline tools. Tools available via plugins integrate automatically with Solana Agent.
572
614
 
573
615
  * Agents can use multiple tools per response and should apply the right sequential order (like send an email to bob@bob.com with the latest news on Solana)
@@ -670,6 +712,45 @@ async for response in solana_agent.process("user123", "Send an email to bob@bob.
670
712
  print(response, end="")
671
713
  ```
672
714
 
715
+ ### Image Generation
716
+
717
+ Generate images using OpenAI's `gpt-image-1` and upload them to S3-compatible storage.
718
+
719
+ `pip install sakit`
720
+
721
+ ```python
722
+ from solana_agent import SolanaAgent
723
+
724
+ config = {
725
+ "openai": {
726
+ "api_key": "your-openai-api-key" # Required: Your OpenAI API key
727
+ },
728
+ "tools": {
729
+ "image_gen": {
730
+ "s3_endpoint_url": "https://your-s3-endpoint.com", # Required: e.g., https://nyc3.digitaloceanspaces.com
731
+ "s3_access_key_id": "YOUR_S3_ACCESS_KEY", # Required: Your S3 access key ID
732
+ "s3_secret_access_key": "YOUR_S3_SECRET_KEY", # Required: Your S3 secret access key
733
+ "s3_bucket_name": "your-bucket-name", # Required: The name of your S3 bucket
734
+ "s3_region_name": "your-region", # Optional: e.g., "nyc3", needed by some providers
735
+ "s3_public_url_base": "https://your-cdn-or-bucket-url.com/", # Optional: Custom base URL for public links (include trailing slash). If omitted, a standard URL is constructed.
736
+ }
737
+ },
738
+ "agents": [
739
+ {
740
+ "name": "image_creator",
741
+ "instructions": "You are a creative assistant that generates images based on user descriptions. Use the image_gen tool to create and store the image.",
742
+ "specialization": "Image generation and storage",
743
+ "tools": ["image_gen"], # Enable the tool for this agent
744
+ }
745
+ ]
746
+ }
747
+
748
+ solana_agent = SolanaAgent(config=config)
749
+
750
+ async for response in solana_agent.process("user123", "Generate an image of a smiling unicorn!"):
751
+ print(response, end="")
752
+ ```
753
+
673
754
  ### Inline Tool Example
674
755
 
675
756
  ```python
@@ -750,6 +831,19 @@ async for response in solana_agent.process("user123", "What are the latest AI de
750
831
  print(response, end="")
751
832
  ```
752
833
 
834
+ ## Autonomous Operation & Event-Driven Agents
835
+
836
+ While Solana Agent facilitates request-response interactions, the underlying architecture supports building autonomous agents. You can achieve autonomy by orchestrating calls based on external triggers rather than direct user input.
837
+
838
+ **Key Concepts:**
839
+
840
+ * **External Triggers:** Use schedulers like cron, message queues (RabbitMQ, Kafka), monitoring systems, webhooks, or other event sources to initiate agent actions.
841
+ * **Programmatic Calls:** Instead of a user typing a message, your triggering system calls with a specific message (acting as instructions or data for the task) and potentially a dedicated user representing the autonomous process.
842
+ * **Tool-Centric Tasks:** Autonomous agents often focus on executing specific tools. The prompt can instruct the agent to use a particular tool with given parameters derived from the triggering event.
843
+ * **Example Scenario:** An agent could be triggered hourly by a scheduler. The `message` could be "Check the SOL balance for wallet X using the `solana` tool." The agent executes the tool, and the result could be logged or trigger another tool (e.g., using `mcp` to send an alert if the balance is low).
844
+
845
+ By combining Solana Agent's agent definitions, tool integration, and routing with external orchestration, you can create sophisticated autonomous systems.
846
+
753
847
  ## Advanced Customization
754
848
 
755
849
  ### Runtime Prompt Injection
@@ -862,3 +956,4 @@ To run the test suite locally run `poetry run pytest --cov=solana_agent --cov-re
862
956
  ## License
863
957
 
864
958
  This project is licensed under the MIT License - see the LICENSE file for details.
959
+
@@ -1,38 +1,3 @@
1
- Metadata-Version: 2.3
2
- Name: solana-agent
3
- Version: 28.3.0
4
- Summary: AI Agents for Solana
5
- License: MIT
6
- Keywords: solana,solana ai,solana agent,ai,ai agent,ai agents
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.32,<0.13.0)
19
- Requires-Dist: llama-index-embeddings-openai (>=0.3.1,<0.4.0)
20
- Requires-Dist: logfire (>=3.14.0,<4.0.0)
21
- Requires-Dist: openai (>=1.75.0,<2.0.0)
22
- Requires-Dist: pillow (>=11.2.1,<12.0.0)
23
- Requires-Dist: pinecone (>=6.0.2,<7.0.0)
24
- Requires-Dist: pydantic (>=2)
25
- Requires-Dist: pymongo (>=4.12.0,<5.0.0)
26
- Requires-Dist: pypdf (>=5.4.0,<6.0.0)
27
- Requires-Dist: rich (>=13)
28
- Requires-Dist: scrubadub (>=2.0.1,<3.0.0)
29
- Requires-Dist: typer (>=0.15.2,<0.16.0)
30
- Requires-Dist: zep-cloud (>=2.10.2,<3.0.0)
31
- Project-URL: Documentation, https://docs.solana-agent.com
32
- Project-URL: Homepage, https://solana-agent.com
33
- Project-URL: Repository, https://github.com/truemagic-coder/solana-agent
34
- Description-Content-Type: text/markdown
35
-
36
1
  # Solana Agent
37
2
 
38
3
  [![PyPI - Version](https://img.shields.io/pypi/v/solana-agent)](https://pypi.org/project/solana-agent/)
@@ -64,9 +29,11 @@ Build your AI agents in three lines of code!
64
29
  * Business Alignment
65
30
  * Extensible Tooling
66
31
  * Automatic Tool Workflows
32
+ * Autonomous Operation
67
33
  * Knowledge Base
68
34
  * MCP Support
69
35
  * Guardrails
36
+ * Image Generation
70
37
  * Pydantic Logfire
71
38
  * Tested & Secure
72
39
  * Built in Python
@@ -91,7 +58,9 @@ Build your AI agents in three lines of code!
91
58
  * Assigned tools are utilized by agents automatically and effectively
92
59
  * Integrated Knowledge Base with semantic search and automatic PDF chunking
93
60
  * Input and output guardrails for content filtering, safety, and data sanitization
61
+ * Generate custom images based on text prompts with storage on S3 compatible services
94
62
  * Automatic sequential tool workflows allowing agents to chain multiple tools
63
+ * Combine with event-driven systems to create autonomous agents
95
64
 
96
65
  ## Stack
97
66
 
@@ -113,6 +82,7 @@ Build your AI agents in three lines of code!
113
82
  * [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)
114
83
  * [tts-1](https://platform.openai.com/docs/models/tts-1) (audio TTS)
115
84
  * [gpt-4o-mini-transcribe](https://platform.openai.com/docs/models/gpt-4o-mini-transcribe) (audio transcription)
85
+ * [gpt-image-1](https://platform.openai.com/docs/models/gpt-image-1) (image generation)
116
86
 
117
87
  ## Installation
118
88
 
@@ -603,6 +573,8 @@ class MyOutputGuardrail(OutputGuardrail):
603
573
 
604
574
  ## Tools
605
575
 
576
+ Tools empower agents to interact with external systems, fetch data, or perform actions. They can be used reactively within a user conversation or proactively when an agent is triggered autonomously.
577
+
606
578
  Tools can be used from plugins like Solana Agent Kit (sakit) or via inline tools. Tools available via plugins integrate automatically with Solana Agent.
607
579
 
608
580
  * Agents can use multiple tools per response and should apply the right sequential order (like send an email to bob@bob.com with the latest news on Solana)
@@ -705,6 +677,45 @@ async for response in solana_agent.process("user123", "Send an email to bob@bob.
705
677
  print(response, end="")
706
678
  ```
707
679
 
680
+ ### Image Generation
681
+
682
+ Generate images using OpenAI's `gpt-image-1` and upload them to S3-compatible storage.
683
+
684
+ `pip install sakit`
685
+
686
+ ```python
687
+ from solana_agent import SolanaAgent
688
+
689
+ config = {
690
+ "openai": {
691
+ "api_key": "your-openai-api-key" # Required: Your OpenAI API key
692
+ },
693
+ "tools": {
694
+ "image_gen": {
695
+ "s3_endpoint_url": "https://your-s3-endpoint.com", # Required: e.g., https://nyc3.digitaloceanspaces.com
696
+ "s3_access_key_id": "YOUR_S3_ACCESS_KEY", # Required: Your S3 access key ID
697
+ "s3_secret_access_key": "YOUR_S3_SECRET_KEY", # Required: Your S3 secret access key
698
+ "s3_bucket_name": "your-bucket-name", # Required: The name of your S3 bucket
699
+ "s3_region_name": "your-region", # Optional: e.g., "nyc3", needed by some providers
700
+ "s3_public_url_base": "https://your-cdn-or-bucket-url.com/", # Optional: Custom base URL for public links (include trailing slash). If omitted, a standard URL is constructed.
701
+ }
702
+ },
703
+ "agents": [
704
+ {
705
+ "name": "image_creator",
706
+ "instructions": "You are a creative assistant that generates images based on user descriptions. Use the image_gen tool to create and store the image.",
707
+ "specialization": "Image generation and storage",
708
+ "tools": ["image_gen"], # Enable the tool for this agent
709
+ }
710
+ ]
711
+ }
712
+
713
+ solana_agent = SolanaAgent(config=config)
714
+
715
+ async for response in solana_agent.process("user123", "Generate an image of a smiling unicorn!"):
716
+ print(response, end="")
717
+ ```
718
+
708
719
  ### Inline Tool Example
709
720
 
710
721
  ```python
@@ -785,6 +796,19 @@ async for response in solana_agent.process("user123", "What are the latest AI de
785
796
  print(response, end="")
786
797
  ```
787
798
 
799
+ ## Autonomous Operation & Event-Driven Agents
800
+
801
+ While Solana Agent facilitates request-response interactions, the underlying architecture supports building autonomous agents. You can achieve autonomy by orchestrating calls based on external triggers rather than direct user input.
802
+
803
+ **Key Concepts:**
804
+
805
+ * **External Triggers:** Use schedulers like cron, message queues (RabbitMQ, Kafka), monitoring systems, webhooks, or other event sources to initiate agent actions.
806
+ * **Programmatic Calls:** Instead of a user typing a message, your triggering system calls with a specific message (acting as instructions or data for the task) and potentially a dedicated user representing the autonomous process.
807
+ * **Tool-Centric Tasks:** Autonomous agents often focus on executing specific tools. The prompt can instruct the agent to use a particular tool with given parameters derived from the triggering event.
808
+ * **Example Scenario:** An agent could be triggered hourly by a scheduler. The `message` could be "Check the SOL balance for wallet X using the `solana` tool." The agent executes the tool, and the result could be logged or trigger another tool (e.g., using `mcp` to send an alert if the balance is low).
809
+
810
+ By combining Solana Agent's agent definitions, tool integration, and routing with external orchestration, you can create sophisticated autonomous systems.
811
+
788
812
  ## Advanced Customization
789
813
 
790
814
  ### Runtime Prompt Injection
@@ -897,4 +921,3 @@ To run the test suite locally run `poetry run pytest --cov=solana_agent --cov-re
897
921
  ## License
898
922
 
899
923
  This project is licensed under the MIT License - see the LICENSE file for details.
900
-
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "solana-agent"
3
- version = "28.3.0"
3
+ version = "28.3.2"
4
4
  description = "AI Agents for Solana"
5
5
  authors = ["Bevan Hunt <bevan@bevanhunt.com>"]
6
6
  license = "MIT"
@@ -24,20 +24,20 @@ python_paths = [".", "tests"]
24
24
 
25
25
  [tool.poetry.dependencies]
26
26
  python = ">=3.12,<4.0"
27
- openai = "^1.75.0"
27
+ openai = "1.76.2"
28
28
  pydantic = ">=2"
29
- pymongo = "^4.12.0"
30
- zep-cloud = "^2.10.2"
31
- instructor = "^1.7.9"
32
- pinecone = "^6.0.2"
33
- llama-index-core = "^0.12.32"
34
- llama-index-embeddings-openai = "^0.3.1"
35
- pypdf = "^5.4.0"
36
- scrubadub = "^2.0.1"
37
- logfire = "^3.14.0"
38
- typer = "^0.15.2"
39
- rich = ">=13"
40
- pillow = "^11.2.1"
29
+ pymongo = "4.12.1"
30
+ zep-cloud = "2.11.0"
31
+ instructor = "1.7.9"
32
+ pinecone = "6.0.2"
33
+ llama-index-core = "0.12.32"
34
+ llama-index-embeddings-openai = "0.3.1"
35
+ pypdf = "5.4.0"
36
+ scrubadub = "2.0.1"
37
+ logfire = "3.14.1"
38
+ typer = "0.15.3"
39
+ rich = ">=13,<14.0"
40
+ pillow = "11.2.1"
41
41
 
42
42
  [tool.poetry.group.dev.dependencies]
43
43
  pytest = "^8.3.5"
@@ -50,7 +50,7 @@ sphinx-rtd-theme = "^3.0.2"
50
50
  myst-parser = "^4.0.1"
51
51
  sphinx-autobuild = "^2024.10.3"
52
52
  mongomock = "^4.3.0"
53
- ruff = "^0.11.6"
53
+ ruff = "^0.11.7"
54
54
 
55
55
  [tool.poetry.scripts]
56
56
  solana-agent = "solana_agent.cli:app"
File without changes