solana-agent 11.3.0__py3-none-any.whl → 14.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.
Files changed (39) hide show
  1. solana_agent/__init__.py +33 -1
  2. solana_agent/adapters/__init__.py +6 -0
  3. solana_agent/adapters/llm_adapter.py +123 -0
  4. solana_agent/adapters/mongodb_adapter.py +69 -0
  5. solana_agent/client/__init__.py +0 -0
  6. solana_agent/client/solana_agent.py +75 -0
  7. solana_agent/domains/__init__.py +6 -0
  8. solana_agent/domains/agents.py +80 -0
  9. solana_agent/domains/routing.py +14 -0
  10. solana_agent/factories/__init__.py +0 -0
  11. solana_agent/factories/agent_factory.py +148 -0
  12. solana_agent/interfaces/__init__.py +11 -0
  13. solana_agent/interfaces/plugins/plugins.py +118 -0
  14. solana_agent/interfaces/providers/data_storage.py +53 -0
  15. solana_agent/interfaces/providers/llm.py +34 -0
  16. solana_agent/interfaces/providers/memory.py +38 -0
  17. solana_agent/interfaces/repositories/agent.py +33 -0
  18. solana_agent/interfaces/services/agent.py +41 -0
  19. solana_agent/interfaces/services/query.py +11 -0
  20. solana_agent/interfaces/services/routing.py +19 -0
  21. solana_agent/plugins/__init__.py +6 -0
  22. solana_agent/plugins/manager.py +147 -0
  23. solana_agent/plugins/registry.py +64 -0
  24. solana_agent/plugins/tools/__init__.py +10 -0
  25. solana_agent/plugins/tools/auto_tool.py +47 -0
  26. solana_agent/repositories/__init__.py +6 -0
  27. solana_agent/repositories/agent.py +99 -0
  28. solana_agent/repositories/memory.py +134 -0
  29. solana_agent/services/__init__.py +6 -0
  30. solana_agent/services/agent.py +320 -0
  31. solana_agent/services/query.py +223 -0
  32. solana_agent/services/routing.py +149 -0
  33. solana_agent-14.0.0.dist-info/METADATA +121 -0
  34. solana_agent-14.0.0.dist-info/RECORD +36 -0
  35. solana_agent/ai.py +0 -7590
  36. solana_agent-11.3.0.dist-info/METADATA +0 -443
  37. solana_agent-11.3.0.dist-info/RECORD +0 -6
  38. {solana_agent-11.3.0.dist-info → solana_agent-14.0.0.dist-info}/LICENSE +0 -0
  39. {solana_agent-11.3.0.dist-info → solana_agent-14.0.0.dist-info}/WHEEL +0 -0
