webagents 0.1.13__py3-none-any.whl → 0.2.2__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 (77) hide show
  1. webagents/__init__.py +1 -1
  2. webagents/__main__.py +55 -0
  3. webagents/agents/__init__.py +1 -1
  4. webagents/agents/core/__init__.py +1 -1
  5. webagents/agents/core/base_agent.py +15 -15
  6. webagents/agents/core/handoffs.py +1 -1
  7. webagents/agents/skills/__init__.py +11 -11
  8. webagents/agents/skills/base.py +1 -1
  9. webagents/agents/skills/core/llm/litellm/__init__.py +1 -1
  10. webagents/agents/skills/core/llm/litellm/skill.py +1 -1
  11. webagents/agents/skills/core/mcp/README.md +2 -2
  12. webagents/agents/skills/core/mcp/skill.py +2 -2
  13. webagents/agents/skills/core/memory/long_term_memory/memory_skill.py +14 -14
  14. webagents/agents/skills/core/memory/short_term_memory/__init__.py +1 -1
  15. webagents/agents/skills/core/memory/short_term_memory/skill.py +1 -1
  16. webagents/agents/skills/core/memory/vector_memory/skill.py +6 -6
  17. webagents/agents/skills/core/planning/__init__.py +1 -1
  18. webagents/agents/skills/ecosystem/crewai/__init__.py +3 -1
  19. webagents/agents/skills/ecosystem/crewai/skill.py +158 -0
  20. webagents/agents/skills/ecosystem/database/__init__.py +3 -1
  21. webagents/agents/skills/ecosystem/database/skill.py +522 -0
  22. webagents/agents/skills/ecosystem/google/calendar/skill.py +1 -1
  23. webagents/agents/skills/ecosystem/mongodb/__init__.py +3 -0
  24. webagents/agents/skills/ecosystem/mongodb/skill.py +428 -0
  25. webagents/agents/skills/ecosystem/n8n/README.md +287 -0
  26. webagents/agents/skills/ecosystem/n8n/__init__.py +3 -0
  27. webagents/agents/skills/ecosystem/n8n/skill.py +341 -0
  28. webagents/agents/skills/ecosystem/x_com/README.md +401 -0
  29. webagents/agents/skills/ecosystem/x_com/__init__.py +3 -0
  30. webagents/agents/skills/ecosystem/x_com/skill.py +1048 -0
  31. webagents/agents/skills/ecosystem/zapier/README.md +363 -0
  32. webagents/agents/skills/ecosystem/zapier/__init__.py +3 -0
  33. webagents/agents/skills/ecosystem/zapier/skill.py +337 -0
  34. webagents/agents/skills/robutler/__init__.py +2 -2
  35. webagents/agents/skills/robutler/auth/__init__.py +3 -3
  36. webagents/agents/skills/robutler/auth/skill.py +16 -16
  37. webagents/agents/skills/robutler/crm/__init__.py +2 -2
  38. webagents/agents/skills/robutler/crm/skill.py +5 -5
  39. webagents/agents/skills/robutler/discovery/README.md +5 -5
  40. webagents/agents/skills/robutler/discovery/__init__.py +2 -2
  41. webagents/agents/skills/robutler/discovery/skill.py +21 -21
  42. webagents/agents/skills/robutler/message_history/__init__.py +2 -2
  43. webagents/agents/skills/robutler/message_history/skill.py +5 -5
  44. webagents/agents/skills/robutler/nli/__init__.py +1 -1
  45. webagents/agents/skills/robutler/nli/skill.py +9 -9
  46. webagents/agents/skills/robutler/payments/__init__.py +3 -3
  47. webagents/agents/skills/robutler/payments/exceptions.py +1 -1
  48. webagents/agents/skills/robutler/payments/skill.py +23 -23
  49. webagents/agents/skills/robutler/storage/__init__.py +2 -2
  50. webagents/agents/skills/robutler/storage/files/__init__.py +2 -2
  51. webagents/agents/skills/robutler/storage/files/skill.py +4 -4
  52. webagents/agents/skills/robutler/storage/json/__init__.py +1 -1
  53. webagents/agents/skills/robutler/storage/json/skill.py +3 -3
  54. webagents/agents/skills/robutler/storage/kv/skill.py +3 -3
  55. webagents/agents/skills/robutler/storage.py +6 -6
  56. webagents/agents/tools/decorators.py +12 -12
  57. webagents/server/__init__.py +3 -3
  58. webagents/server/context/context_vars.py +2 -2
  59. webagents/server/core/app.py +13 -13
  60. webagents/server/core/middleware.py +3 -3
  61. webagents/server/core/models.py +1 -1
  62. webagents/server/core/monitoring.py +2 -2
  63. webagents/server/middleware.py +1 -1
  64. webagents/server/models.py +2 -2
  65. webagents/server/monitoring.py +15 -15
  66. webagents/utils/logging.py +20 -20
  67. webagents-0.2.2.dist-info/METADATA +266 -0
  68. webagents-0.2.2.dist-info/RECORD +105 -0
  69. webagents-0.2.2.dist-info/licenses/LICENSE +20 -0
  70. webagents/api/__init__.py +0 -17
  71. webagents/api/client.py +0 -1207
  72. webagents/api/types.py +0 -253
  73. webagents-0.1.13.dist-info/METADATA +0 -32
  74. webagents-0.1.13.dist-info/RECORD +0 -96
  75. webagents-0.1.13.dist-info/licenses/LICENSE +0 -1
  76. {webagents-0.1.13.dist-info → webagents-0.2.2.dist-info}/WHEEL +0 -0
  77. {webagents-0.1.13.dist-info → webagents-0.2.2.dist-info}/entry_points.txt +0 -0
