solana-agent 18.0.1__py3-none-any.whl → 19.0.0__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.
@@ -2,36 +2,34 @@
2
2
  Domain models for AI and human agents.
3
3
 
4
4
  This module defines the core domain models for representing
5
- AI agents, human agents, and organization mission/values.
5
+ AI agents, human agents, and business mission/values.
6
6
  """
7
- from typing import List, Optional, Dict, Any, Union
8
- # Import the class directly, not the module
9
- from datetime import datetime
7
+ from typing import List, Dict, Any
10
8
  from pydantic import BaseModel, Field, field_validator
11
9
 
12
10
 
13
- class OrganizationMission(BaseModel):
14
- """Organization mission and values to guide agent behavior."""
11
+ class BusinessMission(BaseModel):
12
+ """Business mission and values to guide agent behavior."""
15
13
 
16
- mission_statement: str = Field(...,
17
- description="Organization mission statement")
14
+ mission: str = Field(...,
15
+ description="Business mission statement")
18
16
  values: List[Dict[str, str]] = Field(
19
17
  default_factory=list,
20
- description="Organization values as name-description pairs"
18
+ description="Business values as name-description pairs"
21
19
  )
22
20
  goals: List[str] = Field(
23
21
  default_factory=list,
24
- description="Organization goals"
22
+ description="Business goals"
25
23
  )
26
24
  voice: str = Field(
27
- None, description="Organization voice or tone")
25
+ None, description="Business voice or tone")
28
26
 
29
- @field_validator("mission_statement")
27
+ @field_validator("mission")
30
28
  @classmethod
31
- def mission_statement_not_empty(cls, v: str) -> str:
32
- """Validate that mission statement is not empty."""
29
+ def mission_not_empty(cls, v: str) -> str:
30
+ """Validate that mission is not empty."""
33
31
  if not v.strip():
34
- raise ValueError("Mission statement cannot be empty")
32
+ raise ValueError("Mission cannot be empty")
35
33
  return v
36
34
 
37
35
  @field_validator("voice")
@@ -19,7 +19,7 @@ from solana_agent.adapters.llm_adapter import OpenAIAdapter
19
19
  from solana_agent.adapters.mongodb_adapter import MongoDBAdapter
20
20
 
21
21
  # Domain and plugin imports
22
- from solana_agent.domains.agent import OrganizationMission
22
+ from solana_agent.domains.agent import BusinessMission
23
23
  from solana_agent.plugins.manager import PluginManager
24
24
 
25
25
 
@@ -46,12 +46,12 @@ class SolanaAgentFactory:
46
46
  api_key=config["openai"]["api_key"],
47
47
  )
48
48
 
49
- # Create organization mission if specified in config
50
- organization_mission = None
51
- if "organization" in config:
52
- org_config = config["organization"]
53
- organization_mission = OrganizationMission(
54
- mission_statement=org_config.get("mission_statement", ""),
49
+ # Create business mission if specified in config
50
+ business_mission = None
51
+ if "business" in config:
52
+ org_config = config["business"]
53
+ business_mission = BusinessMission(
54
+ mission=org_config.get("mission", ""),
55
55
  values=[{"name": k, "description": v}
56
56
  for k, v in org_config.get("values", {}).items()],
57
57
  goals=org_config.get("goals", []),
@@ -68,7 +68,7 @@ class SolanaAgentFactory:
68
68
  # Create primary services
69
69
  agent_service = AgentService(
70
70
  llm_provider=llm_adapter,
71
- organization_mission=organization_mission,
71
+ business_mission=business_mission,
72
72
  config=config,
73
73
  )
74
74
 
@@ -14,7 +14,7 @@ from solana_agent.interfaces.services.agent import AgentService as AgentServiceI
14
14
  from solana_agent.interfaces.providers.llm import LLMProvider
15
15
  from solana_agent.interfaces.plugins.plugins import ToolRegistry as ToolRegistryInterface
16
16
  from solana_agent.plugins.registry import ToolRegistry
17
- from solana_agent.domains.agent import AIAgent, OrganizationMission
17
+ from solana_agent.domains.agent import AIAgent, BusinessMission
18
18
 
19
19
 
20
20
  class AgentService(AgentServiceInterface):
@@ -23,18 +23,18 @@ class AgentService(AgentServiceInterface):
23
23
  def __init__(
24
24
  self,
25
25
  llm_provider: LLMProvider,
26
- organization_mission: Optional[OrganizationMission] = None,
26
+ business_mission: Optional[BusinessMission] = None,
27
27
  config: Optional[Dict[str, Any]] = None,
28
28
  ):
29
29
  """Initialize the agent service.