@@ -1,443 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: solana-agent
3
- Version: 11.3.0
4
- Summary: The Future of Work
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: ntplib (>=0.4.0,<0.5.0)
17
- Requires-Dist: openai (>=1.66.2,<2.0.0)
18
- Requires-Dist: pandas (>=2.2.3,<3.0.0)
19
- Requires-Dist: pinecone (>=6.0.1,<7.0.0)
20
- Requires-Dist: pydantic (>=2.10.6,<3.0.0)
21
- Requires-Dist: pymongo (>=4.11.2,<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
- Requires-Dist: zep-cloud (>=2.6.1,<3.0.0)
25
- Requires-Dist: zep-python (>=2.0.2,<3.0.0)
26
- Project-URL: Repository, https://github.com/truemagic-coder/solana-agent
27
- Description-Content-Type: text/markdown
28
-
29
- # Solana Agent
30
-
31
- [![PyPI - Version](https://img.shields.io/pypi/v/solana-agent)](https://pypi.org/project/solana-agent/)
32
- [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
33
- [![Python 3.12+](https://img.shields.io/badge/python-3.12+-orange.svg)](https://www.python.org/downloads/)
34
- [![codecov](https://img.shields.io/codecov/c/github/truemagic-coder/solana-agent/main.svg)](https://codecov.io/gh/truemagic-coder/solana-agent)
35
- [![Build Status](https://img.shields.io/github/actions/workflow/status/truemagic-coder/solana-agent/test.yml?branch=main)](https://github.com/truemagic-coder/solana-agent/actions/workflows/test.yml)
36
-
37
- ![Solana Agent Logo](https://dl.walletbubbles.com/solana-agent-logo.png?width=200)
38
-
39
- ## Why Solana Agent?
40
-
41
- Reinventing Organizational Structures Through AI
42
- Solana Agent isn't just an AI framework—it's the foundation for reimagining how humans organize, collaborate, and create value together. Build organizations that transcend traditional hierarchies and unlock collective intelligence at scale.
43
-
44
- ### The Future of Work Starts Here:
45
-
46
- - **Decentralized Decision Making:**
47
- Enable distributed expertise through AI-human collaboration, removing bottlenecks and centralizing only the mission, not the authority.
48
-
49
- - **Organization as Living Code:**
50
- Define your organization's values, expertise boundaries, and operating principles in code, making structure transparent and adaptable.
51
-
52
- - **Fluid Collaboration Networks:**
53
- Replace rigid hierarchies with dynamic agent networks that form, collaborate, and dissolve based on real-time needs.
54
-
55
- - **Knowledge as Collective Asset:**
56
- Transform individual expertise into organizational intelligence through autonomous knowledge extraction and distribution.
57
-
58
- - **Permissionless Value Creation:**
59
- Let agents (both AI and human) contribute and innovate freely within guardrails defined by mission and values, not management layers.
60
-
61
- ## The Future of Work
62
-
63
- Solana Agent enables a paradigm shift in how work gets done:
64
-
65
- - **Beyond Human Resource Constraints:**
66
- Scale knowledge work infinitely by combining specialized AI agents with human experts.
67
- - **Continuous 24/7 Operations:**
68
- Organizational functions that never sleep, never burn out, and continuously learn.
69
- - **Task-Agent Fit Optimization:**
70
- Matching work to the ideal agent (human or AI) based on real-time expertise mapping.
71
- - **Ambient Organizational Intelligence:**
72
- Collective knowledge that grows, refines, and distributes itself autonomously.
73
- - **From Managers to Facilitators:**
74
- Human roles shift from directing work to defining outcomes and improving agent capabilities.
75
- - **Permissionless Contribution:**
76
- Anyone can interact with and extend the organization through standardized interfaces.
77
-
78
- ## Organization as Code
79
-
80
- With Solana Agent, your organizational design becomes explicit, observable, and iteratively improvable:
81
-
82
- - **Declarative Organizational Structure:**
83
- Define your entire organization's capabilities through agent specializations and interaction patterns.
84
- - **Version-Controlled Operational Logic:**
85
- Track organizational evolution and performance through code changes.
86
- - **Mission Function:**
87
- Encode organizational values and goals as executable functions that guide all agent decisions.
88
- - **Rapid Organizational Experiments:**
89
- Test new structures, policies, and collaborative patterns without disruptive reorganizations.
90
- - **Transparency by Default:**
91
- Make decision boundaries and expertise domains explicit in code rather than hidden in hierarchy.
92
- - **Self-Documenting Operations:**
93
- The organization continuously documents its own functions, decisions, and knowledge.
94
-
95
- ## Decentralized Organization
96
-
97
- Solana Agent provides the infrastructure to build truly decentralized organizations:
98
-
99
- - **Multi-Node Intelligence:**
100
- Distribute cognitive load across specialized agents with no central controller.
101
- - **Autonomous Coordination:**
102
- Agents self-organize based on capabilities and availability without central dispatching.
103
- - **Edge Decision Making:**
104
- Push decisions to the agents closest to the information and expertise needed.
105
- - **Resilient Architecture:**
106
- No single point of failure in organizational knowledge or operational capacity.
107
- - **Emergent Problem Solving:**
108
- Solutions emerge from collaborative agent interactions rather than top-down directives.
109
- - **Fractal Scaling:**
110
- Add new domains of expertise by replicating the agent swarm pattern without hierarchical constraints.
111
-
112
- ## Complete Flat Organization
113
-
114
- Eliminate management hierarchies while maintaining coordination and alignment:
115
-
116
- - **Mission-Driven Alignment:**
117
- All agents align through shared values and outcomes defined in the unified mission framework.
118
- - **Peer-to-Peer Handoffs:**
119
- Both AI and human agents coordinate as equals through standardized interfaces.
120
- - **Expertise-Based Authority:**
121
- Influence derives from demonstrable expertise rather than position.
122
- - **Universal Access Protocol:**
123
- Consistent interfaces for interacting with any part of the organization.
124
- - **Transparent Contribution Tracking:**
125
- Meritocratic recognition of value creation across the network.
126
- - **Adaptive Resource Allocation:**
127
- Direct resources to high-impact areas without bureaucratic approval chains.
128
-
129
- ## Learning Organization
130
-
131
- Solana Agent transforms organizations into living systems that continuously learn, adapt, and evolve:
132
-
133
- - **Collective Memory Acceleration:**
134
- Extract and preserve organizational knowledge across all agents automatically.
135
- - **Autonomous Self-Improvement:**
136
- AI critic framework identifies weaknesses and implements improvements without human intervention.
137
- - **Experiential Learning Loops:**
138
- Every interaction refines capabilities through rapid feedback cycles.
139
- - **Cross-Domain Knowledge Synthesis:**
140
- Break down information silos through semantic connections across domains.
141
- - **Living Knowledge Repository:**
142
- Build an organizational brain that becomes more valuable with each interaction.
143
- - **Pattern Recognition at Scale:**
144
- Identify trends invisible to individual actors through network-wide analysis.
145
- - **Failure-Embracing Architecture:**
146
- Convert mistakes into learning opportunities through systematic analysis.
147
- - **Performance-Based Optimization:**
148
- Route tasks to agents with highest satisfaction scores through NPS feedback integration.
149
- - **Continuous Quality Assessment:**
150
- Monitor interaction quality through automated satisfaction surveys and impact metrics.
151
-
152
- ## Technical Features
153
-
154
- - **🗣️ Advanced Interaction Layer:**
155
- Streaming text-based conversations with real-time thinking.
156
- Multi-turn context preservation and reasoning.
157
-
158
- - **🤖 Multi-Agent Swarm Architecture:**
159
- Dynamic specialized agent creation and coordination.
160
- Intelligent routing based on query content, agent expertise, and performance metrics.
161
- Seamless handoffs with comprehensive context passing.
162
- Shared memory and collective intelligence across the entire swarm.
163
-
164
- - **👥 Human-AI Collaboration:**
165
- Hybrid AI-human collaboration system with seamless handoffs.
166
- Ticket management for complex or sensitive inquiries.
167
- Multiple handoff patterns (AI↔human, human↔human).
168
- In-chat command system for human agents to manage tickets.
169
- Availability status management with automatic timeout detection.
170
- Direct agent-to-agent communication for real-time consultation.
171
-
172
- - **🧠 Distributed Intelligence Capabilities:**
173
- Cross-domain knowledge integration from multiple sources.
174
- Self-organizing information architecture.
175
- Autonomous knowledge extraction and refinement.
176
- Time-aware contextual responses.
177
- Self-critical improvement systems.
178
-
179
- - **🎫 Comprehensive Ticket System:**
180
- Universal ticket tracking for all interactions (AI-to-AI and AI-to-human).
181
- Structured resolution assessment with confidence scoring.
182
- Automatic ticket lifecycle management with AI-driven resolution.
183
- Intelligent handoffs maintaining ticket context across agents.
184
- Command-line interface for human ticket management.
185
- Metrics and analytics on resolution quality and time.
186
- Proactive reminders for pending human-assigned tickets.
187
- Auto-reassignment system for stalled tickets.
188
- Human agent activity tracking and status management.
189
-
190
- - **📅 Comprehensive Scheduling System:**
191
- Intelligent task scheduling based on agent specialization and availability.
192
- Time-off request management with automated approval workflows.
193
- Conflict detection and resolution for overlapping assignments.
194
- Schedule optimization for maximum efficiency and workload balancing.
195
- Human agent availability tracking with timezone support.
196
- Recurring schedule patterns with exception handling.
197
- Focus time protection to ensure uninterrupted deep work.
198
- Automated task reassignment when agents become unavailable.
199
- Command-line interface for viewing and managing schedules.
200
- Capacity-aware scheduling to prevent agent overloading.
201
- Schedule analytics and efficiency metrics.
202
-
203
- - **🏢 Comprehensive Resource Management System:**
204
- Complete resource scheduling and booking infrastructure.
205
- Resource categorization with customizable attributes and capabilities.
206
- Intelligent conflict detection and prevention for bookings.
207
- Location-aware resource tracking with hierarchical location model.
208
- Availability management with customizable recurring schedules.
209
- User-level booking authorization with permission controls.
210
- Resource discovery by type, capacity, and available features.
211
- Command-line interface for resource management.
212
- Booking lifecycle management with confirmation and cancellation.
213
- Time-aware resource scheduling across time zones.
214
- Resource utilization analytics and optimization.
215
-
216
- - **📊 Performance Optimization Framework:**
217
- Integrated Net Promoter Score (NPS) system for interaction quality measurement.
218
- Automatic satisfaction surveys after ticket resolution.
219
- Performance-weighted agent routing based on satisfaction scores.
220
- Continuous quality monitoring and feedback loops.
221
- Simple rating submission for users with optional feedback.
222
- Agent performance analytics and trend identification.
223
-
224
- - **📋 Task Planning System:**
225
- Automated complexity assessment for incoming tasks.
226
- Task decomposition into subtasks with dependencies.
227
- Intelligent workload distribution based on agent capacity.
228
- Resource requirements identification for each subtask.
229
- Automatic resource allocation based on task needs.
230
- Resource-aware scheduling to prevent conflicts.
231
- Integrated resource and agent availability checking.
232
- Command-line interface for resource allocation to tasks.
233
- Visual progress tracking with completion estimates.
234
- Prioritization based on urgency, importance, and dependencies.
235
- Resource utilization optimization across project timelines.
236
-
237
- - **🛡️ Governance Framework:**
238
- Define organization-wide values and operating principles in code.
239
- Consistent decision-making aligned with organizational priorities.
240
- Privacy-preserving knowledge sharing with configurable controls.
241
- Transparent insight extraction with review capabilities.
242
- Performance analytics across the agent network.
243
-
244
- - **🔍 Project Simulation Framework:**
245
- Data-driven project feasibility assessment using historical performance.
246
- Intelligent timeline estimation based on similar past projects.
247
- Risk analysis with probability and impact scoring.
248
- Resource requirement prediction and availability matching.
249
- System load analysis to prevent overcommitment.
250
- Comprehensive recommendation engine with contextual insights.
251
- Historical satisfaction trend analysis for similar work.
252
-
253
- - **✅ Human Approval Workflow:**
254
- Configurable approval requirements for complex projects.
255
- Simple queries bypass approval for efficient handling.
256
- Data-driven approval process with simulation results.
257
- Multi-approver support with role-based authorization.
258
- Project lifecycle tracking from submission to approval/rejection.
259
- Transparent decision documentation with comments and rationale.
260
-
261
- - **🔔 Notification System:**
262
- Multi-channel notifications for human agents.
263
- Approval request routing to authorized approvers.
264
- Configurable notification handlers for different channels.
265
- Real-time and asynchronous communication support.
266
- Status tracking for notification delivery and response.
267
-
268
- - **🏢 Multi-tenant Platform Architecture:**
269
- Complete tenant isolation with separate databases and storage.
270
- Tenant-specific configuration overrides with inheritance from global defaults.
271
- Support for both Qdrant and Pinecone vector databases.
272
- Per-tenant agent specialization and customization.
273
- Centralized management through tenant registry.
274
- Resource sharing with tenant-level permissions.
275
- Standardized interfaces across all tenants.
276
- Efficient multi-tenant scaling with shared infrastructure.
277
-
278
- - **🔌 Standard Python Plugin System:**
279
- Extensible architecture using Python's native package ecosystem.
280
- PyPI-compatible plugin distribution with standard dependency management.
281
- Entry point registration (`solana_agent.plugins`) for seamless discovery.
282
- Tool registry for AI agent capability extension.
283
- Permission-based tool access for security and control.
284
- Clean interface for third-party integrations through standard Python APIs.
285
- Runtime tool discovery without service restarts.
286
-
287
- ## Implementation Technologies
288
-
289
- Solana Agent leverages multiple technologies to enable these capabilities:
290
-
291
- - **Knowledge Integration:**
292
- Zep memory and Pinecone or Qdrant vector search.
293
- - **Collaborative Intelligence:**
294
- Multi-agent swarm architecture with specialized expertise domains.
295
- - **Human-AI Teaming:**
296
- Integrated ticketing, notification systems, and real-time handoffs.
297
- - **Organization Alignment:**
298
- Unified mission framework, critic system, and collective memory.
299
- - **External Integration:**
300
- Plugin system for extensible tool capabilities and API connections.
301
-
302
- ## Installation
303
-
304
- You can install Solana Agent using pip:
305
-
306
- `pip install solana-agent`
307
-
308
- ## Documentation
309
-
310
- Each public method has a docstring for real-time IDE hinting.
311
-
312
- ## Example App
313
-
314
- ```python
315
- from solana_agent import SolanaAgent
316
-
317
- # Define configuration with plugins
318
- config = {
319
- "organization": {
320
- "mission_statement": "To revolutionize knowledge work through AI-human collaboration that puts people first.",
321
- "values": {
322
- "Human-Centered": "Always prioritize human well-being and augmentation over replacement.",
323
- "Transparency": "Provide clear explanations for decisions and never hide information.",
324
- "Collective Intelligence": "Value diverse perspectives and combine human and AI strengths.",
325
- "Continuous Learning": "Embrace feedback and continuously improve based on experience."
326
- },
327
- "goals": [
328
- "Enable human experts to focus on high-value creative work",
329
- "Reduce administrative overhead through intelligent automation",
330
- "Create seamless knowledge flow across the organization"
331
- ],
332
- "guidance": "When making decisions, prioritize long-term user success over short-term efficiency."
333
- },
334
- "mongo": {
335
- "connection_string": "mongodb://localhost:27017",
336
- "database": "solana_agent"
337
- },
338
- "openai": {
339
- "api_key": "your-openai-key",
340
- "default_model": "gpt-4o-mini"
341
- },
342
- "pinecone": {
343
- "api_key": "your-pinecone-key",
344
- "index": "your-index"
345
- },
346
- "stalled_ticket_timeout": 60,
347
- "ai_agents": [
348
- {
349
- "name": "research_specialist",
350
- "instructions": "You are an expert researcher who synthesizes complex information clearly.",
351
- "specialization": "Research and knowledge synthesis",
352
- "model": "o3-mini",
353
- "tools": ["search_internet"]
354
- },
355
- {
356
- "name": "customer_support",
357
- "instructions": "You provide friendly, helpful customer support responses.",
358
- "specialization": "Customer inquiries",
359
- "model": "gpt-4o-mini"
360
- }
361
- ],
362
- "human_agents": [
363
- {
364
- "agent_id": "expert_dev",
365
- "name": "Senior Developer",
366
- "specialization": "Complex technical issues"
367
- },
368
- {
369
- "agent_id": "support_lead",
370
- "name": "Support Team Lead",
371
- "specialization": "Escalated customer issues"
372
- }
373
- ],
374
- "api_keys": {
375
- "perplexity": "your-perplexity-key" # For internet search plugin
376
- }
377
- }
378
-
379
- # Create agent with configuration
380
- solana_agent = SolanaAgent(config=config)
381
-
382
- # Process a query that can use tools
383
- async for response in solana_agent.process("user123", "What are the latest AI developments?"):
384
- print(response, end="")
385
- ```
386
-
387
- ## Example Plugin
388
-
389
- `my_plugin/plugin.py`
390
-
391
- ```python
392
- from solana_agent import Tool
393
-
394
- class MyCustomTool(Tool):
395
- @property
396
- def name(self) -> str:
397
- return "my_custom_tool"
398
-
399
- @property
400
- def description(self) -> str:
401
- return "Does something amazing"
402
-
403
- @property
404
- def parameters_schema(self) -> dict:
405
- return {
406
- "type": "object",
407
- "properties": {
408
- "parameter1": {"type": "string", "description": "First parameter"}
409
- }
410
- }
411
-
412
- def execute(self, **kwargs) -> dict:
413
- # Tool implementation here
414
- return {"result": "success", "data": "Something amazing"}
415
-
416
- class SolanaPlugin:
417
- def get_tools(self):
418
- return [MyCustomTool()]
419
- ```
420
-
421
- `pyproject.toml`
422
-
423
- ```toml
424
- [build-system]
425
- requires = ["setuptools>=42", "wheel"]
426
- build-backend = "setuptools.build_meta"
427
-
428
- [project]
429
- name = "my-solana-plugin"
430
- version = "0.1.0"
431
-
432
- [project.entry-points."solana_agent.plugins"]
433
- my_plugin = "my_plugin.plugin:SolanaPlugin"
434
- ```
435
-
436
- ## Example App
437
-
438
- [Solana Agent Example App](https://github.com/truemagic-coder/solana-agent-app)
439
-
440
- ## License
441
-
442
- This project is licensed under the MIT License - see the LICENSE file for details.
443
-
@@ -1,6 +0,0 @@
1
- solana_agent/__init__.py,sha256=zpfnWqANd3OHGWm7NCF5Y6m01BWG4NkNk8SK9Ex48nA,18
2
- solana_agent/ai.py,sha256=W5h6hckGY_NAkqFFOQtuocdTbDfJnqNY9_Z7RYYy2K0,290852
3
- solana_agent-11.3.0.dist-info/LICENSE,sha256=BnSRc-NSFuyF2s496l_4EyrwAP6YimvxWcjPiJ0J7g4,1057
4
- solana_agent-11.3.0.dist-info/METADATA,sha256=H3juWeX6NQzKqC1mzSLysBURiykMRw_hM9gwfzE-cOE,19603
5
- solana_agent-11.3.0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
6
- solana_agent-11.3.0.dist-info/RECORD,,