solana-agent 22.0.11__py3-none-any.whl → 23.0.1__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.
@@ -56,7 +56,7 @@ class SolanaAgent(SolanaAgentInterface):
56
56
  "flac", "mp3", "mp4", "mpeg", "mpga", "m4a", "ogg", "wav", "webm"
57
57
  ] = "mp4",
58
58
  router: Optional[RoutingInterface] = None,
59
- internet_search: bool = True,
59
+ internet_search: bool = False,
60
60
  ) -> AsyncGenerator[Union[str, bytes], None]: # pragma: no cover
61
61
  """Process a user message and return the response stream.
62
62
 
@@ -24,7 +24,7 @@ class SolanaAgent(ABC):
24
24
  "flac", "mp3", "mp4", "mpeg", "mpga", "m4a", "ogg", "wav", "webm"
25
25
  ] = "mp4",
26
26
  router: Optional[RoutingInterface] = None,
27
- internet_search: bool = True,
27
+ internet_search: bool = False,
28
28
  ) -> AsyncGenerator[Union[str, bytes], None]:
29
29
  """Process a user message and return the response stream."""
30
30
  pass
@@ -34,7 +34,7 @@ class AgentService(ABC):
34
34
  "flac", "mp3", "mp4", "mpeg", "mpga", "m4a", "ogg", "wav", "webm"
35
35
  ] = "mp4",
36
36
  prompt: Optional[str] = None,
37
- internet_search: bool = True,
37
+ internet_search: bool = False,
38
38
  ) -> AsyncGenerator[Union[str, bytes], None]:
39
39
  """Generate a response from an agent."""
40
40
  pass
@@ -20,7 +20,7 @@ class QueryService(ABC):
20
20
  "flac", "mp3", "mp4", "mpeg", "mpga", "m4a", "ogg", "wav", "webm"
21
21
  ] = "mp4",
22
22
  prompt: Optional[str] = None,
23
- internet_search: bool = True,
23
+ internet_search: bool = False,
24
24
  ) -> AsyncGenerator[Union[str, bytes], None]:
25
25
  """Process the user request and generate a response."""
26
26
  pass
@@ -177,7 +177,7 @@ class AgentService(AgentServiceInterface):
177
177
  "flac", "mp3", "mp4", "mpeg", "mpga", "m4a", "ogg", "wav", "webm"
178
178
  ] = "mp4",
179
179
  prompt: Optional[str] = None,
180
- internet_search: bool = True,
180
+ internet_search: bool = False,
181
181
  ) -> AsyncGenerator[Union[str, bytes], None]: # pragma: no cover
182
182
  """Generate a response with support for text/audio input/output."""
183
183
  agent = next((a for a in self.agents if a.name == agent_name), None)
@@ -49,7 +49,7 @@ class QueryService(QueryServiceInterface):
49
49
  ] = "mp4",
50
50
  prompt: Optional[str] = None,
51
51
  router: Optional[RoutingServiceInterface] = None,
52
- internet_search: bool = True,
52
+ internet_search: bool = False,
53
53
  ) -> AsyncGenerator[Union[str, bytes], None]: # pragma: no cover
54
54
  """Process the user request with appropriate agent.
55
55
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: solana-agent
3
- Version: 22.0.11
3
+ Version: 23.0.1
4
4
  Summary: Agentic IQ
5
5
  License: MIT
6
6
  Keywords: ai,openai,ai agents,agi
@@ -81,6 +81,47 @@ You can install Solana Agent using pip:
81
81
 
82
82
  `pip install solana-agent`
83
83
 
84
+ ## Flows
85
+
86
+ In both flows of single and multiple agents - it is one user query to one agent using one tool (if needed).
87
+
88
+ An agent can have multiple tools and will choose the best one to answer the user query.
89
+
90
+ Routing is determined by optimal domain expertise of the agent for the user query.
91
+
92
+ Keep this in mind while designing your agentic systems using Solana Agent.
93
+
94
+ ```ascii
95
+ Single Agent
96
+
97
+ ┌────────┐ ┌─────────┐ ┌────────┐
98
+ │ │ │ │ │ │
99
+ │ │ │ │ │ │
100
+ │ User │◄──────►│ Agent │◄──────►│ Tool │
101
+ │ │ │ │ │ │
102
+ │ │ │ │ │ │
103
+ └────────┘ └─────────┘ └────────┘
104
+
105
+
106
+
107
+
108
+
109
+ Multiple Agents
110
+
111
+ ┌────────┐ ┌──────────┐ ┌─────────┐ ┌────────┐
112
+ │ │ │ │ │ │ │ │
113
+ │ │ │ │ │ │ │ │
114
+ ┌───►│ User ├───────►│ Router ├───────►│ Agent │◄──────►│ Tool │
115
+ │ │ │ │ │ │ │ │ │
116
+ │ │ │ │ │ │ │ │ │
117
+ │ └────────┘ └──────────┘ └────┬────┘ └────────┘
118
+ │ │
119
+ │ │
120
+ │ │
121
+ │ │
122
+ └───────────────────────────────────────────────┘
123
+ ```
124
+
84
125
  ## Usage
