solana-agent 29.1.2__tar.gz → 29.1.4__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.2/README.md → solana_agent-29.1.4/PKG-INFO +75 -1
  2. solana_agent-29.1.2/PKG-INFO → solana_agent-29.1.4/README.md +39 -37
  3. {solana_agent-29.1.2 → solana_agent-29.1.4}/pyproject.toml +10 -10
  4. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/repositories/memory.py +16 -1
  5. {solana_agent-29.1.2 → solana_agent-29.1.4}/LICENSE +0 -0
  6. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/__init__.py +0 -0
  7. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/adapters/__init__.py +0 -0
  8. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/adapters/mongodb_adapter.py +0 -0
  9. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/adapters/openai_adapter.py +0 -0
  10. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/adapters/pinecone_adapter.py +0 -0
  11. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/cli.py +0 -0
  12. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/client/__init__.py +0 -0
  13. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/client/solana_agent.py +0 -0
  14. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/domains/__init__.py +0 -0
  15. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/domains/agent.py +0 -0
  16. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/domains/routing.py +0 -0
  17. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/factories/__init__.py +0 -0
  18. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/factories/agent_factory.py +0 -0
  19. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/guardrails/pii.py +0 -0
  20. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/interfaces/__init__.py +0 -0
  21. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/interfaces/client/client.py +0 -0
  22. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/interfaces/guardrails/guardrails.py +0 -0
  23. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/interfaces/plugins/plugins.py +0 -0
  24. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/interfaces/providers/data_storage.py +0 -0
  25. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/interfaces/providers/llm.py +0 -0
  26. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/interfaces/providers/memory.py +0 -0
  27. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/interfaces/providers/vector_storage.py +0 -0
  28. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/interfaces/services/agent.py +0 -0
  29. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/interfaces/services/knowledge_base.py +0 -0
  30. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/interfaces/services/query.py +0 -0
  31. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/interfaces/services/routing.py +0 -0
  32. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/plugins/__init__.py +0 -0
  33. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/plugins/manager.py +0 -0
  34. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/plugins/registry.py +0 -0
  35. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/plugins/tools/__init__.py +0 -0
  36. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/plugins/tools/auto_tool.py +0 -0
  37. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/repositories/__init__.py +0 -0
  38. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/services/__init__.py +0 -0
  39. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/services/agent.py +0 -0
  40. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/services/knowledge_base.py +0 -0
  41. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/services/query.py +0 -0
  42. {solana_agent-29.1.2 → solana_agent-29.1.4}/solana_agent/services/routing.py +0 -0
