solana-agent 14.0.0__py3-none-any.whl → 14.0.2__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.
@@ -9,9 +9,10 @@ import importlib.util
9
9
  from typing import AsyncGenerator, Dict, Any
10
10
 
11
11
  from solana_agent.factories.agent_factory import SolanaAgentFactory
12
+ from solana_agent.interfaces.client.client import SolanaAgent
12
13
 
13
14
 
14
- class SolanaAgent:
15
+ class SolanaAgent(SolanaAgent):
15
16
  """Simplified client interface for interacting with the agent system."""
16
17
 
17
18
  def __init__(self, config_path: str = None, config: Dict[str, Any] = None):
@@ -56,7 +57,7 @@ class SolanaAgent:
56
57
  user_id: str,
57
58
  page_num: int = 1,
58
59
  page_size: int = 20,
59
- sort_order: str = "asc" # "asc" for oldest-first, "desc" for newest-first
60
+ sort_order: str = "desc" # "asc" for oldest-first, "desc" for newest-first
60
61
  ) -> Dict[str, Any]:
61
62
  """
62
63
  Get paginated message history for a user.
@@ -0,0 +1,22 @@
1
+ from abc import ABC, abstractmethod
2
+ from typing import Any, AsyncGenerator, Dict
3
+
4
+
5
+ class SolanaAgent(ABC):
6
+ """Interface for the Solana agent system."""
7
+
8
+ @abstractmethod
9
+ async def process(self, user_id: str, message: str) -> AsyncGenerator[str, None]:
10
+ """Process a user message and return the response stream."""
11
+ pass
12
+
13
+ @abstractmethod
14
+ async def get_user_history(
15
+ self,
16
+ user_id: str,
17
+ page_num: int = 1,
18
+ page_size: int = 20,
19
+ sort_order: str = "desc" # "asc" for oldest-first, "desc" for newest-first
20
+ ) -> Dict[str, Any]:
21
+ """Get paginated message history for a user."""
22
+ pass
@@ -1,5 +1,5 @@
1
1
  from abc import ABC, abstractmethod
2
- from typing import AsyncGenerator
2
+ from typing import Any, AsyncGenerator, Dict
3
3
 
4
4
 
5
5
  class QueryService(ABC):
@@ -9,3 +9,14 @@ class QueryService(ABC):
9
9
  async def process(self, user_id: str, query: str) -> AsyncGenerator[str, None]:
10
10
  """Process a query from a user."""
11
11
  pass
12
+
13
+ @abstractmethod
14
+ async def get_user_history(
15
+ self,
16
+ user_id: str,
17
+ page_num: int = 1,
18
+ page_size: int = 20,
19
+ sort_order: str = "desc" # "asc" for oldest-first, "desc" for newest-first
20
+ ) -> Dict[str, Any]:
21
+ """Get paginated message history for a user."""
22
+ pass
@@ -207,6 +207,9 @@ class AgentService(AgentServiceInterface):
207
207
  if tool_usage_prompt:
208
208
  system_prompt = f"{system_prompt}\n\n{tool_usage_prompt}"
209
209
 
210
+ # Add User ID context
211
+ system_prompt += f"\n\n User ID: {user_id}"
212
+
210
213
  # Add memory context
211
214
  if memory_context:
212
215
  system_prompt += f"\n\n Memory Context: {memory_context}"
@@ -90,7 +90,7 @@ class QueryService(QueryServiceInterface):
90
90
  user_id: str,
91
91
  page_num: int = 1,
92
92
  page_size: int = 20,
93
- sort_order: str = "asc" # "asc" for oldest-first, "desc" for newest-first
93
+ sort_order: str = "desc" # "asc" for oldest-first, "desc" for newest-first
94
94
  ) -> Dict[str, Any]:
95
95
  """Get paginated message history for a user.
96
96
 
@@ -146,12 +146,15 @@ class QueryService(QueryServiceInterface):
146
146
  # Format the results
147
147
  formatted_conversations = []
148
148
  for conv in conversations:
149
+ # Convert datetime to Unix timestamp (seconds since epoch)
150
+ timestamp = int(conv.get("timestamp").timestamp()
151
+ ) if conv.get("timestamp") else None
152
+
149
153
  formatted_conversations.append({
150
154
  "id": str(conv.get("_id")),
151
155
  "user_message": conv.get("user_message"),
152
156
  "assistant_message": conv.get("assistant_message"),
153
- "timestamp": conv.get("timestamp").isoformat()
154
- if conv.get("timestamp") else None
157
+ "timestamp": timestamp,
155
158
  })
156
159
 