85
126
 
86
127
  ### Text/Text Streaming
@@ -244,10 +285,18 @@ config = {
244
285
  }
245
286
  ```
246
287
 
247
- ### Disable Internet Searching
288
+ ### Internet Search
289
+
290
+ This mode is great for text output where the default response from OpenAI is enough.
291
+
292
+ However, it is also found to sometimes not not call tools when the tool should be called.
293
+
294
+ It is faster than calling `search_internet` from `sakit` and saves at least 2 API calls.
295
+
296
+ The default mode is disabled due to the issue of not calling tools properly and is not suitable for audio output.
248
297
 
249
298
  ```python
250
- async for response in solana_agent.process("user123", "Write me a poem.", internet_search=False):
299
+ async for response in solana_agent.process("user123", "What is the latest news on Canada?", internet_search=True):
251
300
  print(response, end="")
252
301
  ```
253
302
 
@@ -292,7 +341,8 @@ config = {
292
341
  },
293
342
  "tools": {
294
343
  "search_internet": {
295
- "api_key": "your-perplexity-api-key",
344
+ "api_key": "your-api-key", # Required - either a Perplexity or OpenAI API key
345
+ "provider": "perplexity", # Optional, defaults to perplexity - can also be openai (lowercase)
296
346
  },
297
347
  },
298
348
  "agents": [
@@ -312,7 +362,7 @@ config = {
312
362
 
313
363
  solana_agent = SolanaAgent(config=config)
314
364
 
315
- async for response in solana_agent.process("user123", "What are the latest AI developments?", internet_search=False):
365
+ async for response in solana_agent.process("user123", "What are the latest AI developments?"):
316
366
  print(response, end="")
317
367
  ```
318
368
 
@@ -489,7 +539,19 @@ The official example app written in FastAPI and Next.js
489
539
 
490
540
  ## Agent Framework Comparisons
491
541
 