@@ -1,7 +1,7 @@
1
1
  """
2
- Robutler Storage Skills
2
+ WebAgents Storage Skills
3
3
 
4
- File and JSON storage capabilities for the Robutler platform.
4
+ File and JSON storage capabilities for the WebAgents platform.
5
5
  """
6
6
 
7
7
  from .files import RobutlerFilesSkill
@@ -1,7 +1,7 @@
1
1
  """
2
- Robutler Files Storage Skill
2
+ WebAgents Files Storage Skill
3
3
 
4
- File management capabilities for the Robutler platform with scope-based access controls.
4
+ File management capabilities for the WebAgents platform with scope-based access controls.
5
5
  """
6
6
 
7
7
  from .skill import RobutlerFilesSkill
@@ -12,12 +12,12 @@ from datetime import datetime
12
12
 
13
13
  from ....base import Skill
14
14
  from webagents.agents.tools.decorators import tool
15
- from webagents.api.client import RobutlerClient
15
+ from robutler.api.client import RobutlerClient
16
16
  from webagents.agents.skills.robutler.payments import pricing, PricingInfo
17
17
 
18
18
  class RobutlerFilesSkill(Skill):
19
19
  """
20
- Robutler portal file management skill using harmonized API.
20
+ WebAgents portal file management skill using harmonized API.
21
21
 
22
22
  Features:
23
23
  - Download and store files from URLs
@@ -33,7 +33,7 @@ class RobutlerFilesSkill(Skill):
33
33
  self.portal_url = config.get('portal_url', 'http://localhost:3000') if config else 'http://localhost:3000'
34
34
  # Base URL used by the chat frontend to serve public content
35
35
  self.chat_base_url = (config.get('chat_base_url') if config else None) or os.getenv('ROBUTLER_CHAT_URL', 'http://localhost:3001')
36
- self.api_key = config.get('api_key', os.getenv('ROBUTLER_API_KEY', 'rok_testapikey')) if config else os.getenv('ROBUTLER_API_KEY', 'rok_testapikey')
36
+ self.api_key = config.get('api_key', os.getenv('WEBAGENTS_API_KEY', 'rok_testapikey')) if config else os.getenv('WEBAGENTS_API_KEY', 'rok_testapikey')
37
37
 
38
38
  # Initialize RobutlerClient
39
39
  self.client = RobutlerClient(
@@ -291,7 +291,7 @@ class RobutlerFilesSkill(Skill):
291
291
  try:
292
292
  from webagents.server.context.context_vars import get_context
293
293
  from webagents.utils.logging import get_logger
294
- logger = get_logger('robutler_files')
294
+ logger = get_logger('webagents_files')
295
295
 
296
296
  # Get context for agent information and auth
297
297
  context = get_context()
@@ -1,5 +1,5 @@
1
1
  """