30
30
 
31
31
  Args:
32
32
  llm_provider: Provider for language model interactions
33
- organization_mission: Optional organization mission and values
33
+ business_mission: Optional business mission and values
34
34
  config: Optional service configuration
35
35
  """
36
36
  self.llm_provider = llm_provider
37
- self.organization_mission = organization_mission
37
+ self.business_mission = business_mission
38
38
  self.config = config or {}
39
39
  self.last_text_response = ""
40
40
  self.tool_registry = ToolRegistry(config=self.config)
@@ -81,22 +81,22 @@ class AgentService(AgentServiceInterface):
81
81
  system_prompt += f"\n\nThe current time is {datetime.now(tz=main_datetime.timezone.utc)}\n\n."
82
82
 
83
83
  # Add mission and values if available
84
- if self.organization_mission:
85
- system_prompt += f"\n\nORGANIZATION MISSION:\n{self.organization_mission.mission_statement}"
86
- system_prompt += f"\n\nVOICE OF THE BRAND:\n{self.organization_mission.voice}"
84
+ if self.business_mission:
85
+ system_prompt += f"\n\nBUSINESS MISSION:\n{self.business_mission.mission}"
86
+ system_prompt += f"\n\nVOICE OF THE BRAND:\n{self.business_mission.voice}"
87
87
 
88
- if self.organization_mission.values:
88
+ if self.business_mission.values:
89
89
  values_text = "\n".join([
90
90
  f"- {value.get('name', '')}: {value.get('description', '')}"
91
- for value in self.organization_mission.values
91
+ for value in self.business_mission.values
92
92
  ])
93
- system_prompt += f"\n\nORGANIZATION VALUES:\n{values_text}"
93
+ system_prompt += f"\n\nBUSINESS VALUES:\n{values_text}"
94
94
 
95
- # Add organization goals if available
96
- if self.organization_mission.goals:
95
+ # Add goals if available
96
+ if self.business_mission.goals:
97
97
  goals_text = "\n".join(
98
- [f"- {goal}" for goal in self.organization_mission.goals])
99
- system_prompt += f"\n\nORGANIZATION GOALS:\n{goals_text}"
98
+ [f"- {goal}" for goal in self.business_mission.goals])
99
+ system_prompt += f"\n\nBUSINESS GOALS:\n{goals_text}"
100
100
 
101
101
  return system_prompt
102
102
 
@@ -0,0 +1,314 @@
1
+ Metadata-Version: 2.3
2
+ Name: solana-agent
3
+ Version: 19.0.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: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
16
+ Requires-Dist: openai (>=1.68.2,<2.0.0)
17
+ Requires-Dist: pydantic (>=2.10.6,<3.0.0)
18
+ Requires-Dist: pymongo (>=4.11.3,<5.0.0)
19
+ Requires-Dist: zep-cloud (>=2.8.0,<3.0.0)
20
+ Requires-Dist: zep-python (>=2.0.2,<3.0.0)
21
+ Project-URL: Repository, https://github.com/truemagic-coder/solana-agent
22
+ Description-Content-Type: text/markdown
23
+
24
+ # Solana Agent
25
+
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/)
28
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
29
+ [![Python 3.12+](https://img.shields.io/badge/python-3.12+-orange.svg)](https://www.python.org/downloads/)
30
+ [![codecov](https://img.shields.io/codecov/c/github/truemagic-coder/solana-agent/main.svg)](https://codecov.io/gh/truemagic-coder/solana-agent)
31
+ [![Build Status](https://img.shields.io/github/actions/workflow/status/truemagic-coder/solana-agent/ci.yml?branch=main)](https://github.com/truemagic-coder/solana-agent/actions/workflows/ci.yml)
32
+ [![Lines of Code](https://tokei.rs/b1/github/truemagic-coder/solana-agent?type=python&category=code&style=flat)](https://github.com/truemagic-coder/solana-agent)
33
+
34
+ ![Solana Agent Logo](https://dl.walletbubbles.com/solana-agent-logo.png?width=200)
35
+
36
+ ## Agentic IQ
37
+
38
+ Power your business using Solana Agent!
39
+
40
+ * **Brand:** AI agents will speak in your brand voice
41
+ * **Expert:** The AI agent with the most expertise will answer your users' inquiries
42
+ * **Extend:** Assign tools for your AI agents to perform actions
43
+
44
+ ## Features
45
+
46
+ * Seamless text and audio streaming with real-time multi-modal processing
47
+ * Persistent memory that preserves context across all agent interactions (optional)
48
+ * Intelligent query routing to agents with optimal domain expertise
49
+ * Unified value system ensuring brand-aligned agent responses
50
+ * Powerful tool integration using standard Python packages and/or inline classes
51
+ * Assigned tools are utilized by agents automatically and effectively
52
+ * Simple business definition using JSON
53
+
54
+ ## Why?
55
+ * Multi-Modal Streaming
56
+ * Conversational Memory
57
+ * Intelligent Routing
58
+ * Business Alignment
59
+ * Extensible Tooling
60
+ * Simple Business Definition
61
+ * Built using OOP & SOLID in Python - the language of AI
62
+ * Batteries Included
63
+ * Small Library: ~2,000 LOC of code & ~1,200 LOC of tests
64
+ * Few Dependencies
65
+ * Well Tested
66
+ * Used in production by [CometHeart](https://cometheart.com) and [WalletBubbles](https://walletbubbles.com)
67
+
68
+ ## Stack
69
+
70
+ * [Python](https://python.org) - Programming Language
71
+ * [OpenAI](https://openai.com) - LLMs
72
+ * [MongoDB](https://mongodb.com) - Database
73
+ * [Zep](https://getzep.com) - Conversational Memory (optional)
74
+
75
+ ## Installation
76
+
77
+ You can install Solana Agent using pip:
78
+
79
+ `pip install solana-agent`
80
+
81
+ ## Basic Usage
82
+
83
+ ```python
84
+ from solana_agent import SolanaAgent
85
+
86
+ config = {
87
+ "business": {
88
+ "mission": "To provide users with a one-stop shop for their queries.",
89
+ "values": {
90
+ "Friendliness": "Users must be treated fairly, openly, and with friendliness.",
91
+ "Ethical": "Agents must use a strong ethical framework in their interactions with users.",
92
+ },
93
+ "goals": [
94
+ "Empower users with great answers to their queries.",
95
+ ],
96
+ "voice": "The voice of the brand is that of a research business."
97
+ },
98
+ "mongo": {
99
+ "connection_string": "mongodb://localhost:27017",
100
+ "database": "solana_agent"
101
+ },
102
+ "openai": {
103
+ "api_key": "your-openai-api-key",
104
+ },
105
+ "zep": { # optional
106
+ "api_key": "your-zep-api-key",
107
+ "base_url": "your-zep-base-url", # not applicable if using Zep Cloud
108
+ },
109
+ "agents": [
110
+ {
111
+ "name": "research_specialist",
112
+ "instructions": "You are an expert researcher who synthesizes complex information clearly.",
113
+ "specialization": "Research and knowledge synthesis",
114
+ },
115
+ {
116
+ "name": "customer_support",
117
+ "instructions": "You provide friendly, helpful customer support responses.",
118
+ "specialization": "Customer inquiries",
119
+ }
120
+ ],
121
+ }
122
+
123
+ solana_agent = SolanaAgent(config=config)
124
+
125
+ async for response in solana_agent.process("user123", "What are the latest AI developments?"):
126
+ print(response, end="")
127
+ ```
128
+
129
+ ## Plugin Usage
130
+
131
+ Plugins like Solana Agent Kit (sakit) integrate automatically with Solana Agent.
132
+
133
+ `pip install sakit`
134
+
135
+ ```python
136
+ from solana_agent import SolanaAgent
137
+
138
+ config = {
139
+ "business": {
140
+ "mission": "To provide users with a one-stop shop for their queries.",
141
+ "values": {
142
+ "Friendliness": "Users must be treated fairly, openly, and with friendliness.",
143
+ "Ethical": "Agents must use a strong ethical framework in their interactions with users.",
144
+ },
145
+ "goals": [
146
+ "Empower users with great answers to their queries.",
147
+ ],
148
+ "voice": "The voice of the brand is that of a research business."
149
+ },
150
+ "mongo": {
151
+ "connection_string": "mongodb://localhost:27017",
152
+ "database": "solana_agent"
153
+ },
154
+ "openai": {
155
+ "api_key": "your-openai-api-key",
156
+ },
157
+ "zep": { # optional
158
+ "api_key": "your-zep-api-key",
159
+ "base_url": "your-zep-base-url", # not applicable if using Zep Cloud
160
+ },
161
+ "tools": {
162
+ "search_internet": {
163
+ "api_key": "your-perplexity-key", # Required
164
+ "citations": True, # Optional, defaults to True
165
+ "model": "sonar" # Optional, defaults to "sonar"
166
+ },
167
+ },
168
+ "agents": [
169
+ {
170
+ "name": "research_specialist",
171
+ "instructions": "You are an expert researcher who synthesizes complex information clearly.",
172
+ "specialization": "Research and knowledge synthesis",
173
+ "tools": ["search_internet"],
174
+ },
175
+ {
176
+ "name": "customer_support",
177
+ "instructions": "You provide friendly, helpful customer support responses.",
178
+ "specialization": "Customer inquiries",
179
+ }
180
+ ],
181
+ }
182
+
183
+ solana_agent = SolanaAgent(config=config)
184
+
185
+ async for response in solana_agent.process("user123", "What are the latest AI developments?"):
186
+ print(response, end="")
187
+ ```
188
+
189
+ To create a plugin like Solana Agent Kit - read the [code](https://github.com/truemagic-coder/solana-agent-kit)
190
+
191
+ ## Custom Inline Tool Usage
192
+
193
+ ```python
194
+ from solana_agent import SolanaAgent
195
+ from solana_agent.interfaces.plugins.plugins import Tool
196
+
197
+ class TestTool(Tool):
198
+ def __init__(self):
199
+ # your tool initialization - delete the following pass
200
+ pass
201
+
202
+ @property
203
+ def name(self) -> str:
204
+ return "test_function"
205
+
206
+ @property
207
+ def description(self) -> str:
208
+ return "Test function for Solana Agent"
209
+
210
+ def configure(self, config: Dict[str, Any]) -> None:
211
+ """Configure with all possible API key locations."""
212
+ super().configure(config)
213
+
214
+ # read your config values - delete the following pass
215
+ pass
216
+
217
+ def get_schema(self) -> Dict[str, Any]:
218
+ # this is an example schema
219
+ return {
220
+ "type": "object",
221
+ "properties": {
222
+ "query": {"type": "string", "description": "Search query text"},
223
+ "user_id": {"type": "string", "description": "User ID for the search session"}
224
+ },
225
+ "required": ["query", "user_id"]
226
+ }
227
+
228
+ async def execute(self, **params) -> Dict[str, Any]:
229
+ try:
230
+ # your tool logic
231
+ result = "Your tool results"
232
+
233
+ return {
234
+ "status": "success",
235
+ "result": result,
236
+ }
237
+ except Exception as e:
238
+ return {
239
+ "status": "error",
240
+ "message": f"Error: {str(e)}",
241
+ }
242
+
243
+ config = {
244
+ "business": {
245
+ "mission": "To provide users with a one-stop shop for their queries.",
246
+ "values": {
247
+ "Friendliness": "Users must be treated fairly, openly, and with friendliness.",
248
+ "Ethical": "Agents must use a strong ethical framework in their interactions with users.",
249
+ },
250
+ "goals": [
251
+ "Empower users with great answers to their queries.",
252
+ ],
253
+ "voice": "The voice of the brand is that of a research business."
254
+ },
255
+ "mongo": {
256
+ "connection_string": "mongodb://localhost:27017",
257
+ "database": "solana_agent"
258
+ },
259
+ "openai": {
260
+ "api_key": "your-openai-api-key",
261
+ },
262
+ "zep": { # optional
263
+ "api_key": "your-zep-api-key",
264
+ "base_url": "your-zep-base-url", # not applicable if using Zep Cloud
265
+ },
266
+ "agents": [
267
+ {
268
+ "name": "research_specialist",
269
+ "instructions": "You are an expert researcher who synthesizes complex information clearly.",
270
+ "specialization": "Research and knowledge synthesis",
271
+ },
272
+ {
273
+ "name": "customer_support",
274
+ "instructions": "You provide friendly, helpful customer support responses.",
275
+ "specialization": "Customer inquiries",
276
+ }
277
+ ],
278
+ }
279
+
280
+ solana_agent = SolanaAgent(config=config)
281
+
282
+ test_tool = TestTool()
283
+
284
+ solana_agent.register_tool(test_tool)
285
+
286
+ async for response in solana_agent.process("user123", "What are the latest AI developments?"):
287
+ print(response, end="")
288
+ ```
289
+
290
+ ## Notes on Tools
291
+ * Solana Agent agents can only call one tool per response.
292
+ * Solana Agent agents choose the best tool for the job.
293
+ * Solana Agent tools do not use OpenAI function calling.
294
+ * Solana Agent tools are async functions.
295
+
296
+ ## API Documentation
297
+ * Available at [Solana Agent Documentation Site](https://docs.solana-agent.com)
298
+
299
+ ## Solana Agent Kit
300
+
301
+ A collection of Solana Agent tools
302
+
303
+ [Solana Agent Kit](https://github.com/truemagic-coder/solana-agent-kit)
304
+
305
+ ## Example App
306
+
307
+ A Solana Agent example app written in FastAPI and Next.js
308
+
309
+ [Solana Agent Example App](https://github.com/truemagic-coder/solana-agent-app)
310
+
311
+ ## License
312
+
313
+ This project is licensed under the MIT License - see the LICENSE file for details.
314
+
@@ -5,10 +5,10 @@ solana_agent/adapters/mongodb_adapter.py,sha256=qqEFbY_v1XGyFXBmwd5HSXSSHnA9wWo-
5
5
  solana_agent/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  solana_agent/client/solana_agent.py,sha256=Q9vnsoezsdhe6-T_tMb7Gr-697D1Bo2qIpr1-ytP1ak,5361
7
7
  solana_agent/domains/__init__.py,sha256=HiC94wVPRy-QDJSSRywCRrhrFfTBeHjfi5z-QfZv46U,168
8
- solana_agent/domains/agent.py,sha256=9ztePCPDMmbEF9NAsblRs0JVQciU3IVKoUF1QYTct9U,2838
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
- solana_agent/factories/agent_factory.py,sha256=SuFTob-cbbUqc9gm06Sole7wEcxXs3sOS57eW_V2IHc,4886
11
+ solana_agent/factories/agent_factory.py,sha256=1C2_ayDg5NGlG4uO6mLbcQMTIPVTVfQyKSF_UPsP4K4,4830
12
12
  solana_agent/interfaces/__init__.py,sha256=IQs1WIM1FeKP1-kY2FEfyhol_dB-I-VAe2rD6jrVF6k,355
13
13
  solana_agent/interfaces/client/client.py,sha256=2-YxrNH54aDYf68KYSLfFVBktAJkVCGG8TE76yzM8N8,1445
14
14
  solana_agent/interfaces/plugins/plugins.py,sha256=T8HPBsekmzVwfU_Rizp-vtzAeYkMlKMYD7U9d0Wjq9c,3338
@@ -26,10 +26,10 @@ solana_agent/plugins/tools/auto_tool.py,sha256=eDq2P-_D2PM7Dafpn55b1QU5LkM6BLdJG
26
26
  solana_agent/repositories/__init__.py,sha256=fP83w83CGzXLnSdq-C5wbw9EhWTYtqE2lQTgp46-X_4,163
27
27
  solana_agent/repositories/memory.py,sha256=cDGoRz8FEkjwCE7j0XvA03-NL0TyROAt4_uwx288Th0,4790
28
28
  solana_agent/services/__init__.py,sha256=ab_NXJmwYUCmCrCzuTlZ47bJZINW0Y0F5jfQ9OovidU,163
29
- solana_agent/services/agent.py,sha256=w61oAgrRs14xDY6OcpIgZYvqLJLLwkx5Zhr4caoBFtE,16659
29
+ solana_agent/services/agent.py,sha256=gFM1t9vSu_el0Qk8KXWb9RW7JomRDUZJ7yoBNg4mmuM,16568
30
30
  solana_agent/services/query.py,sha256=qXrvzAyMqESdF8QD3xYaz2vyfR7ndLpsh2TahYQ-LYg,10414
31
31
  solana_agent/services/routing.py,sha256=IPvBicgTYXqQ8iIRaatCsBGQVsOBGdAkq2i6U8hZlOY,6479
32
- solana_agent-18.0.1.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
33
- solana_agent-18.0.1.dist-info/METADATA,sha256=kC6ricx9IiowGx-p235U-Sxkm5rwcDejcZPL1VERj-8,4854
34
- solana_agent-18.0.1.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
35
- solana_agent-18.0.1.dist-info/RECORD,,
32
+ solana_agent-19.0.0.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
33
+ solana_agent-19.0.0.dist-info/METADATA,sha256=KMTOIdvJzxSP-CpdAVSPPSnIDdBw2crOvivm8NnHrPw,10629
34
+ solana_agent-19.0.0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
35
+ solana_agent-19.0.0.dist-info/RECORD,,
@@ -1,130 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: solana-agent
3
- Version: 18.0.1
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: License :: OSI Approved :: MIT License
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.12
13
- Classifier: Programming Language :: Python :: 3.13
14
- Classifier: Programming Language :: Python :: 3 :: Only
15
- Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
16
- Requires-Dist: openai (>=1.68.2,<2.0.0)
17
- Requires-Dist: pydantic (>=2.10.6,<3.0.0)
18
- Requires-Dist: pymongo (>=4.11.3,<5.0.0)
19
- Requires-Dist: zep-cloud (>=2.8.0,<3.0.0)
20
- Requires-Dist: zep-python (>=2.0.2,<3.0.0)
21
- Project-URL: Repository, https://github.com/truemagic-coder/solana-agent
22
- Description-Content-Type: text/markdown
23
-
24
- # Solana Agent
25
-
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/)
28
- [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
29
- [![Python 3.12+](https://img.shields.io/badge/python-3.12+-orange.svg)](https://www.python.org/downloads/)
30
- [![codecov](https://img.shields.io/codecov/c/github/truemagic-coder/solana-agent/main.svg)](https://codecov.io/gh/truemagic-coder/solana-agent)
31
- [![Build Status](https://img.shields.io/github/actions/workflow/status/truemagic-coder/solana-agent/ci.yml?branch=main)](https://github.com/truemagic-coder/solana-agent/actions/workflows/ci.yml)
32
- [![Lines of Code](https://tokei.rs/b1/github/truemagic-coder/solana-agent?type=python&category=code&style=flat)](https://github.com/truemagic-coder/solana-agent)
33
-
34
- ![Solana Agent Logo](https://dl.walletbubbles.com/solana-agent-logo.png?width=200)
35
-
36
- ## Agentic IQ
37
-
38
- Power your business using Solana Agent!
39
-
40
- * **Brand:** AI agents will speak in your brand voice
41
- * **Expert:** The AI agent with the most expertise will answer your users' inquiries
42
- * **Extend:** Assign tools for your AI agents to perform actions
43
-
44
- ## Features
45
-
46
- * Seamless text and audio streaming with real-time multi-modal processing
47
- * Persistent memory that preserves context across all agent interactions (optional)
48
- * Intelligent query routing to agents with optimal domain expertise
49
- * Unified value system ensuring brand-aligned agent responses
50
- * Powerful tool integration using standard Python packages
51
- * Assigned tools are utilized by agents automatically and effectively
52
-
53
- ## Stack
54
-
55
- * [Python](https://python.org) - Programming Language
56
- * [OpenAI](https://openai.com) - LLMs
57
- * [MongoDB](https://mongodb.com) - Database
58
- * [Zep](https://getzep.com) - Conversational Memory (optional)
59
-
60
- ## Installation
61
-
62
- You can install Solana Agent using pip:
63
-
64
- `pip install solana-agent`
65
-
66
- ## Example App
67
-
68
- ```python
69
- from solana_agent import SolanaAgent
70
-
71
- config = {
72
- "organization": {
73
- "mission_statement": "To provide users with a one-stop shop for their queries.",
74
- "values": {
75
- "Friendliness": "Users must be treated fairly, openly, and with friendliness.",
76
- "Ethical": "Agents must use a strong ethical framework in their interactions with users.",
77
- },
78
- "goals": [
79
- "Empower users with great answers to their queries.",
80
- ],
81
- "voice": "The voice of the brand is that of a research organization."
82
- },
83
- "mongo": {
84
- "connection_string": "mongodb://localhost:27017",
85
- "database": "solana_agent"
86
- },
87
- "openai": {
88
- "api_key": "your-openai-api-key",
89
- },
90
- "zep": { # optional
91
- "api_key": "your-zep-api-key",
92
- "base_url": "your-zep-base-url", # not applicable if using Zep Cloud
93
- },
94
- "agents": [
95
- {
96
- "name": "research_specialist",
97
- "instructions": "You are an expert researcher who synthesizes complex information clearly.",
98
- "specialization": "Research and knowledge synthesis",
99
- "tools": ["some_tool"]
100
- },
101
- {
102
- "name": "customer_support",
103
- "instructions": "You provide friendly, helpful customer support responses.",
104
- "specialization": "Customer inquiries",
105
- }
106
- ],
107
- }
108
-
109
- solana_agent = SolanaAgent(config=config)
110
-
111
- async for response in solana_agent.process("user123", "What are the latest AI developments?"):
112
- print(response, end="")
113
- ```
114
-
115
- ## Solana Agent Kit
116
-
117
- A collection of Solana Agent tools
118
-
119
- [Solana Agent Kit](https://github.com/truemagic-coder/solana-agent-kit)
120
-
121
- ## Example App
122
-
123
- A Solana Agent example app written in FastAPI and Next.js
124
-
125
- [Solana Agent Example App](https://github.com/truemagic-coder/solana-agent-app)
126
-
127
- ## License
128
-
129
- This project is licensed under the MIT License - see the LICENSE file for details.
130
-