solana-agent 18.0.0__tar.gz → 19.0.0__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 (37) hide show
  1. solana_agent-19.0.0/PKG-INFO +314 -0
  2. solana_agent-19.0.0/README.md +290 -0
  3. {solana_agent-18.0.0 → solana_agent-19.0.0}/pyproject.toml +5 -1
  4. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/domains/agent.py +13 -15
  5. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/factories/agent_factory.py +8 -8
  6. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/services/agent.py +14 -14
  7. solana_agent-18.0.0/PKG-INFO +0 -129
  8. solana_agent-18.0.0/README.md +0 -105
  9. {solana_agent-18.0.0 → solana_agent-19.0.0}/LICENSE +0 -0
  10. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/__init__.py +0 -0
  11. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/adapters/__init__.py +0 -0
  12. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/adapters/llm_adapter.py +0 -0
  13. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/adapters/mongodb_adapter.py +0 -0
  14. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/client/__init__.py +0 -0
  15. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/client/solana_agent.py +0 -0
  16. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/domains/__init__.py +0 -0
  17. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/domains/routing.py +0 -0
  18. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/factories/__init__.py +0 -0
  19. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/interfaces/__init__.py +0 -0
  20. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/interfaces/client/client.py +0 -0
  21. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/interfaces/plugins/plugins.py +0 -0
  22. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/interfaces/providers/data_storage.py +0 -0
  23. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/interfaces/providers/llm.py +0 -0
  24. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/interfaces/providers/memory.py +0 -0
  25. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/interfaces/services/agent.py +0 -0
  26. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/interfaces/services/query.py +0 -0
  27. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/interfaces/services/routing.py +0 -0
  28. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/plugins/__init__.py +0 -0
  29. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/plugins/manager.py +0 -0
  30. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/plugins/registry.py +0 -0
  31. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/plugins/tools/__init__.py +0 -0
  32. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/plugins/tools/auto_tool.py +0 -0
  33. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/repositories/__init__.py +0 -0
  34. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/repositories/memory.py +0 -0
  35. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/services/__init__.py +0 -0
  36. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/services/query.py +0 -0
  37. {solana_agent-18.0.0 → solana_agent-19.0.0}/solana_agent/services/routing.py +0 -0