2
- Robutler JSON Storage Skill
2
+ WebAgents JSON Storage Skill
3
3
 
4
4
  JSON data storage capabilities for long-term memory and agent data persistence.
5
5
  """
@@ -11,12 +11,12 @@ from datetime import datetime
11
11
 
12
12
  from ....base import Skill
13
13
  from webagents.agents.tools.decorators import tool
14
- from webagents.api.client import RobutlerClient
14
+ from robutler.api.client import RobutlerClient
15
15
 
16
16
 
17
17
  class RobutlerJSONSkill(Skill):
18
18
  """
19
- Robutler portal JSON storage skill for long-term memory using RobutlerClient.
19
+ WebAgents portal JSON storage skill for long-term memory using RobutlerClient.
20
20
 
21
21
  Features:
22
22
  - Store/retrieve JSON data for long-term memory
@@ -38,7 +38,7 @@ class RobutlerJSONSkill(Skill):
38
38
  def __init__(self, config: Optional[Dict[str, Any]] = None):
39
39
  super().__init__(config)
40
40
  self.portal_url = config.get('portal_url', 'http://localhost:3000') if config else 'http://localhost:3000'
41
- self.api_key = config.get('api_key', os.getenv('ROBUTLER_API_KEY', 'rok_testapikey')) if config else os.getenv('ROBUTLER_API_KEY', 'rok_testapikey')
41
+ self.api_key = config.get('api_key', os.getenv('WEBAGENTS_API_KEY', 'rok_testapikey')) if config else os.getenv('WEBAGENTS_API_KEY', 'rok_testapikey')
42
42
 
43
43
  # Initialize RobutlerClient