492
- [Compare Python Agent Frameworks](https://github.com/truemagic-coder/solana-agent/blob/main/compare.md)
542
+ [Compare Python Agent Frameworks](https://github.com/truemagic-coder/solana-agent/wiki/Agent-Framework-Comparisons)
543
+
544
+ ## Contributing
545
+
546
+ If you have a question, feedback, or feature request - please open a GitHub discussion.
547
+
548
+ If you find a bug - please open a GitHub issue.
549
+
550
+ We are currently not accepting pull requests at the moment.
551
+
552
+ To run the documentation site locally run `make livehtml` in the root directory.
553
+
554
+ To run the test suite locally run `poetry run pytest --cov=solana_agent --cov-report=html` in the root directory.
493
555
 
494
556
  ## License
495
557
 
@@ -3,20 +3,20 @@ solana_agent/adapters/__init__.py,sha256=tiEEuuy0NF3ngc_tGEcRTt71zVI58v3dYY9RvMr
3
3
  solana_agent/adapters/llm_adapter.py,sha256=ReCVQH0X0hf5NpLqEMESft5LZtPj3gDNIOBiZpClqzo,5737
4
4
  solana_agent/adapters/mongodb_adapter.py,sha256=qqEFbY_v1XGyFXBmwd5HSXSSHnA9wWo-Hm1vGEyIG0k,2718
5
5
  solana_agent/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- solana_agent/client/solana_agent.py,sha256=-bIVaE5p6He4d5VRzYhlAgkMzhql4EVFsujjnoweh2o,5355
6
+ solana_agent/client/solana_agent.py,sha256=u-W9KVfd_hrgj9cVnc4t_AD-8wSEeK88xLvBt1chW90,5356
7
7
  solana_agent/domains/__init__.py,sha256=HiC94wVPRy-QDJSSRywCRrhrFfTBeHjfi5z-QfZv46U,168
8
8
  solana_agent/domains/agent.py,sha256=WTo-pEc66V6D_35cpDE-kTsw1SJM-dtylPZ7em5em7Q,2659
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=mJQb1G0-gebizZvSVHm4NAxRMB1kemm2w_BAcYlN15Y,5496
12
12
  solana_agent/interfaces/__init__.py,sha256=IQs1WIM1FeKP1-kY2FEfyhol_dB-I-VAe2rD6jrVF6k,355
13
- solana_agent/interfaces/client/client.py,sha256=btAt-bVVxsunA6rcbn0jqVmZ1JMxcF_u95CIXByO7fk,1728
13
+ solana_agent/interfaces/client/client.py,sha256=vZcIXSnNawXlx0x_vD4D2ldtA5Oy93DGRjkDFv-AcwU,1729
14
14
  solana_agent/interfaces/plugins/plugins.py,sha256=T8HPBsekmzVwfU_Rizp-vtzAeYkMlKMYD7U9d0Wjq9c,3338
15
15
  solana_agent/interfaces/providers/data_storage.py,sha256=NqGeFvAzhz9rr-liLPRNCGjooB2EIhe-EVsMmX__b0M,1658
16
16
  solana_agent/interfaces/providers/llm.py,sha256=_sbgSs3Sy1QAeFCB_jzw_Rjpq-N5wBY5qt6tmFYD9K4,1591
17
17
  solana_agent/interfaces/providers/memory.py,sha256=oNOH8WZXVW8assDigIWZAWiwkxbpDiKupxA2RB6tQvQ,1010
18
- solana_agent/interfaces/services/agent.py,sha256=mvXl5JLiJJz0ajjVuntR-Sz8geRGs9RVqOEBsf8VzzE,2151
19
- solana_agent/interfaces/services/query.py,sha256=rKIYjHBeOaFFawFYduJbMRp7imYg-uRElZoizBgua00,1378
18
+ solana_agent/interfaces/services/agent.py,sha256=EPHY9uDLXBNo5CD5dLzI8vZZRd2LLiinei_biKIg228,2152
19
+ solana_agent/interfaces/services/query.py,sha256=X54dLxwU2DTF5eReeg0XsOFVNBo6cFmH4iyCuWdN3Gs,1379
20
20
  solana_agent/interfaces/services/routing.py,sha256=UzJC-z-Q9puTWPFGEo2_CAhIxuxP5IRnze7S66NSrsI,397
21
21
  solana_agent/plugins/__init__.py,sha256=coZdgJKq1ExOaj6qB810i3rEhbjdVlrkN76ozt_Ojgo,193
22
22
  solana_agent/plugins/manager.py,sha256=Il49hXeqvu0b02pURNNp7mY8kp9_sqpi_vJIWBW5Hc0,5044
@@ -26,10 +26,10 @@ solana_agent/plugins/tools/auto_tool.py,sha256=DgES_cZ6xKSf_HJpFINpvJxrjVlk5oeqa
26
26
  solana_agent/repositories/__init__.py,sha256=fP83w83CGzXLnSdq-C5wbw9EhWTYtqE2lQTgp46-X_4,163
27
27
  solana_agent/repositories/memory.py,sha256=mrpmNSQ0D_eLebNY-cBqtecVVpIGXE7s9jCzOWEAuR4,6984
28
28
  solana_agent/services/__init__.py,sha256=ab_NXJmwYUCmCrCzuTlZ47bJZINW0Y0F5jfQ9OovidU,163
29
- solana_agent/services/agent.py,sha256=bIVC4VGCv8qS5AF0nh_hfUjz8nu70Owll-VuvHJ9X48,20047
30
- solana_agent/services/query.py,sha256=os_LRkDIwXQuWW_zJMtm__n0Lvi-AvItdanpCs1bXv0,11362
29
+ solana_agent/services/agent.py,sha256=-u2rtu6w_0BQoHPFU3GdLuZLinQzQ0cpktOUsCRcbUU,20048
30
+ solana_agent/services/query.py,sha256=6K5RcxoHXaKMvxmDPo_WInRYtjOKJ8In4BgdLhzc_98,11363
31
31
  solana_agent/services/routing.py,sha256=PMCSG5m3uLMaHMj3dxNvNfcFZaeaDi7kMr7AEBCzwDE,6499
32
- solana_agent-22.0.11.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
33
- solana_agent-22.0.11.dist-info/METADATA,sha256=JGqSU7639i_8jrUcdnXI0kcT_g9pD05ZOqm1Q6kcjhg,15007
34
- solana_agent-22.0.11.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
35
- solana_agent-22.0.11.dist-info/RECORD,,
32
+ solana_agent-23.0.1.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
33
+ solana_agent-23.0.1.dist-info/METADATA,sha256=oO8da4rHmMhyjE2Pa5Nnkn46a_0qy-UqkgfDOObHtDY,19014
34
+ solana_agent-23.0.1.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
35
+ solana_agent-23.0.1.dist-info/RECORD,,