157
160
  return {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: solana-agent
3
- Version: 14.0.0
3
+ Version: 14.0.2
4
4
  Summary: The Future of Work
5
5
  License: MIT
6
6
  Keywords: ai,openai,ai agents,agi
@@ -13,14 +13,9 @@ Classifier: Programming Language :: Python :: 3.12
13
13
  Classifier: Programming Language :: Python :: 3.13
14
14
  Classifier: Programming Language :: Python :: 3 :: Only
15
15
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
16
- Requires-Dist: ntplib (>=0.4.0,<0.5.0)
17
- Requires-Dist: openai (>=1.67.0,<2.0.0)
18
- Requires-Dist: pandas (>=2.2.3,<3.0.0)
19
- Requires-Dist: pinecone (>=6.0.2,<7.0.0)
16
+ Requires-Dist: openai (>=1.68.0,<2.0.0)
20
17
  Requires-Dist: pydantic (>=2.10.6,<3.0.0)
21
18
  Requires-Dist: pymongo (>=4.11.3,<5.0.0)
22
- Requires-Dist: qdrant-client (>=1.13.3,<2.0.0)
23
- Requires-Dist: requests (>=2.32.3,<3.0.0)
24
19
  Requires-Dist: zep-cloud (>=2.7.0,<3.0.0)
25
20
  Requires-Dist: zep-python (>=2.0.2,<3.0.0)
26
21
  Project-URL: Repository, https://github.com/truemagic-coder/solana-agent
@@ -29,6 +24,7 @@ Description-Content-Type: text/markdown
29
24
  # Solana Agent
30
25
 
31
26
  [![PyPI - Version](https://img.shields.io/pypi/v/solana-agent)](https://pypi.org/project/solana-agent/)
27
+ [![PyPI - Downloads](https://img.shields.io/pypi/dm/solana-agent?color=yellow)](https://pypi.org/project/solana-agent/)
32
28
  [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
33
29
  [![Python 3.12+](https://img.shields.io/badge/python-3.12+-orange.svg)](https://www.python.org/downloads/)
34
30
  [![codecov](https://img.shields.io/codecov/c/github/truemagic-coder/solana-agent/main.svg)](https://codecov.io/gh/truemagic-coder/solana-agent)
@@ -36,13 +32,22 @@ Description-Content-Type: text/markdown
36
32
 
37
33
  ![Solana Agent Logo](https://dl.walletbubbles.com/solana-agent-logo.png?width=200)
38
34
 
39
- ## Technical Features
35
+ ## Features
40
36
 
41
37
  * Text streaming messages by AI Agents
38
+ * Conversational memory per user shared by all AI Agents
42
39
  * Routing based on AI Agent specializations
43
- * Built-in default Internet Search for AI Agents
40
+ * Built-in Internet Search for all AI Agents
41
+ * Organizational mission, values, goals, and guidance for all AI Agents
44
42
  * Robust AI Agent tool plugins based on standard python packages
45
43
 
44
+ ## Stack
45
+
46
+ * [Python](https://python.org) - programming language
47
+ * [OpenAI](https://openai.com) - LLMs
48
+ * [MongoDB](https://mongodb.com) - database
49
+ * [Zep](https://getzep.com) - conversational memory
50
+
46
51
  ## Installation
47
52
 
48
53
  You can install Solana Agent using pip:
@@ -107,7 +112,7 @@ async for response in solana_agent.process("user123", "What are the latest AI de
107
112
  print(response, end="")
108
113
  ```
109
114
 
110
- ## Solana Agent Kit (plugins collection)
115
+ ## Solana Agent Kit
111
116
 
112
117
  [Solana Agent Kit](https://github.com/truemagic-coder/solana-agent-kit)
113
118
 
@@ -3,20 +3,21 @@ solana_agent/adapters/__init__.py,sha256=tiEEuuy0NF3ngc_tGEcRTt71zVI58v3dYY9RvMr
3
3
  solana_agent/adapters/llm_adapter.py,sha256=-MmQL71JlNJeWr16a-qZ5OzTg1_69ewgAR9ZSwXpsbw,4326
4
4
  solana_agent/adapters/mongodb_adapter.py,sha256=zvcIZ61zx45cwfjMimXC2RV_D_s6sL5b2Dz6H3HCgFc,2456
5
5
  solana_agent/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- solana_agent/client/solana_agent.py,sha256=SDspEitajVL3q2C0zlVoeE6iGTC4vWSd5vcRLZFUhXg,2600
6
+ solana_agent/client/solana_agent.py,sha256=Y2SRwysvUsW3_NM8dqURdabkmS1lMsiAKrPG9dtSQ4g,2676
7
7
  solana_agent/domains/__init__.py,sha256=HiC94wVPRy-QDJSSRywCRrhrFfTBeHjfi5z-QfZv46U,168
8
8
  solana_agent/domains/agents.py,sha256=S8OKtkUQ7npl8bZrSH64TZuu5bnwnMYXXx3IbKvJOuU,3005
9
9
  solana_agent/domains/routing.py,sha256=UDlgTjUoC9xIBVYu_dnf9-KG_bBgdEXAv_UtDOrYo0w,650
10
10
  solana_agent/factories/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  solana_agent/factories/agent_factory.py,sha256=yjB3G8ItXFH3DaoRf1BB1acPnL84Pd2pbqz5W03-5Jc,5711
12
12
  solana_agent/interfaces/__init__.py,sha256=IQs1WIM1FeKP1-kY2FEfyhol_dB-I-VAe2rD6jrVF6k,355
13
+ solana_agent/interfaces/client/client.py,sha256=SouFRSUhXK5qN88ln5anHnStrZfPJyY2cr5sVRRDBEw,668
13
14
  solana_agent/interfaces/plugins/plugins.py,sha256=TMmTXwHhmkdJpIhgADfrpGGGk7PHP7O9Qi89uA26uMI,3013
14
15
  solana_agent/interfaces/providers/data_storage.py,sha256=Qjui9ISvX_NtOUPTUyjPMNxDoYRpml-aMG8DZy_Qxzc,1509
15
16
  solana_agent/interfaces/providers/llm.py,sha256=y4OFj2Wq4XicMxArWsYBHSp6cFe3BcK9sCemfyaWV_A,887
16
17
  solana_agent/interfaces/providers/memory.py,sha256=oNOH8WZXVW8assDigIWZAWiwkxbpDiKupxA2RB6tQvQ,1010
17
18
  solana_agent/interfaces/repositories/agent.py,sha256=HZL5q7DoOj-qK5IDSShAJnu4_A75OR0xgJD_2W6Zr6k,820
18
19
  solana_agent/interfaces/services/agent.py,sha256=JHUVsxAnOsopiNilU_zDBAhJfQT_BFrtOczDL2atoZo,1407
19
- solana_agent/interfaces/services/query.py,sha256=6SILNgSIkUsCnhn6EqdmsfPFTieawGbNJq56a3TzgSA,307
20
+ solana_agent/interfaces/services/query.py,sha256=w2ZeAX3j0n7dfh5EtesWqEy4YZ-cqjI3EmR3lyGnyJs,641
20
21
  solana_agent/interfaces/services/routing.py,sha256=tKMK97m6U5I__F406sm60az4QInGLX_N3knc_AbMZ80,452
21
22
  solana_agent/plugins/__init__.py,sha256=coZdgJKq1ExOaj6qB810i3rEhbjdVlrkN76ozt_Ojgo,193
22
23
  solana_agent/plugins/manager.py,sha256=GWwhfMBn9THwVn7biOvVa25GLthCA1ilWIoDkt5hXNI,5084
@@ -27,10 +28,10 @@ solana_agent/repositories/__init__.py,sha256=fP83w83CGzXLnSdq-C5wbw9EhWTYtqE2lQT
27
28
  solana_agent/repositories/agent.py,sha256=7FTT3WvOaBacWme7d-qaOyqAlUhf9LVLXnIiPb16FDk,3188
28
29
  solana_agent/repositories/memory.py,sha256=0wgoa2bXhpgdBgn9-i9G10PB1bMGYObxcoY9Newll40,4742
29
30
  solana_agent/services/__init__.py,sha256=ab_NXJmwYUCmCrCzuTlZ47bJZINW0Y0F5jfQ9OovidU,163
30
- solana_agent/services/agent.py,sha256=-IKdDNvq-T_xEkOt7q2oG0xklL07_RUrc2NT1YIle9c,11426
31
- solana_agent/services/query.py,sha256=N8UULC7RrxxX-mQUjporduKj7auKV899n2B9Amol_ss,7767
31
+ solana_agent/services/agent.py,sha256=Z5b6aOuEAMw8CHjvQ__reG4b9P056hKquFisNzwzosg,11509
32
+ solana_agent/services/query.py,sha256=5_Py2t3p8oB4EVZZnbi7BezP9yigRe1EU9ZQ9AzQAog,7901
32
33
  solana_agent/services/routing.py,sha256=L3nZaMeX4ENYfHoc2KrOtfzhScCWfrXS5RRaUIJPwNY,4956
33
- solana_agent-14.0.0.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
34
- solana_agent-14.0.0.dist-info/METADATA,sha256=u_s6RqaKolKU180Z8LYehkw-5cuogb1XsB67a6d8aWo,4569
35
- solana_agent-14.0.0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
36
- solana_agent-14.0.0.dist-info/RECORD,,
34
+ solana_agent-14.0.2.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
35
+ solana_agent-14.0.2.dist-info/METADATA,sha256=8RG-LRrM9BBzXlb-159YvTacsao2BW4c7MgrutTY2ps,4774
36
+ solana_agent-14.0.2.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
37
+ solana_agent-14.0.2.dist-info/RECORD,,