44
44
  self.client = RobutlerClient(
@@ -8,17 +8,17 @@ from typing import Any, Dict, Optional
8
8
  import os
9
9
 
10
10
  from ....base import Skill
11
- from webagents.api.client import RobutlerClient
11
+ from robutler.api.client import RobutlerClient
12
12
  from webagents.agents.tools.decorators import tool
13
13
 
14
14
 
15
15
  class RobutlerKVSkill(Skill):
16
- """KV storage skill using the Robutler portal API"""
16
+ """KV storage skill using the WebAgents portal API"""
17
17
 
18
18
  def __init__(self, config: Optional[Dict[str, Any]] = None):
19
19
  super().__init__(config)
20
20
  self.portal_url = config.get('portal_url') if config else os.getenv('ROBUTLER_API_URL', 'http://localhost:3000')
21
- self.api_key = config.get('api_key') if config else os.getenv('ROBUTLER_API_KEY')
21
+ self.api_key = config.get('api_key') if config else os.getenv('WEBAGENTS_API_KEY')
22
22
  self.client: Optional[RobutlerClient] = None
23
23
  self.agent = None
24
24
 
@@ -1,7 +1,7 @@
1
1
  """
2
- RobutlerStorageSkill - Portal Content Integration
2
+ WebAgentsStorageSkill - Portal Content Integration
3
3
 
4
- Provides integration with the Robutler portal's content storage system
4
+ Provides integration with the WebAgents portal's content storage system
5
5
  for persistent file storage tied to user accounts.
6
6
  """
7
7
 
@@ -15,9 +15,9 @@ from ..base import Skill
15
15
  from ...tools.decorators import tool
16
16
 
17
17
 
18
- class RobutlerStorageSkill(Skill):
18
+ class WebAgentsStorageSkill(Skill):
19
19
  """
20
- Robutler portal storage integration skill.
20
+ WebAgents portal storage integration skill.
21
21
 
22
22
  Features:
23
23
  - Store/retrieve files in user's private content area
@@ -346,7 +346,7 @@ class RobutlerStorageSkill(Skill):
346
346
  "total_size_bytes": total_size,
347
347
  "total_size_mb": round(total_size / (1024 * 1024), 2),
348
348
  "portal_url": self.portal_url,
349
- "storage_location": "robutler_portal_content"
349
+ "storage_location": "webagents_portal_content"
350
350
  }, indent=2)
351
351
  else:
352
352
  return json.dumps({
@@ -363,7 +363,7 @@ class RobutlerStorageSkill(Skill):
363
363
  def get_skill_info(self) -> Dict[str, Any]:
364
364
  """Get comprehensive skill information"""
365
365
  return {
366
- "name": "RobutlerStorageSkill",
366
+ "name": "WebAgentsStorageSkill",
367
367
  "description": "Portal content storage integration for persistent data",
368
368
  "version": "1.0.0",
369
369
  "capabilities": [
@@ -1,5 +1,5 @@
1
1
  """
2
- Tool, Hook, Handoff, and HTTP Decorators - Robutler V2.0
2
+ Tool, Hook, Handoff, and HTTP Decorators - WebAgents V2.0
3
3
 
4
4
  Decorators for automatic registration of tools, hooks, handoffs, and HTTP handlers with BaseAgent.
5
5
  Supports context injection and scope-based access control.
@@ -88,8 +88,8 @@ def tool(func: Optional[Callable] = None, *, name: Optional[str] = None, descrip
88
88
  }
89
89
 
90
90
  # Mark function with metadata for BaseAgent discovery
91
- f._robutler_is_tool = True
92
- f._robutler_tool_definition = tool_schema
91
+ f._webagents_is_tool = True
92
+ f._webagents_tool_definition = tool_schema
93
93
  f._tool_scope = scope
94
94
  f._tool_scope_was_set = func is None # If func is None, decorator was called with params
95
95
  f._tool_name = name or f.__name__
@@ -129,8 +129,8 @@ def tool(func: Optional[Callable] = None, *, name: Optional[str] = None, descrip
129
129
  wrapper = f
130
130
 
131
131
  # Copy metadata to wrapper
132
- wrapper._robutler_is_tool = True
133
- wrapper._robutler_tool_definition = tool_schema
132
+ wrapper._webagents_is_tool = True
133
+ wrapper._webagents_tool_definition = tool_schema
134
134
  wrapper._tool_scope = scope
135
135
  wrapper._tool_scope_was_set = func is None # If func is None, decorator was called with params
136
136
  wrapper._tool_name = name or f.__name__
@@ -163,7 +163,7 @@ def hook(event: str, priority: int = 50, scope: Union[str, List[str]] = "all"):
163
163
  """
164
164
  def decorator(func: Callable) -> Callable:
165
165
  # Mark function with metadata for BaseAgent discovery
166
- func._robutler_is_hook = True
166
+ func._webagents_is_hook = True
167
167
  func._hook_event_type = event
168
168
  func._hook_priority = priority
169
169
  func._hook_scope = scope
@@ -195,7 +195,7 @@ def prompt(priority: int = 50, scope: Union[str, List[str]] = "all"):
195
195
  """
196
196
  def decorator(func: Callable) -> Callable:
197
197
  # Mark function with metadata for BaseAgent discovery
198
- func._robutler_is_prompt = True
198
+ func._webagents_is_prompt = True
199
199
  func._prompt_priority = priority
200
200
  func._prompt_scope = scope
201
201
 
@@ -238,7 +238,7 @@ def prompt(priority: int = 50, scope: Union[str, List[str]] = "all"):
238
238
  wrapper = func
239
239
 
240
240
  # Copy metadata to wrapper
241
- wrapper._robutler_is_prompt = True
241
+ wrapper._webagents_is_prompt = True
242
242
  wrapper._prompt_priority = priority
243
243
  wrapper._prompt_scope = scope
244
244
 
@@ -266,7 +266,7 @@ def handoff(name: Optional[str] = None, handoff_type: str = "agent", description
266
266
  """
267
267
  def decorator(func: Callable) -> Callable:
268
268
  # Mark function with metadata for BaseAgent discovery
269
- func._robutler_is_handoff = True
269
+ func._webagents_is_handoff = True
270
270
  func._handoff_type = handoff_type
271
271
  func._handoff_scope = scope
272
272
  func._handoff_name = name or func.__name__
@@ -310,7 +310,7 @@ def handoff(name: Optional[str] = None, handoff_type: str = "agent", description
310
310
  wrapper = func
311
311
 
312
312
  # Copy metadata to wrapper
313
- wrapper._robutler_is_handoff = True
313
+ wrapper._webagents_is_handoff = True
314
314
  wrapper._handoff_type = handoff_type
315
315
  wrapper._handoff_scope = scope
316
316
  wrapper._handoff_name = name or func.__name__
@@ -370,7 +370,7 @@ def http(subpath: str, method: str = "get", scope: Union[str, List[str]] = "all"
370
370
  normalized_subpath = subpath if subpath.startswith('/') else f'/{subpath}'
371
371
 
372
372
  # Mark function with metadata for BaseAgent discovery
373
- func._robutler_is_http = True
373
+ func._webagents_is_http = True
374
374
  func._http_subpath = normalized_subpath
375
375
  func._http_method = method.lower()
376
376
  func._http_scope = scope
@@ -415,7 +415,7 @@ def http(subpath: str, method: str = "get", scope: Union[str, List[str]] = "all"
415
415
  wrapper = func
416
416
 
417
417
  # Copy metadata to wrapper
418
- wrapper._robutler_is_http = True
418
+ wrapper._webagents_is_http = True
419
419
  wrapper._http_subpath = normalized_subpath
420
420
  wrapper._http_method = method.lower()
421
421
  wrapper._http_scope = scope
@@ -1,12 +1,12 @@
1
1
  """
2
- Robutler V2.0 Server Package
2
+ WebAgents V2.0 Server Package
3
3
 
4
4
  FastAPI server implementation with OpenAI compatibility,
5
5
  streaming support, and comprehensive agent management.
6
6
  """
7
7
 
8
8
  # Import moved to avoid circular dependency
9
- # from .core.app import RobutlerServer, create_server
9
+ # from .core.app import WebAgentsServer, create_server
10
10
  from .models import (
11
11
  ChatCompletionRequest,
12
12
  OpenAIResponse,
@@ -17,7 +17,7 @@ from .models import (
17
17
  )
18
18
 
19
19
  __all__ = [
20
- # 'RobutlerServer',
20
+ # 'WebAgentsServer',
21
21
  # 'create_server',
22
22
  'ChatCompletionRequest',
23
23
  'OpenAIResponse',
@@ -1,5 +1,5 @@
1
1
  """
2
- Context Variables and Unified Context - Robutler V2.0
2
+ Context Variables and Unified Context - WebAgents V2.0
3
3
 
4
4
  Unified context management using Python's contextvars for thread-safe,
5
5
  async-compatible context handling.
@@ -14,7 +14,7 @@ from datetime import datetime
14
14
 
15
15
 
16
16
  # Single ContextVar for unified context
17
- CONTEXT: ContextVar['Context'] = ContextVar('robutler_context')
17
+ CONTEXT: ContextVar['Context'] = ContextVar('webagents_context')
18
18
 
19
19
 
20
20
  @dataclass
@@ -1,5 +1,5 @@
1
1
  """
2
- FastAPI Server - Robutler V2.0
2
+ FastAPI Server - WebAgents V2.0
3
3
 
4
4
  Production FastAPI server with OpenAI compatibility, dynamic agent routing,
5
5
  and comprehensive monitoring.
@@ -28,7 +28,7 @@ from ...agents.core.base_agent import BaseAgent
28
28
  from ...utils.logging import get_logger
29
29
 
30
30
 
31
- class RobutlerServer:
31
+ class WebAgentsServer:
32
32
  """
33
33
  FastAPI server for AI agents with OpenAI compatibility and production monitoring
34
34
 
@@ -47,7 +47,7 @@ class RobutlerServer:
47
47
  agents: List[BaseAgent] = None,
48
48
  dynamic_agents: Optional[Union[Callable[[str], BaseAgent], Callable[[str], Awaitable[Optional[BaseAgent]]]]] = None,
49
49
  enable_cors: bool = True,
50
- title: str = "Robutler V2 Server",
50
+ title: str = "WebAgents V2 Server",
51
51
  description: str = "AI Agent Server with OpenAI Compatibility",
52
52
  version: str = "2.0.0",
53
53
  url_prefix: str = "",
@@ -64,7 +64,7 @@ class RobutlerServer:
64
64
  metrics_port: int = 9090
65
65
  ):
66
66
  """
67
- Initialize Robutler server
67
+ Initialize WebAgents server
68
68
 
69
69
  Args:
70
70
  agents: List of static Agent instances (optional)
@@ -140,7 +140,7 @@ class RobutlerServer:
140
140
  self._setup_middleware()
141
141
  self._create_endpoints()
142
142
 
143
- print(f"🚀 Robutler V2 Server initialized")
143
+ print(f"🚀 WebAgents V2 Server initialized")
144
144
  print(f" URL prefix: {self.url_prefix or '(none)'}")
145
145
  print(f" Static agents: {len(self.static_agents)}")
146
146
  print(f" Dynamic agents: {'✅ Enabled' if self.dynamic_agents else '❌ Disabled'}")
@@ -207,7 +207,7 @@ class RobutlerServer:
207
207
  endpoints["metrics"] = f"{self.url_prefix}/metrics"
208
208
 
209
209
  return {
210
- "name": "Robutler V2 Server",
210
+ "name": "WebAgents V2 Server",
211
211
  "version": self.version,
212
212
  "status": "running",
213
213
  "uptime_seconds": uptime_seconds,
@@ -225,7 +225,7 @@ class RobutlerServer:
225
225
 
226
226
  stats = {
227
227
  "server": {
228
- "name": "Robutler V2 Server",
228
+ "name": "WebAgents V2 Server",
229
229
  "version": self.version,
230
230
  "uptime_seconds": uptime_seconds,
231
231
  "startup_time": self.startup_time.isoformat()
@@ -644,7 +644,7 @@ class RobutlerServer:
644
644
  return AgentInfoResponse(
645
645
  name=agent.name,
646
646
  instructions=agent.instructions,
647
- model="robutler-v2", # Generic model identifier
647
+ model="webagents-v2", # Generic model identifier
648
648
  endpoints={
649
649
  "chat_completions": f"{self.url_prefix}/{agent_name}/chat/completions",
650
650
  "health": f"{self.url_prefix}/{agent_name}/health"
@@ -809,16 +809,16 @@ class RobutlerServer:
809
809
 
810
810
  # Factory function for easy server creation
811
811
  def create_server(
812
- title: str = "Robutler V2 Server",
812
+ title: str = "WebAgents V2 Server",
813
813
  description: str = "AI Agent Server with OpenAI Compatibility",
814
814
  version: str = "2.0.0",
815
815
  agents: List[BaseAgent] = None,
816
816
  dynamic_agents: Optional[Union[Callable[[str], BaseAgent], Callable[[str], Awaitable[Optional[BaseAgent]]]]] = None,
817
817
  url_prefix: str = "",
818
818
  **kwargs
819
- ) -> RobutlerServer:
819
+ ) -> WebAgentsServer:
820
820
  """
821
- Create a Robutler server instance
821
+ Create a WebAgents server instance
822
822
 
823
823
  Args:
824
824
  title: Server title
@@ -830,9 +830,9 @@ def create_server(
830
830
  **kwargs: Additional server configuration
831
831
 
832
832
  Returns:
833
- Configured RobutlerServer instance
833
+ Configured WebAgentsServer instance
834
834
  """
835
- return RobutlerServer(
835
+ return WebAgentsServer(
836
836
  title=title,
837
837
  description=description,
838
838
  version=version,
@@ -1,7 +1,7 @@
1
1
  """
2
- FastAPI Middleware - Robutler V2.0
2
+ FastAPI Middleware - WebAgents V2.0
3
3
 
4
- Request logging and rate limiting middleware for the Robutler server.
4
+ Request logging and rate limiting middleware for the WebAgents server.
5
5
  """
6
6
 
7
7
  import time
@@ -12,7 +12,7 @@ from fastapi import Request, Response
12
12
  from starlette.middleware.base import BaseHTTPMiddleware
13
13
 
14
14
  # Get logger for middleware
15
- middleware_logger = logging.getLogger("robutler.server.middleware")
15
+ middleware_logger = logging.getLogger("webagents.server.middleware")
16
16
 
17
17
 
18
18
  @dataclass
@@ -1,5 +1,5 @@
1
1
  """
2
- FastAPI Request/Response Models - Robutler V2.0
2
+ FastAPI Request/Response Models - WebAgents V2.0
3
3
 
4
4
  Pydantic models for OpenAI-compatible API endpoints and server responses.
5
5
  """
@@ -1,7 +1,7 @@
1
1
  """
2
- Server Monitoring - Robutler V2.0
2
+ Server Monitoring - WebAgents V2.0
3
3
 
4
- Prometheus metrics and structured logging for the Robutler server.
4
+ Prometheus metrics and structured logging for the WebAgents server.
5
5
  """
6
6
 
7
7
  import time
@@ -1,5 +1,5 @@
1
1
  """
2
- Server Middleware - Robutler V2.0
2
+ Server Middleware - WebAgents V2.0
3
3
 
4
4
  Production-ready middleware for request timeout, rate limiting,
5
5
  and comprehensive request management.
@@ -1,5 +1,5 @@
1
1
  """
2
- OpenAI-Compatible Request/Response Models for Robutler V2.0 Server
2
+ OpenAI-Compatible Request/Response Models for WebAgents V2.0 Server
3
3
  """
4
4
 
5
5
  from pydantic import BaseModel, Field
@@ -78,7 +78,7 @@ class AgentInfoResponse(BaseModel):
78
78
 
79
79
  class ServerInfo(BaseModel):
80
80
  """Server information response"""
81
- message: str = Field(default="Robutler V2 Server", description="Server message")
81
+ message: str = Field(default="WebAgents V2 Server", description="Server message")
82
82
  version: str = Field(default="2.0.0", description="Server version")
83
83
  agents: List[str] = Field(..., description="List of available agents")
84
84
  endpoints: Dict[str, str] = Field(..., description="Available endpoints")
@@ -1,5 +1,5 @@
1
1
  """
2
- Monitoring & Observability - Robutler V2.0
2
+ Monitoring & Observability - WebAgents V2.0
3
3
 
4
4
  Comprehensive monitoring system with Prometheus metrics, structured logging,
5
5
  and request tracing for production deployments.
@@ -110,7 +110,7 @@ class RequestMetrics:
110
110
 
111
111
 
112
112
  class PrometheusMetrics:
113
- """Prometheus metrics collection for Robutler server"""
113
+ """Prometheus metrics collection for WebAgents server"""
114
114
 
115
115
  def __init__(self, registry: CollectorRegistry = None):
116
116
  self.registry = registry
@@ -121,21 +121,21 @@ class PrometheusMetrics:
121
121
 
122
122
  # HTTP Request metrics
123
123
  self.http_requests_total = Counter(
124
- 'robutler_http_requests_total',
124
+ 'webagents_http_requests_total',
125
125
  'Total HTTP requests',
126
126
  ['method', 'path', 'status_code', 'agent_name'],
127
127
  registry=registry
128
128
  )
129
129
 
130
130
  self.http_request_duration = Histogram(
131
- 'robutler_http_request_duration_seconds',
131
+ 'webagents_http_request_duration_seconds',
132
132
  'HTTP request duration',
133
133
  ['method', 'path', 'agent_name'],
134
134
  registry=registry
135
135
  )
136
136
 
137
137
  self.http_requests_in_progress = Gauge(
138
- 'robutler_http_requests_in_progress',
138
+ 'webagents_http_requests_in_progress',
139
139
  'HTTP requests currently in progress',
140
140
  ['method', 'path', 'agent_name'],
141
141
  registry=registry
@@ -143,21 +143,21 @@ class PrometheusMetrics:
143
143
 
144
144
  # Agent metrics
145
145
  self.agent_requests_total = Counter(
146
- 'robutler_agent_requests_total',
146
+ 'webagents_agent_requests_total',
147
147
  'Total requests per agent',
148
148
  ['agent_name', 'stream'],
149
149
  registry=registry
150
150
  )
151
151
 
152
152
  self.agent_request_duration = Histogram(
153
- 'robutler_agent_request_duration_seconds',
153
+ 'webagents_agent_request_duration_seconds',
154
154
  'Agent request processing duration',
155
155
  ['agent_name', 'stream'],
156
156
  registry=registry
157
157
  )
158
158
 
159
159
  self.agent_errors_total = Counter(
160
- 'robutler_agent_errors_total',
160
+ 'webagents_agent_errors_total',
161
161
  'Total agent processing errors',
162
162
  ['agent_name', 'error_type'],
163
163
  registry=registry
@@ -165,14 +165,14 @@ class PrometheusMetrics:
165
165
 
166
166
  # Token usage metrics
167
167
  self.tokens_used_total = Counter(
168
- 'robutler_tokens_used_total',
168
+ 'webagents_tokens_used_total',
169
169
  'Total tokens used',
170
170
  ['agent_name', 'model'],
171
171
  registry=registry
172
172
  )
173
173
 
174
174
  self.credits_spent_total = Counter(
175
- 'robutler_credits_spent_total',
175
+ 'webagents_credits_spent_total',
176
176
  'Total credits spent',
177
177
  ['agent_name', 'user_id'],
178
178
  registry=registry
@@ -180,19 +180,19 @@ class PrometheusMetrics:
180
180
 
181
181
  # System metrics
182
182
  self.active_agents = Gauge(
183
- 'robutler_active_agents',
183
+ 'webagents_active_agents',
184
184
  'Number of active agents',
185
185
  registry=registry
186
186
  )
187
187
 
188
188
  self.dynamic_agents_cache_size = Gauge(
189
- 'robutler_dynamic_agents_cache_size',
189
+ 'webagents_dynamic_agents_cache_size',
190
190
  'Dynamic agents cache size',
191
191
  registry=registry
192
192
  )
193
193
 
194
194
  self.rate_limit_exceeded_total = Counter(
195
- 'robutler_rate_limit_exceeded_total',
195
+ 'webagents_rate_limit_exceeded_total',
196
196
  'Total rate limit violations',
197
197
  ['client_type', 'limit_type'],
198
198
  registry=registry
@@ -200,7 +200,7 @@ class PrometheusMetrics:
200
200
 
201
201
  # Server info
202
202
  self.server_info = Info(
203
- 'robutler_server_info',
203
+ 'webagents_server_info',
204
204
  'Server information',
205
205
  registry=registry
206
206
  )
@@ -437,7 +437,7 @@ class MonitoringSystem:
437
437
  self.prometheus = PrometheusMetrics(None) # Mock metrics
438
438
 
439
439
  if self.enable_structured_logging:
440
- self.logger = StructuredLogger("robutler.monitoring")
440
+ self.logger = StructuredLogger("webagents.monitoring")
441
441
  else:
442
442
  self.logger = None
443
443