@@ -1,3 +1,38 @@
1
+ Metadata-Version: 2.3
2
+ Name: solana-agent
3
+ Version: 29.1.4
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.8.2)
18
+ Requires-Dist: llama-index-core (==0.12.37)
19
+ Requires-Dist: llama-index-embeddings-openai (==0.3.1)
20
+ Requires-Dist: logfire (==3.16.0)
21
+ Requires-Dist: openai (==1.79.0)
22
+ Requires-Dist: pillow (==11.2.1)
23
+ Requires-Dist: pinecone (==6.0.2)
24
+ Requires-Dist: pydantic (>=2)
25
+ Requires-Dist: pymongo (==4.13.0)
26
+ Requires-Dist: pypdf (==5.5.0)
27
+ Requires-Dist: rich (>=13,<14.0)
28
+ Requires-Dist: scrubadub (==2.0.1)
29
+ Requires-Dist: typer (==0.15.4)
30
+ Requires-Dist: zep-cloud (==2.12.3)
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/)
@@ -725,7 +760,7 @@ from solana_agent import SolanaAgent
725
760
  config = {
726
761
  "tools": {
727
762
  "image_gen": {
728
- "provider": "grok", # Required: either "openai", "grok", or "gemini"
763
+ "provider": "openai", # Required: either "openai", "grok", or "gemini"
729
764
  "api_key": "your-api-key", # Required: your OpenAI or Grok or Gemini API key
730
765
  "s3_endpoint_url": "https://your-s3-endpoint.com", # Required: e.g., https://nyc3.digitaloceanspaces.com
731
766
  "s3_access_key_id": "YOUR_S3_ACCESS_KEY", # Required: Your S3 access key ID
@@ -751,6 +786,44 @@ async for response in solana_agent.process("user123", "Generate an image of a sm
751
786
  print(response, end="")
752
787
  ```
753
788
 
789
+ ### Nemo Agent
790
+
791
+ This plugin allows the agent to generate python programs using [Nemo Agent](https://nemo-agent.com) and uploads the files in a ZIP file to s3-compatible storage. It returns the public URL of the zip file.
792
+
793
+ This has been tested using [Cloudflare R2](https://developers.cloudflare.com/r2/).
794
+
795
+ ```python
796
+ from solana_agent import SolanaAgent
797
+
798
+ config = {
799
+ "tools": {
800
+ "nemo_agent": {
801
+ "provider": "openai", # Required: either "openai" or "gemini"
802
+ "api_key": "your-api-key", # Required: your OpenAI or Gemini API key
803
+ "s3_endpoint_url": "https://your-s3-endpoint.com", # Required: e.g., https://nyc3.digitaloceanspaces.com
804
+ "s3_access_key_id": "YOUR_S3_ACCESS_KEY", # Required: Your S3 access key ID
805
+ "s3_secret_access_key": "YOUR_S3_SECRET_KEY", # Required: Your S3 secret access key
806
+ "s3_bucket_name": "your-bucket-name", # Required: The name of your S3 bucket
807
+ "s3_region_name": "your-region", # Optional: e.g., "nyc3", needed by some providers
808
+ "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.
809
+ }
810
+ },
811
+ "agents": [
812
+ {
813
+ "name": "python_dev",
814
+ "instructions": "You are an expert Python Developer. You always use your nemo_agent tool to generate python code.",
815
+ "specialization": "Python Developer",
816
+ "tools": ["nemo_agent"], # Enable the tool for this agent
817
+ }
818
+ ]
819
+ }
820
+
821
+ solana_agent = SolanaAgent(config=config)
822
+
823
+ async for response in solana_agent.process("user123", "Generate an example leetcode medium in Python and give me the zip file."):
824
+ print(response, end="")
825
+ ```
826
+
754
827
  ### Inline Tool Example
755
828
 
756
829
  ```python
@@ -956,3 +1029,4 @@ To run the test suite locally run `poetry run pytest --cov=solana_agent --cov-re
956
1029
  ## License
957
1030
 
958
1031
  This project is licensed under the MIT License - see the LICENSE file for details.
1032
+
@@ -1,38 +1,3 @@
1
- Metadata-Version: 2.3
2
- Name: solana-agent
3
- Version: 29.1.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.77.0)
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.12.1)
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/)
@@ -760,7 +725,7 @@ from solana_agent import SolanaAgent
760
725
  config = {
761
726
  "tools": {
762
727
  "image_gen": {
763
- "provider": "grok", # Required: either "openai", "grok", or "gemini"
728
+ "provider": "openai", # Required: either "openai", "grok", or "gemini"
764
729
  "api_key": "your-api-key", # Required: your OpenAI or Grok or Gemini API key
765
730
  "s3_endpoint_url": "https://your-s3-endpoint.com", # Required: e.g., https://nyc3.digitaloceanspaces.com
766
731
  "s3_access_key_id": "YOUR_S3_ACCESS_KEY", # Required: Your S3 access key ID
@@ -786,6 +751,44 @@ async for response in solana_agent.process("user123", "Generate an image of a sm
786
751
  print(response, end="")
787
752
  ```
788
753
 
754
+ ### Nemo Agent
755
+
756
+ This plugin allows the agent to generate python programs using [Nemo Agent](https://nemo-agent.com) and uploads the files in a ZIP file to s3-compatible storage. It returns the public URL of the zip file.
757
+
758
+ This has been tested using [Cloudflare R2](https://developers.cloudflare.com/r2/).
759
+
760
+ ```python
761
+ from solana_agent import SolanaAgent
762
+
763
+ config = {
764
+ "tools": {
765
+ "nemo_agent": {
766
+ "provider": "openai", # Required: either "openai" or "gemini"
767
+ "api_key": "your-api-key", # Required: your OpenAI or Gemini API key
768
+ "s3_endpoint_url": "https://your-s3-endpoint.com", # Required: e.g., https://nyc3.digitaloceanspaces.com
769
+ "s3_access_key_id": "YOUR_S3_ACCESS_KEY", # Required: Your S3 access key ID
770
+ "s3_secret_access_key": "YOUR_S3_SECRET_KEY", # Required: Your S3 secret access key
771
+ "s3_bucket_name": "your-bucket-name", # Required: The name of your S3 bucket
772
+ "s3_region_name": "your-region", # Optional: e.g., "nyc3", needed by some providers
773
+ "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.
774
+ }
775
+ },
776
+ "agents": [
777
+ {
778
+ "name": "python_dev",
779
+ "instructions": "You are an expert Python Developer. You always use your nemo_agent tool to generate python code.",
780
+ "specialization": "Python Developer",
781
+ "tools": ["nemo_agent"], # Enable the tool for this agent
782
+ }
783
+ ]
784
+ }
785
+
786
+ solana_agent = SolanaAgent(config=config)
787
+
788
+ async for response in solana_agent.process("user123", "Generate an example leetcode medium in Python and give me the zip file."):
789
+ print(response, end="")
790
+ ```
791
+
789
792
  ### Inline Tool Example
790
793
 
791
794
  ```python
@@ -991,4 +994,3 @@ To run the test suite locally run `poetry run pytest --cov=solana_agent --cov-re
991
994
  ## License
992
995
 
993
996
  This project is licensed under the MIT License - see the LICENSE file for details.
994
-
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "solana-agent"
3
- version = "29.1.2"
3
+ version = "29.1.4"
4
4
  description = "AI Agents for Solana"
5
5
  authors = ["Bevan Hunt <bevan@bevanhunt.com>"]
6
6
  license = "MIT"
@@ -24,18 +24,18 @@ python_paths = [".", "tests"]
24
24
 
25
25
  [tool.poetry.dependencies]
26
26
  python = ">=3.12,<4.0"
27
- openai = "1.77.0"
27
+ openai = "1.79.0"
28
28
  pydantic = ">=2"
29
- pymongo = "4.12.1"
30
- zep-cloud = "2.12.1"
31
- instructor = "1.7.9"
29
+ pymongo = "4.13.0"
30
+ zep-cloud = "2.12.3"
31
+ instructor = "1.8.2"
32
32
  pinecone = "6.0.2"
33
- llama-index-core = "0.12.32"
33
+ llama-index-core = "0.12.37"
34
34
  llama-index-embeddings-openai = "0.3.1"
35
- pypdf = "5.4.0"
35
+ pypdf = "5.5.0"
36
36
  scrubadub = "2.0.1"
37
- logfire = "3.14.1"
38
- typer = "0.15.3"
37
+ logfire = "3.16.0"
38
+ typer = "0.15.4"
39
39
  rich = ">=13,<14.0"
40
40
  pillow = "11.2.1"
41
41
 
@@ -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.7"
53
+ ruff = "^0.11.9"
54
54
 
55
55
  [tool.poetry.scripts]
56
56
  solana-agent = "solana_agent.cli:app"
@@ -129,13 +129,28 @@ class MemoryRepository(MemoryProvider):
129
129
  return
130
130
 
131
131
  async def retrieve(self, user_id: str) -> str:
132
- """Retrieve memory context from Zep only."""
132
+ """Retrieve memory context from Zep and MongoDB."""
133
133
  try:
134
134
  memories = ""
135
135
  if self.zep:
136
136
  memory = await self.zep.memory.get(session_id=user_id)
137
137
  if memory and memory.context:
138
138
  memories = memory.context
139
+
140
+ if self.mongo:
141
+ query = {"user_id": user_id}
142
+ sort = [("timestamp", -1)]
143
+ limit = 1
144
+ skip = 0
145
+ mongo_memory = self.mongo.find(
146
+ self.collection, query, sort=sort, limit=limit, skip=skip
147
+ )
148
+ if mongo_memory:
149
+ for doc in mongo_memory:
150
+ user_message = doc.get("user_message")
151
+ assistant_message = doc.get("assistant_message")
152
+ if user_message and assistant_message:
153
+ memories += f"\nUser: {user_message}\nAssistant: {assistant_message}"
139
154
  return memories
140
155
 
141
156
  except Exception as e:
File without changes