@@ -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
+
@@ -0,0 +1,290 @@
1
+ # Solana Agent
2
+
3
+ [![PyPI - Version](https://img.shields.io/pypi/v/solana-agent)](https://pypi.org/project/solana-agent/)
4
+ [![PyPI - Downloads](https://img.shields.io/pypi/dm/solana-agent?color=yellow)](https://pypi.org/project/solana-agent/)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
6
+ [![Python 3.12+](https://img.shields.io/badge/python-3.12+-orange.svg)](https://www.python.org/downloads/)
7
+ [![codecov](https://img.shields.io/codecov/c/github/truemagic-coder/solana-agent/main.svg)](https://codecov.io/gh/truemagic-coder/solana-agent)
8
+ [![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)
9
+ [![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)
10
+
11
+ ![Solana Agent Logo](https://dl.walletbubbles.com/solana-agent-logo.png?width=200)
12
+
13
+ ## Agentic IQ
14
+
15
+ Power your business using Solana Agent!
16
+
17
+ * **Brand:** AI agents will speak in your brand voice
18
+ * **Expert:** The AI agent with the most expertise will answer your users' inquiries
19
+ * **Extend:** Assign tools for your AI agents to perform actions
20
+
21
+ ## Features
22
+
23
+ * Seamless text and audio streaming with real-time multi-modal processing
24
+ * Persistent memory that preserves context across all agent interactions (optional)
25
+ * Intelligent query routing to agents with optimal domain expertise
26
+ * Unified value system ensuring brand-aligned agent responses
27
+ * Powerful tool integration using standard Python packages and/or inline classes
28
+ * Assigned tools are utilized by agents automatically and effectively
29
+ * Simple business definition using JSON
30
+
31
+ ## Why?
32
+ * Multi-Modal Streaming
33
+ * Conversational Memory
34
+ * Intelligent Routing
35
+ * Business Alignment
36
+ * Extensible Tooling
37
+ * Simple Business Definition
38
+ * Built using OOP & SOLID in Python - the language of AI
39
+ * Batteries Included
40
+ * Small Library: ~2,000 LOC of code & ~1,200 LOC of tests
41
+ * Few Dependencies
42
+ * Well Tested
43
+ * Used in production by [CometHeart](https://cometheart.com) and [WalletBubbles](https://walletbubbles.com)
44
+
45
+ ## Stack
46
+
47
+ * [Python](https://python.org) - Programming Language
48
+ * [OpenAI](https://openai.com) - LLMs
49
+ * [MongoDB](https://mongodb.com) - Database
50
+ * [Zep](https://getzep.com) - Conversational Memory (optional)
51
+
52
+ ## Installation
53
+
54
+ You can install Solana Agent using pip:
55
+
56
+ `pip install solana-agent`
57
+
58
+ ## Basic Usage
59
+
60
+ ```python
61
+ from solana_agent import SolanaAgent
62
+
63
+ config = {
64
+ "business": {
65
+ "mission": "To provide users with a one-stop shop for their queries.",
66
+ "values": {
67
+ "Friendliness": "Users must be treated fairly, openly, and with friendliness.",
68
+ "Ethical": "Agents must use a strong ethical framework in their interactions with users.",
69
+ },
70
+ "goals": [
71
+ "Empower users with great answers to their queries.",
72
+ ],
73
+ "voice": "The voice of the brand is that of a research business."
74
+ },
75
+ "mongo": {
76
+ "connection_string": "mongodb://localhost:27017",
77
+ "database": "solana_agent"
78
+ },
79
+ "openai": {
80
+ "api_key": "your-openai-api-key",
81
+ },
82
+ "zep": { # optional
83
+ "api_key": "your-zep-api-key",
84
+ "base_url": "your-zep-base-url", # not applicable if using Zep Cloud
85
+ },
86
+ "agents": [
87
+ {
88
+ "name": "research_specialist",
89
+ "instructions": "You are an expert researcher who synthesizes complex information clearly.",
90
+ "specialization": "Research and knowledge synthesis",
91
+ },
92
+ {
93
+ "name": "customer_support",
94
+ "instructions": "You provide friendly, helpful customer support responses.",
95
+ "specialization": "Customer inquiries",
96
+ }
97
+ ],
98
+ }
99
+
100
+ solana_agent = SolanaAgent(config=config)
101
+
102
+ async for response in solana_agent.process("user123", "What are the latest AI developments?"):
103
+ print(response, end="")
104
+ ```
105
+
106
+ ## Plugin Usage
107
+
108
+ Plugins like Solana Agent Kit (sakit) integrate automatically with Solana Agent.
109
+
110
+ `pip install sakit`
111
+
112
+ ```python
113
+ from solana_agent import SolanaAgent
114
+
115
+ config = {
116
+ "business": {
117
+ "mission": "To provide users with a one-stop shop for their queries.",
118
+ "values": {
119
+ "Friendliness": "Users must be treated fairly, openly, and with friendliness.",
120
+ "Ethical": "Agents must use a strong ethical framework in their interactions with users.",
121
+ },
122
+ "goals": [
123
+ "Empower users with great answers to their queries.",
124
+ ],
125
+ "voice": "The voice of the brand is that of a research business."
126
+ },
127
+ "mongo": {
128
+ "connection_string": "mongodb://localhost:27017",
129
+ "database": "solana_agent"
130
+ },
131
+ "openai": {
132
+ "api_key": "your-openai-api-key",
133
+ },
134
+ "zep": { # optional
135
+ "api_key": "your-zep-api-key",
136
+ "base_url": "your-zep-base-url", # not applicable if using Zep Cloud
137
+ },
138
+ "tools": {
139
+ "search_internet": {
140
+ "api_key": "your-perplexity-key", # Required
141
+ "citations": True, # Optional, defaults to True
142
+ "model": "sonar" # Optional, defaults to "sonar"
143
+ },
144
+ },
145
+ "agents": [
146
+ {
147
+ "name": "research_specialist",
148
+ "instructions": "You are an expert researcher who synthesizes complex information clearly.",
149
+ "specialization": "Research and knowledge synthesis",
150
+ "tools": ["search_internet"],
151
+ },
152
+ {
153
+ "name": "customer_support",
154
+ "instructions": "You provide friendly, helpful customer support responses.",
155
+ "specialization": "Customer inquiries",
156
+ }
157
+ ],
158
+ }
159
+
160
+ solana_agent = SolanaAgent(config=config)
161
+
162
+ async for response in solana_agent.process("user123", "What are the latest AI developments?"):
163
+ print(response, end="")
164
+ ```
165
+
166
+ To create a plugin like Solana Agent Kit - read the [code](https://github.com/truemagic-coder/solana-agent-kit)
167
+
168
+ ## Custom Inline Tool Usage
169
+
170
+ ```python
171
+ from solana_agent import SolanaAgent
172
+ from solana_agent.interfaces.plugins.plugins import Tool
173
+
174
+ class TestTool(Tool):
175
+ def __init__(self):
176
+ # your tool initialization - delete the following pass
177
+ pass
178
+
179
+ @property
180
+ def name(self) -> str:
181
+ return "test_function"
182
+
183
+ @property
184
+ def description(self) -> str:
185
+ return "Test function for Solana Agent"
186
+
187
+ def configure(self, config: Dict[str, Any]) -> None:
188
+ """Configure with all possible API key locations."""
189
+ super().configure(config)
190
+
191
+ # read your config values - delete the following pass
192
+ pass
193
+
194
+ def get_schema(self) -> Dict[str, Any]:
195
+ # this is an example schema
196
+ return {
197
+ "type": "object",
198
+ "properties": {
199
+ "query": {"type": "string", "description": "Search query text"},
200
+ "user_id": {"type": "string", "description": "User ID for the search session"}
201
+ },
202
+ "required": ["query", "user_id"]
203
+ }
204
+
205
+ async def execute(self, **params) -> Dict[str, Any]:
206
+ try:
207
+ # your tool logic
208
+ result = "Your tool results"
209
+
210
+ return {
211
+ "status": "success",
212
+ "result": result,
213
+ }
214
+ except Exception as e:
215
+ return {
216
+ "status": "error",
217
+ "message": f"Error: {str(e)}",
218
+ }
219
+
220
+ config = {
221
+ "business": {
222
+ "mission": "To provide users with a one-stop shop for their queries.",
223
+ "values": {
224
+ "Friendliness": "Users must be treated fairly, openly, and with friendliness.",
225
+ "Ethical": "Agents must use a strong ethical framework in their interactions with users.",
226
+ },
227
+ "goals": [
228
+ "Empower users with great answers to their queries.",
229
+ ],
230
+ "voice": "The voice of the brand is that of a research business."
231
+ },
232
+ "mongo": {
233
+ "connection_string": "mongodb://localhost:27017",
234
+ "database": "solana_agent"
235
+ },
236
+ "openai": {
237
+ "api_key": "your-openai-api-key",
238
+ },
239
+ "zep": { # optional
240
+ "api_key": "your-zep-api-key",
241
+ "base_url": "your-zep-base-url", # not applicable if using Zep Cloud
242
+ },
243
+ "agents": [
244
+ {
245
+ "name": "research_specialist",
246
+ "instructions": "You are an expert researcher who synthesizes complex information clearly.",
247
+ "specialization": "Research and knowledge synthesis",
248
+ },
249
+ {
250
+ "name": "customer_support",
251
+ "instructions": "You provide friendly, helpful customer support responses.",
252
+ "specialization": "Customer inquiries",
253
+ }
254
+ ],
255
+ }
256
+
257
+ solana_agent = SolanaAgent(config=config)
258
+
259
+ test_tool = TestTool()
260
+
261
+ solana_agent.register_tool(test_tool)
262
+
263
+ async for response in solana_agent.process("user123", "What are the latest AI developments?"):
264
+ print(response, end="")
265
+ ```
266
+
267
+ ## Notes on Tools
268
+ * Solana Agent agents can only call one tool per response.
269
+ * Solana Agent agents choose the best tool for the job.
270
+ * Solana Agent tools do not use OpenAI function calling.
271
+ * Solana Agent tools are async functions.
272
+
273
+ ## API Documentation
274
+ * Available at [Solana Agent Documentation Site](https://docs.solana-agent.com)
275
+
276
+ ## Solana Agent Kit
277
+
278
+ A collection of Solana Agent tools
279
+
280
+ [Solana Agent Kit](https://github.com/truemagic-coder/solana-agent-kit)
281
+
282
+ ## Example App
283
+
284
+ A Solana Agent example app written in FastAPI and Next.js
285
+
286
+ [Solana Agent Example App](https://github.com/truemagic-coder/solana-agent-app)
287
+
288
+ ## License
289
+
290
+ This project is licensed under the MIT License - see the LICENSE file for details.
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "solana-agent"
3
- version = "18.0.0"
3
+ version = "19.0.0"
4
4
  description = "Agentic IQ"
5
5
  authors = ["Bevan Hunt <bevan@bevanhunt.com>"]
6
6
  license = "MIT"
@@ -29,6 +29,10 @@ pytest = "^8.3.5"
29
29
  pytest-cov = "^6.0.0"
30
30
  pytest-asyncio = "^0.26.0"
31
31
  pytest-github-actions-annotate-failures = "^0.3.0"
32
+ sphinx = "^8.2.3"
33
+ sphinx-rtd-theme = "^3.0.2"
34
+ myst-parser = "^4.0.1"
35
+ sphinx-autobuild = "^2024.10.3"
32
36
 
33
37
  [build-system]
34
38
  requires = ["poetry-core>=1.0.0"]
@@ -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
 
@@ -1,129 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: solana-agent
3
- Version: 18.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
-
33
- ![Solana Agent Logo](https://dl.walletbubbles.com/solana-agent-logo.png?width=200)
34
-
35
- ## Agentic IQ
36
-
37
- Power your business using Solana Agent!
38
-
39
- * **Brand:** AI agents will speak in your brand voice
40
- * **Expert:** The AI agent with the most expertise will answer your users' inquiries
41
- * **Extend:** Assign tools for your AI agents to perform actions
42
-
43
- ## Features
44
-
45
- * Seamless text and audio streaming with real-time multi-modal processing
46
- * Persistent memory that preserves context across all agent interactions (optional)
47
- * Intelligent query routing to agents with optimal domain expertise
48
- * Unified value system ensuring brand-aligned agent responses
49
- * Powerful tool integration using standard Python packages
50
- * Assigned tools are utilized by agents automatically and effectively
51
-
52
- ## Stack
53
-
54
- * [Python](https://python.org) - Programming Language
55
- * [OpenAI](https://openai.com) - LLMs
56
- * [MongoDB](https://mongodb.com) - Database
57
- * [Zep](https://getzep.com) - Conversational Memory (optional)
58
-
59
- ## Installation
60
-
61
- You can install Solana Agent using pip:
62
-
63
- `pip install solana-agent`
64
-
65
- ## Example App
66
-
67
- ```python
68
- from solana_agent import SolanaAgent
69
-
70
- config = {
71
- "organization": {
72
- "mission_statement": "To provide users with a one-stop shop for their queries.",
73
- "values": {
74
- "Friendliness": "Users must be treated fairly, openly, and with friendliness.",
75
- "Ethical": "Agents must use a strong ethical framework in their interactions with users.",
76
- },
77
- "goals": [
78
- "Empower users with great answers to their queries.",
79
- ],
80
- "voice": "The voice of the brand is that of a research organization."
81
- },
82
- "mongo": {
83
- "connection_string": "mongodb://localhost:27017",
84
- "database": "solana_agent"
85
- },
86
- "openai": {
87
- "api_key": "your-openai-api-key",
88
- },
89
- "zep": { # optional
90
- "api_key": "your-zep-api-key",
91
- "base_url": "your-zep-base-url", # not applicable if using Zep Cloud
92
- },
93
- "agents": [
94
- {
95
- "name": "research_specialist",
96
- "instructions": "You are an expert researcher who synthesizes complex information clearly.",
97
- "specialization": "Research and knowledge synthesis",
98
- "tools": ["some_tool"]
99
- },
100
- {
101
- "name": "customer_support",
102
- "instructions": "You provide friendly, helpful customer support responses.",
103
- "specialization": "Customer inquiries",
104
- }
105
- ],
106
- }
107
-
108
- solana_agent = SolanaAgent(config=config)
109
-
110
- async for response in solana_agent.process("user123", "What are the latest AI developments?"):
111
- print(response, end="")
112
- ```
113
-
114
- ## Solana Agent Kit
115
-
116
- A collection of Solana Agent tools
117
-
118
- [Solana Agent Kit](https://github.com/truemagic-coder/solana-agent-kit)
119
-
120
- ## Example App
121
-
122
- A Solana Agent example app written in FastAPI and Next.js
123
-
124
- [Solana Agent Example App](https://github.com/truemagic-coder/solana-agent-app)
125
-
126
- ## License
127
-
128
- This project is licensed under the MIT License - see the LICENSE file for details.
129
-
@@ -1,105 +0,0 @@
1
- # Solana Agent
2
-
3
- [![PyPI - Version](https://img.shields.io/pypi/v/solana-agent)](https://pypi.org/project/solana-agent/)
4
- [![PyPI - Downloads](https://img.shields.io/pypi/dm/solana-agent?color=yellow)](https://pypi.org/project/solana-agent/)
5
- [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
6
- [![Python 3.12+](https://img.shields.io/badge/python-3.12+-orange.svg)](https://www.python.org/downloads/)
7
- [![codecov](https://img.shields.io/codecov/c/github/truemagic-coder/solana-agent/main.svg)](https://codecov.io/gh/truemagic-coder/solana-agent)
8
- [![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)
9
-
10
- ![Solana Agent Logo](https://dl.walletbubbles.com/solana-agent-logo.png?width=200)
11
-
12
- ## Agentic IQ
13
-
14
- Power your business using Solana Agent!
15
-
16
- * **Brand:** AI agents will speak in your brand voice
17
- * **Expert:** The AI agent with the most expertise will answer your users' inquiries
18
- * **Extend:** Assign tools for your AI agents to perform actions
19
-
20
- ## Features
21
-
22
- * Seamless text and audio streaming with real-time multi-modal processing
23
- * Persistent memory that preserves context across all agent interactions (optional)
24
- * Intelligent query routing to agents with optimal domain expertise
25
- * Unified value system ensuring brand-aligned agent responses
26
- * Powerful tool integration using standard Python packages
27
- * Assigned tools are utilized by agents automatically and effectively
28
-
29
- ## Stack
30
-
31
- * [Python](https://python.org) - Programming Language
32
- * [OpenAI](https://openai.com) - LLMs
33
- * [MongoDB](https://mongodb.com) - Database
34
- * [Zep](https://getzep.com) - Conversational Memory (optional)
35
-
36
- ## Installation
37
-
38
- You can install Solana Agent using pip:
39
-
40
- `pip install solana-agent`
41
-
42
- ## Example App
43
-
44
- ```python
45
- from solana_agent import SolanaAgent
46
-
47
- config = {
48
- "organization": {
49
- "mission_statement": "To provide users with a one-stop shop for their queries.",
50
- "values": {
51
- "Friendliness": "Users must be treated fairly, openly, and with friendliness.",
52
- "Ethical": "Agents must use a strong ethical framework in their interactions with users.",
53
- },
54
- "goals": [
55
- "Empower users with great answers to their queries.",
56
- ],
57
- "voice": "The voice of the brand is that of a research organization."
58
- },
59
- "mongo": {
60
- "connection_string": "mongodb://localhost:27017",
61
- "database": "solana_agent"
62
- },
63
- "openai": {
64
- "api_key": "your-openai-api-key",
65
- },
66
- "zep": { # optional
67
- "api_key": "your-zep-api-key",
68
- "base_url": "your-zep-base-url", # not applicable if using Zep Cloud
69
- },
70
- "agents": [
71
- {
72
- "name": "research_specialist",
73
- "instructions": "You are an expert researcher who synthesizes complex information clearly.",
74
- "specialization": "Research and knowledge synthesis",
75
- "tools": ["some_tool"]
76
- },
77
- {
78
- "name": "customer_support",
79
- "instructions": "You provide friendly, helpful customer support responses.",
80
- "specialization": "Customer inquiries",
81
- }
82
- ],
83
- }
84
-
85
- solana_agent = SolanaAgent(config=config)
86
-
87
- async for response in solana_agent.process("user123", "What are the latest AI developments?"):
88
- print(response, end="")
89
- ```
90
-
91
- ## Solana Agent Kit
92
-
93
- A collection of Solana Agent tools
94
-
95
- [Solana Agent Kit](https://github.com/truemagic-coder/solana-agent-kit)
96
-
97
- ## Example App
98
-
99
- A Solana Agent example app written in FastAPI and Next.js
100
-
101
- [Solana Agent Example App](https://github.com/truemagic-coder/solana-agent-app)
102
-
103
- ## License
104
-
105
- This project is licensed under the MIT License - see the LICENSE file for details.
File without changes