daita-agents 0.1.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.

Potentially problematic release.


This version of daita-agents might be problematic. Click here for more details.

Files changed (69) hide show
  1. daita/__init__.py +208 -0
  2. daita/agents/__init__.py +33 -0
  3. daita/agents/base.py +722 -0
  4. daita/agents/substrate.py +895 -0
  5. daita/cli/__init__.py +145 -0
  6. daita/cli/__main__.py +7 -0
  7. daita/cli/ascii_art.py +44 -0
  8. daita/cli/core/__init__.py +0 -0
  9. daita/cli/core/create.py +254 -0
  10. daita/cli/core/deploy.py +473 -0
  11. daita/cli/core/deployments.py +309 -0
  12. daita/cli/core/import_detector.py +219 -0
  13. daita/cli/core/init.py +382 -0
  14. daita/cli/core/logs.py +239 -0
  15. daita/cli/core/managed_deploy.py +709 -0
  16. daita/cli/core/run.py +648 -0
  17. daita/cli/core/status.py +421 -0
  18. daita/cli/core/test.py +239 -0
  19. daita/cli/core/webhooks.py +172 -0
  20. daita/cli/main.py +588 -0
  21. daita/cli/utils.py +541 -0
  22. daita/config/__init__.py +62 -0
  23. daita/config/base.py +159 -0
  24. daita/config/settings.py +184 -0
  25. daita/core/__init__.py +262 -0
  26. daita/core/decision_tracing.py +701 -0
  27. daita/core/exceptions.py +480 -0
  28. daita/core/focus.py +251 -0
  29. daita/core/interfaces.py +76 -0
  30. daita/core/plugin_tracing.py +550 -0
  31. daita/core/relay.py +695 -0
  32. daita/core/reliability.py +381 -0
  33. daita/core/scaling.py +444 -0
  34. daita/core/tools.py +402 -0
  35. daita/core/tracing.py +770 -0
  36. daita/core/workflow.py +1084 -0
  37. daita/display/__init__.py +1 -0
  38. daita/display/console.py +160 -0
  39. daita/execution/__init__.py +58 -0
  40. daita/execution/client.py +856 -0
  41. daita/execution/exceptions.py +92 -0
  42. daita/execution/models.py +317 -0
  43. daita/llm/__init__.py +60 -0
  44. daita/llm/anthropic.py +166 -0
  45. daita/llm/base.py +373 -0
  46. daita/llm/factory.py +101 -0
  47. daita/llm/gemini.py +152 -0
  48. daita/llm/grok.py +114 -0
  49. daita/llm/mock.py +135 -0
  50. daita/llm/openai.py +109 -0
  51. daita/plugins/__init__.py +141 -0
  52. daita/plugins/base.py +37 -0
  53. daita/plugins/base_db.py +167 -0
  54. daita/plugins/elasticsearch.py +844 -0
  55. daita/plugins/mcp.py +481 -0
  56. daita/plugins/mongodb.py +510 -0
  57. daita/plugins/mysql.py +351 -0
  58. daita/plugins/postgresql.py +331 -0
  59. daita/plugins/redis_messaging.py +500 -0
  60. daita/plugins/rest.py +529 -0
  61. daita/plugins/s3.py +761 -0
  62. daita/plugins/slack.py +729 -0
  63. daita/utils/__init__.py +18 -0
  64. daita_agents-0.1.0.dist-info/METADATA +350 -0
  65. daita_agents-0.1.0.dist-info/RECORD +69 -0
  66. daita_agents-0.1.0.dist-info/WHEEL +5 -0
  67. daita_agents-0.1.0.dist-info/entry_points.txt +2 -0
  68. daita_agents-0.1.0.dist-info/licenses/LICENSE +56 -0
  69. daita_agents-0.1.0.dist-info/top_level.txt +1 -0
daita/__init__.py ADDED
@@ -0,0 +1,208 @@
1
+ """
2
+ Daita Agents - A flexible framework for AI agent creation and orchestration.
3
+
4
+ This module provides the main entry point for the Daita framework with
5
+ automatic tracing and observability built-in.
6
+
7
+ Key Components:
8
+ - Agent framework with BaseAgent and SubstrateAgent
9
+ - LLM provider abstractions for OpenAI, Anthropic, Grok, and Gemini
10
+ - Plugin system for database and API integrations
11
+ - Workflow orchestration for multi-agent systems
12
+ - Unified tracing system for automatic observability
13
+ - Decision tracing for agent reasoning capture
14
+ - Plugin execution monitoring
15
+ """
16
+
17
+ # Version info
18
+ __version__ = "0.3.2"
19
+
20
+ # PRIMARY INTERFACE - Direct classes
21
+ from .agents.substrate import SubstrateAgent
22
+ from .agents.base import BaseAgent
23
+
24
+ # Plugin system - Direct imports
25
+ from .plugins import postgresql, mysql, mongodb, rest, s3, slack, elasticsearch
26
+ from .plugins import PluginAccess
27
+
28
+ # Configuration classes
29
+ from .config.base import AgentConfig, DaitaConfig, AgentType, RetryPolicy, RetryStrategy
30
+
31
+ # Reliability components - NEW: Production-grade reliability features
32
+ from .core.reliability import (
33
+ TaskManager,
34
+ TaskStatus,
35
+ BackpressureController,
36
+ CircuitBreaker,
37
+ CircuitState
38
+ )
39
+
40
+ # Core interfaces - For advanced users who want to implement custom components
41
+ from .core.interfaces import (
42
+ Agent,
43
+ LLMProvider,
44
+ DatabaseBackend,
45
+ DataProcessor
46
+ )
47
+
48
+ # Core workflow components - For multi-agent systems
49
+ from .core.workflow import Workflow, ReliabilityConfig
50
+ from .core.relay import RelayManager
51
+
52
+ # Scaling components - For horizontal scaling
53
+ from .core.scaling import AgentPool, LoadBalancer, PoolStatus, create_agent_pool
54
+
55
+ # Exception hierarchy - For error handling
56
+ from .core.exceptions import (
57
+ DaitaError,
58
+ AgentError,
59
+ LLMError,
60
+ ConfigError,
61
+ PluginError,
62
+ WorkflowError,
63
+ # Retry-specific exceptions
64
+ TransientError,
65
+ RetryableError,
66
+ PermanentError,
67
+ # Specific error types
68
+ RateLimitError,
69
+ TimeoutError,
70
+ AuthenticationError,
71
+ ValidationError,
72
+ # Reliability-specific exceptions
73
+ BackpressureError,
74
+ TaskTimeoutError,
75
+ AcknowledgmentTimeoutError,
76
+ TaskNotFoundError,
77
+ ReliabilityConfigurationError,
78
+ CircuitBreakerOpenError
79
+ )
80
+
81
+ # LLM providers - For direct LLM access
82
+ from .llm.factory import create_llm_provider
83
+ from .llm.openai import OpenAIProvider
84
+ from .llm.anthropic import AnthropicProvider
85
+ from .llm.grok import GrokProvider
86
+ from .llm.gemini import GeminiProvider
87
+ from .llm.mock import MockLLMProvider
88
+
89
+ # Plugin system - For database and API integrations
90
+ from .plugins import PluginAccess
91
+ from .plugins.redis_messaging import RedisMessagingPlugin, redis_messaging
92
+
93
+ # Automatic Tracing System - NEW: Zero-configuration observability
94
+ from .core.tracing import (
95
+ get_trace_manager,
96
+ TraceType,
97
+ TraceStatus
98
+ )
99
+
100
+ # Plugin Tracing - NEW: Automatic tool execution monitoring
101
+ from .core.plugin_tracing import (
102
+ trace_plugin,
103
+ traced_postgresql,
104
+ traced_mysql,
105
+ traced_mongodb,
106
+ traced_rest
107
+ )
108
+
109
+ # Decision Tracing - NEW: Agent reasoning and confidence capture
110
+ from .core.decision_tracing import (
111
+ record_decision_point,
112
+ trace_decision,
113
+ DecisionType
114
+ )
115
+
116
+ # Autonomous Execution - NEW: Programmatic agent execution
117
+ from .execution.client import DaitaClient
118
+ from .execution.models import ExecutionResult, ScheduledTask, WebhookTrigger
119
+ from .execution.exceptions import ExecutionError
120
+
121
+ # MAIN EXPORTS
122
+ __all__ = [
123
+ # PRIMARY INTERFACES - Direct classes (what users need most)
124
+ "SubstrateAgent",
125
+ "BaseAgent",
126
+ "Workflow",
127
+ "DaitaClient",
128
+
129
+ # PLUGIN FUNCTIONS - Direct imports (new primary way)
130
+ "postgresql", "mysql", "mongodb", "rest", "s3", "slack", "elasticsearch",
131
+
132
+ # CORE UTILITIES - Essential framework features
133
+ "RelayManager",
134
+ "create_llm_provider",
135
+ "DaitaError",
136
+ "get_trace_manager",
137
+
138
+ # CONFIGURATION - Optional advanced usage
139
+ "AgentConfig",
140
+ "DaitaConfig",
141
+ "AgentType",
142
+ "RetryPolicy",
143
+ "RetryStrategy",
144
+
145
+ # LEGACY COMPONENTS - Advanced/internal usage
146
+ "PluginAccess",
147
+
148
+ # Advanced workflow components
149
+ "ReliabilityConfig",
150
+ "AgentPool",
151
+ "LoadBalancer",
152
+ "create_agent_pool",
153
+
154
+ # Exception hierarchy
155
+ "AgentError",
156
+ "LLMError",
157
+ "ConfigError",
158
+ "PluginError",
159
+ "WorkflowError",
160
+
161
+ # LLM providers (optional - auto-created by agents)
162
+ "OpenAIProvider",
163
+ "AnthropicProvider",
164
+ "GrokProvider",
165
+ "GeminiProvider",
166
+
167
+ # Advanced interfaces
168
+ "Agent",
169
+ "LLMProvider",
170
+
171
+ # Tracing (automatic - optional direct access)
172
+ "TraceType",
173
+ "record_decision_point",
174
+ "trace_decision",
175
+
176
+ # Autonomous execution models and exceptions
177
+ "ExecutionResult",
178
+ "ScheduledTask",
179
+ "WebhookTrigger",
180
+ "ExecutionError"
181
+ ]
182
+
183
+ # Framework metadata
184
+ FRAMEWORK_INFO = {
185
+ "name": "Daita Agents",
186
+ "version": __version__,
187
+ "description": "A flexible framework for AI agent creation and orchestration with automatic tracing",
188
+ "features": [
189
+ "Zero-configuration automatic tracing",
190
+ "Production-grade reliability features",
191
+ "Message acknowledgments and task tracking",
192
+ "Backpressure control and circuit breakers",
193
+ "Agent operation monitoring",
194
+ "LLM call tracking with costs",
195
+ "Plugin/tool execution tracing",
196
+ "Decision reasoning capture",
197
+ "Workflow communication tracking",
198
+ "Dashboard integration"
199
+ ],
200
+ "tracing_enabled": True
201
+ }
202
+
203
+ def get_framework_info() -> dict:
204
+ """Get framework information and metadata."""
205
+ return FRAMEWORK_INFO.copy()
206
+
207
+ # Add to exports
208
+ __all__.append("get_framework_info")
@@ -0,0 +1,33 @@
1
+ """
2
+ Agent implementations for Daita Agents.
3
+
4
+ This module provides the core agent implementations:
5
+ - BaseAgent: Foundation class with retry logic and error handling
6
+ - SubstrateAgent: Flexible agent that can be customized with handlers and presets
7
+
8
+ The agent system is designed around the SubstrateAgent as the primary interface,
9
+ with preset configurations for common patterns like analysis and transformation.
10
+
11
+ Usage:
12
+ ```python
13
+ from daita.agents import SubstrateAgent
14
+
15
+ # Direct instantiation (recommended)
16
+ agent = SubstrateAgent(name="My Agent", llm_provider="openai", model="gpt-4")
17
+
18
+ # Or with configuration object (backward compatibility)
19
+ from daita.config.base import AgentConfig
20
+ config = AgentConfig(name="My Agent")
21
+ agent = SubstrateAgent(config=config)
22
+ ```
23
+ """
24
+
25
+ # Core agent classes
26
+ from .base import BaseAgent
27
+ from .substrate import SubstrateAgent
28
+
29
+ # Export all agent functionality
30
+ __all__ = [
31
+ "BaseAgent",
32
+ "SubstrateAgent",
33
+ ]