signalwire-agents 0.1.13__py3-none-any.whl → 1.0.17.dev4__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 (143) hide show
  1. signalwire_agents/__init__.py +99 -15
  2. signalwire_agents/agent_server.py +248 -60
  3. signalwire_agents/agents/bedrock.py +296 -0
  4. signalwire_agents/cli/__init__.py +9 -0
  5. signalwire_agents/cli/build_search.py +951 -41
  6. signalwire_agents/cli/config.py +80 -0
  7. signalwire_agents/cli/core/__init__.py +10 -0
  8. signalwire_agents/cli/core/agent_loader.py +470 -0
  9. signalwire_agents/cli/core/argparse_helpers.py +179 -0
  10. signalwire_agents/cli/core/dynamic_config.py +71 -0
  11. signalwire_agents/cli/core/service_loader.py +303 -0
  12. signalwire_agents/cli/dokku.py +2320 -0
  13. signalwire_agents/cli/execution/__init__.py +10 -0
  14. signalwire_agents/cli/execution/datamap_exec.py +446 -0
  15. signalwire_agents/cli/execution/webhook_exec.py +134 -0
  16. signalwire_agents/cli/init_project.py +2636 -0
  17. signalwire_agents/cli/output/__init__.py +10 -0
  18. signalwire_agents/cli/output/output_formatter.py +255 -0
  19. signalwire_agents/cli/output/swml_dump.py +186 -0
  20. signalwire_agents/cli/simulation/__init__.py +10 -0
  21. signalwire_agents/cli/simulation/data_generation.py +374 -0
  22. signalwire_agents/cli/simulation/data_overrides.py +200 -0
  23. signalwire_agents/cli/simulation/mock_env.py +282 -0
  24. signalwire_agents/cli/swaig_test_wrapper.py +52 -0
  25. signalwire_agents/cli/test_swaig.py +566 -2366
  26. signalwire_agents/cli/types.py +81 -0
  27. signalwire_agents/core/__init__.py +2 -2
  28. signalwire_agents/core/agent/__init__.py +12 -0
  29. signalwire_agents/core/agent/config/__init__.py +12 -0
  30. signalwire_agents/core/agent/deployment/__init__.py +9 -0
  31. signalwire_agents/core/agent/deployment/handlers/__init__.py +9 -0
  32. signalwire_agents/core/agent/prompt/__init__.py +14 -0
  33. signalwire_agents/core/agent/prompt/manager.py +306 -0
  34. signalwire_agents/core/agent/routing/__init__.py +9 -0
  35. signalwire_agents/core/agent/security/__init__.py +9 -0
  36. signalwire_agents/core/agent/swml/__init__.py +9 -0
  37. signalwire_agents/core/agent/tools/__init__.py +15 -0
  38. signalwire_agents/core/agent/tools/decorator.py +97 -0
  39. signalwire_agents/core/agent/tools/registry.py +210 -0
  40. signalwire_agents/core/agent_base.py +845 -2916
  41. signalwire_agents/core/auth_handler.py +233 -0
  42. signalwire_agents/core/config_loader.py +259 -0
  43. signalwire_agents/core/contexts.py +418 -0
  44. signalwire_agents/core/data_map.py +3 -15
  45. signalwire_agents/core/function_result.py +116 -44
  46. signalwire_agents/core/logging_config.py +162 -18
  47. signalwire_agents/core/mixins/__init__.py +28 -0
  48. signalwire_agents/core/mixins/ai_config_mixin.py +442 -0
  49. signalwire_agents/core/mixins/auth_mixin.py +280 -0
  50. signalwire_agents/core/mixins/prompt_mixin.py +358 -0
  51. signalwire_agents/core/mixins/serverless_mixin.py +460 -0
  52. signalwire_agents/core/mixins/skill_mixin.py +55 -0
  53. signalwire_agents/core/mixins/state_mixin.py +153 -0
  54. signalwire_agents/core/mixins/tool_mixin.py +230 -0
  55. signalwire_agents/core/mixins/web_mixin.py +1142 -0
  56. signalwire_agents/core/security_config.py +333 -0
  57. signalwire_agents/core/skill_base.py +84 -1
  58. signalwire_agents/core/skill_manager.py +62 -20
  59. signalwire_agents/core/swaig_function.py +18 -5
  60. signalwire_agents/core/swml_builder.py +207 -11
  61. signalwire_agents/core/swml_handler.py +27 -21
  62. signalwire_agents/core/swml_renderer.py +123 -312
  63. signalwire_agents/core/swml_service.py +171 -203
  64. signalwire_agents/mcp_gateway/__init__.py +29 -0
  65. signalwire_agents/mcp_gateway/gateway_service.py +564 -0
  66. signalwire_agents/mcp_gateway/mcp_manager.py +513 -0
  67. signalwire_agents/mcp_gateway/session_manager.py +218 -0
  68. signalwire_agents/prefabs/concierge.py +0 -3
  69. signalwire_agents/prefabs/faq_bot.py +0 -3
  70. signalwire_agents/prefabs/info_gatherer.py +0 -3
  71. signalwire_agents/prefabs/receptionist.py +0 -3
  72. signalwire_agents/prefabs/survey.py +0 -3
  73. signalwire_agents/schema.json +9218 -5489
  74. signalwire_agents/search/__init__.py +7 -1
  75. signalwire_agents/search/document_processor.py +490 -31
  76. signalwire_agents/search/index_builder.py +307 -37
  77. signalwire_agents/search/migration.py +418 -0
  78. signalwire_agents/search/models.py +30 -0
  79. signalwire_agents/search/pgvector_backend.py +748 -0
  80. signalwire_agents/search/query_processor.py +162 -31
  81. signalwire_agents/search/search_engine.py +916 -35
  82. signalwire_agents/search/search_service.py +376 -53
  83. signalwire_agents/skills/README.md +452 -0
  84. signalwire_agents/skills/__init__.py +14 -2
  85. signalwire_agents/skills/api_ninjas_trivia/README.md +215 -0
  86. signalwire_agents/skills/api_ninjas_trivia/__init__.py +12 -0
  87. signalwire_agents/skills/api_ninjas_trivia/skill.py +237 -0
  88. signalwire_agents/skills/datasphere/README.md +210 -0
  89. signalwire_agents/skills/datasphere/skill.py +84 -3
  90. signalwire_agents/skills/datasphere_serverless/README.md +258 -0
  91. signalwire_agents/skills/datasphere_serverless/__init__.py +9 -0
  92. signalwire_agents/skills/datasphere_serverless/skill.py +82 -1
  93. signalwire_agents/skills/datetime/README.md +132 -0
  94. signalwire_agents/skills/datetime/__init__.py +9 -0
  95. signalwire_agents/skills/datetime/skill.py +20 -7
  96. signalwire_agents/skills/joke/README.md +149 -0
  97. signalwire_agents/skills/joke/__init__.py +9 -0
  98. signalwire_agents/skills/joke/skill.py +21 -0
  99. signalwire_agents/skills/math/README.md +161 -0
  100. signalwire_agents/skills/math/__init__.py +9 -0
  101. signalwire_agents/skills/math/skill.py +18 -4
  102. signalwire_agents/skills/mcp_gateway/README.md +230 -0
  103. signalwire_agents/skills/mcp_gateway/__init__.py +10 -0
  104. signalwire_agents/skills/mcp_gateway/skill.py +421 -0
  105. signalwire_agents/skills/native_vector_search/README.md +210 -0
  106. signalwire_agents/skills/native_vector_search/__init__.py +9 -0
  107. signalwire_agents/skills/native_vector_search/skill.py +569 -101
  108. signalwire_agents/skills/play_background_file/README.md +218 -0
  109. signalwire_agents/skills/play_background_file/__init__.py +12 -0
  110. signalwire_agents/skills/play_background_file/skill.py +242 -0
  111. signalwire_agents/skills/registry.py +395 -40
  112. signalwire_agents/skills/spider/README.md +236 -0
  113. signalwire_agents/skills/spider/__init__.py +13 -0
  114. signalwire_agents/skills/spider/skill.py +598 -0
  115. signalwire_agents/skills/swml_transfer/README.md +395 -0
  116. signalwire_agents/skills/swml_transfer/__init__.py +10 -0
  117. signalwire_agents/skills/swml_transfer/skill.py +359 -0
  118. signalwire_agents/skills/weather_api/README.md +178 -0
  119. signalwire_agents/skills/weather_api/__init__.py +12 -0
  120. signalwire_agents/skills/weather_api/skill.py +191 -0
  121. signalwire_agents/skills/web_search/README.md +163 -0
  122. signalwire_agents/skills/web_search/__init__.py +9 -0
  123. signalwire_agents/skills/web_search/skill.py +586 -112
  124. signalwire_agents/skills/wikipedia_search/README.md +228 -0
  125. signalwire_agents/{core/state → skills/wikipedia_search}/__init__.py +5 -4
  126. signalwire_agents/skills/{wikipedia → wikipedia_search}/skill.py +33 -3
  127. signalwire_agents/web/__init__.py +17 -0
  128. signalwire_agents/web/web_service.py +559 -0
  129. signalwire_agents-1.0.17.dev4.data/data/share/man/man1/sw-agent-init.1 +400 -0
  130. signalwire_agents-1.0.17.dev4.data/data/share/man/man1/sw-search.1 +483 -0
  131. signalwire_agents-1.0.17.dev4.data/data/share/man/man1/swaig-test.1 +308 -0
  132. {signalwire_agents-0.1.13.dist-info → signalwire_agents-1.0.17.dev4.dist-info}/METADATA +347 -215
  133. signalwire_agents-1.0.17.dev4.dist-info/RECORD +147 -0
  134. signalwire_agents-1.0.17.dev4.dist-info/entry_points.txt +6 -0
  135. signalwire_agents/core/state/file_state_manager.py +0 -219
  136. signalwire_agents/core/state/state_manager.py +0 -101
  137. signalwire_agents/skills/wikipedia/__init__.py +0 -9
  138. signalwire_agents-0.1.13.data/data/schema.json +0 -5611
  139. signalwire_agents-0.1.13.dist-info/RECORD +0 -67
  140. signalwire_agents-0.1.13.dist-info/entry_points.txt +0 -3
  141. {signalwire_agents-0.1.13.dist-info → signalwire_agents-1.0.17.dev4.dist-info}/WHEEL +0 -0
  142. {signalwire_agents-0.1.13.dist-info → signalwire_agents-1.0.17.dev4.dist-info}/licenses/LICENSE +0 -0
  143. {signalwire_agents-0.1.13.dist-info → signalwire_agents-1.0.17.dev4.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,400 @@
1
+ .\" Man page for sw-agent-init
2
+ .\" Copyright (c) 2025 SignalWire
3
+ .\" Licensed under the MIT License
4
+ .TH SW-AGENT-INIT 1 "November 2025" "SignalWire Agents SDK 1.0.8" "SignalWire Commands"
5
+ .SH NAME
6
+ sw-agent-init \- create a new SignalWire AI agent project
7
+ .SH SYNOPSIS
8
+ .B sw-agent-init
9
+ .RI [ options ]
10
+ .br
11
+ .B sw-agent-init
12
+ .I project_name
13
+ .RI [ options ]
14
+ .SH DESCRIPTION
15
+ .B sw-agent-init
16
+ is an interactive command-line tool for creating new SignalWire AI agent
17
+ projects. It supports both local agent projects (FastAPI/uvicorn) and
18
+ cloud function deployments (AWS Lambda, Google Cloud Functions, Azure Functions).
19
+ .PP
20
+ When run without arguments, the tool enters interactive mode and prompts
21
+ for project configuration including platform selection. When given a project
22
+ name, it runs in quick mode with sensible defaults (local platform by default).
23
+ .PP
24
+ For local projects, the generated project includes:
25
+ .IP \(bu 2
26
+ Agent module with sample SWAIG function
27
+ .IP \(bu 2
28
+ Main application entry point
29
+ .IP \(bu 2
30
+ Environment configuration (.env)
31
+ .IP \(bu 2
32
+ Test scaffolding with pytest
33
+ .IP \(bu 2
34
+ Optional web UI for browser-based testing
35
+ .IP \(bu 2
36
+ Debug webhook handlers
37
+ .IP \(bu 2
38
+ README documentation
39
+ .SH ARGUMENTS
40
+ .TP
41
+ .I project_name
42
+ Name of the project to create. If not provided, the tool enters
43
+ interactive mode and prompts for a name.
44
+ .SH OPTIONS
45
+ .TP
46
+ .BR \-h ", " \-\-help
47
+ Display help message and exit.
48
+ .TP
49
+ .BI \-p ", " \-\-platform " PLATFORM"
50
+ Target deployment platform. Valid values:
51
+ .RS
52
+ .IP \(bu 2
53
+ .B local
54
+ \- Local agent with FastAPI/uvicorn server (default)
55
+ .IP \(bu 2
56
+ .B aws
57
+ \- AWS Lambda function with API Gateway
58
+ .IP \(bu 2
59
+ .B gcp
60
+ \- Google Cloud Function (Gen 2)
61
+ .IP \(bu 2
62
+ .B azure
63
+ \- Azure Function
64
+ .RE
65
+ .TP
66
+ .BI \-r ", " \-\-region " REGION"
67
+ Cloud region for deployment (only for cloud platforms). Default regions:
68
+ .RS
69
+ .IP \(bu 2
70
+ AWS: us-east-1
71
+ .IP \(bu 2
72
+ GCP: us-central1
73
+ .IP \(bu 2
74
+ Azure: eastus
75
+ .RE
76
+ .TP
77
+ .BI \-\-type " TYPE"
78
+ Agent type to create (only for local platform). Valid values:
79
+ .RS
80
+ .IP \(bu 2
81
+ .B basic
82
+ \- Minimal agent with example tool (default)
83
+ .IP \(bu 2
84
+ .B full
85
+ \- Complete setup with debug webhooks, web UI, and all features
86
+ .RE
87
+ .TP
88
+ .B \-\-no\-venv
89
+ Skip virtual environment creation (only for local platform). By default,
90
+ a Python virtual environment is created in the project directory.
91
+ .TP
92
+ .BI \-\-dir " DIRECTORY"
93
+ Parent directory for the project. The project will be created as
94
+ a subdirectory. Default is the current directory.
95
+ .SH INTERACTIVE MODE
96
+ When run without a project name, the tool prompts for:
97
+ .SS Project Configuration
98
+ .IP \(bu 2
99
+ .B Target platform
100
+ \- Local, AWS Lambda, GCP, or Azure
101
+ .IP \(bu 2
102
+ .B Project name
103
+ \- Name of the project directory
104
+ .IP \(bu 2
105
+ .B Project directory
106
+ \- Where to create the project
107
+ .IP \(bu 2
108
+ .B Region
109
+ \- Cloud region (for cloud platforms only)
110
+ .IP \(bu 2
111
+ .B Agent type
112
+ \- Basic or full setup (for local platform only)
113
+ .SS Feature Selection
114
+ The following features can be enabled or disabled:
115
+ .IP \(bu 2
116
+ .B Debug webhooks
117
+ \- Console output for real-time call data
118
+ .IP \(bu 2
119
+ .B Post-prompt summary
120
+ \- Call summary handling
121
+ .IP \(bu 2
122
+ .B Web UI
123
+ \- Browser-based agent testing interface
124
+ .IP \(bu 2
125
+ .B Example SWAIG tool
126
+ \- Sample get_info function
127
+ .IP \(bu 2
128
+ .B Test scaffolding
129
+ \- pytest-based tests
130
+ .IP \(bu 2
131
+ .B Basic authentication
132
+ \- Secure webhook endpoints
133
+ .SS Credentials
134
+ The tool checks for existing SignalWire credentials in environment
135
+ variables:
136
+ .IP \(bu 2
137
+ .B SIGNALWIRE_SPACE_NAME
138
+ .IP \(bu 2
139
+ .B SIGNALWIRE_PROJECT_ID
140
+ .IP \(bu 2
141
+ .B SIGNALWIRE_TOKEN
142
+ .PP
143
+ If found, they are offered as defaults. Otherwise, you can enter them
144
+ manually or skip and configure later.
145
+ .SH PROJECT STRUCTURE
146
+ A generated project has the following structure:
147
+ .PP
148
+ .RS
149
+ .nf
150
+ project_name/
151
+ \(lm\(em\(em agents/
152
+ \(bv \(lm\(em\(em __init__.py
153
+ \(bv \(gra\(em\(em main_agent.py # Agent implementation
154
+ \(lm\(em\(em skills/
155
+ \(bv \(gra\(em\(em __init__.py # Custom skills
156
+ \(lm\(em\(em tests/
157
+ \(bv \(lm\(em\(em __init__.py
158
+ \(bv \(gra\(em\(em test_agent.py # Unit tests
159
+ \(lm\(em\(em web/
160
+ \(bv \(gra\(em\(em index.html # Web UI (if enabled)
161
+ \(lm\(em\(em .env # Environment config
162
+ \(lm\(em\(em .env.example # Example config
163
+ \(lm\(em\(em .gitignore
164
+ \(lm\(em\(em .venv/ # Virtual environment
165
+ \(lm\(em\(em app.py # Entry point
166
+ \(lm\(em\(em README.md
167
+ \(gra\(em\(em requirements.txt
168
+ .fi
169
+ .RE
170
+ .SH GENERATED FILES
171
+ .SS agents/main_agent.py
172
+ The main agent class with:
173
+ .IP \(bu 2
174
+ Voice and language configuration
175
+ .IP \(bu 2
176
+ Prompt sections (role, guidelines)
177
+ .IP \(bu 2
178
+ Example SWAIG tool using the @tool decorator
179
+ .IP \(bu 2
180
+ Debug webhook configuration (if enabled)
181
+ .IP \(bu 2
182
+ Basic authentication support (if enabled)
183
+ .SS app.py
184
+ Application entry point that:
185
+ .IP \(bu 2
186
+ Loads environment variables from .env
187
+ .IP \(bu 2
188
+ Creates and configures the AgentServer
189
+ .IP \(bu 2
190
+ Registers webhook endpoints
191
+ .IP \(bu 2
192
+ Serves static files from web/ directory
193
+ .IP \(bu 2
194
+ Pretty-prints debug data to console
195
+ .SS .env
196
+ Environment configuration with:
197
+ .IP \(bu 2
198
+ SignalWire credentials
199
+ .IP \(bu 2
200
+ Server host and port
201
+ .IP \(bu 2
202
+ Basic auth credentials (auto-generated secure password)
203
+ .IP \(bu 2
204
+ Debug level settings
205
+ .IP \(bu 2
206
+ Public URL configuration
207
+ .SS tests/test_agent.py
208
+ Test suite that verifies:
209
+ .IP \(bu 2
210
+ Agent loads without errors
211
+ .IP \(bu 2
212
+ SWML structure is valid
213
+ .IP \(bu 2
214
+ SWAIG functions are defined correctly
215
+ .IP \(bu 2
216
+ Functions execute and return expected results
217
+ .SH EXAMPLES
218
+ .SS Interactive Mode
219
+ Run without arguments for guided setup:
220
+ .PP
221
+ .RS
222
+ .nf
223
+ sw-agent-init
224
+ .fi
225
+ .RE
226
+ .SS Quick Mode - Local
227
+ Create a basic local agent project:
228
+ .PP
229
+ .RS
230
+ .nf
231
+ sw-agent-init myagent
232
+ .fi
233
+ .RE
234
+ .PP
235
+ Create a full-featured local project:
236
+ .PP
237
+ .RS
238
+ .nf
239
+ sw-agent-init myagent --type full
240
+ .fi
241
+ .RE
242
+ .PP
243
+ Create without virtual environment:
244
+ .PP
245
+ .RS
246
+ .nf
247
+ sw-agent-init myagent --no-venv
248
+ .fi
249
+ .RE
250
+ .PP
251
+ Create in a specific directory:
252
+ .PP
253
+ .RS
254
+ .nf
255
+ sw-agent-init myagent --dir /opt/projects
256
+ .fi
257
+ .RE
258
+ .SS Quick Mode - Cloud Functions
259
+ Create an AWS Lambda project:
260
+ .PP
261
+ .RS
262
+ .nf
263
+ sw-agent-init myagent -p aws
264
+ .fi
265
+ .RE
266
+ .PP
267
+ Create an AWS Lambda project in a specific region:
268
+ .PP
269
+ .RS
270
+ .nf
271
+ sw-agent-init myagent -p aws -r us-west-2
272
+ .fi
273
+ .RE
274
+ .PP
275
+ Create a Google Cloud Function project:
276
+ .PP
277
+ .RS
278
+ .nf
279
+ sw-agent-init myagent -p gcp
280
+ .fi
281
+ .RE
282
+ .PP
283
+ Create an Azure Function project:
284
+ .PP
285
+ .RS
286
+ .nf
287
+ sw-agent-init myagent -p azure
288
+ .fi
289
+ .RE
290
+ .SS After Creation - Local
291
+ Start the agent:
292
+ .PP
293
+ .RS
294
+ .nf
295
+ cd myagent
296
+ source .venv/bin/activate
297
+ python app.py
298
+ .fi
299
+ .RE
300
+ .PP
301
+ Run tests:
302
+ .PP
303
+ .RS
304
+ .nf
305
+ cd myagent
306
+ source .venv/bin/activate
307
+ pytest tests/ -v
308
+ .fi
309
+ .RE
310
+ .PP
311
+ Test with swaig-test:
312
+ .PP
313
+ .RS
314
+ .nf
315
+ swaig-test agents/main_agent.py --list-tools
316
+ swaig-test agents/main_agent.py --exec get_info --topic "test"
317
+ swaig-test agents/main_agent.py --dump-swml
318
+ .fi
319
+ .RE
320
+ .SS After Creation - Cloud Functions
321
+ Deploy to AWS Lambda:
322
+ .PP
323
+ .RS
324
+ .nf
325
+ cd myagent
326
+ ./deploy.sh
327
+ .fi
328
+ .RE
329
+ .PP
330
+ Deploy to Google Cloud:
331
+ .PP
332
+ .RS
333
+ .nf
334
+ cd myagent
335
+ ./deploy.sh
336
+ .fi
337
+ .RE
338
+ .PP
339
+ Deploy to Azure:
340
+ .PP
341
+ .RS
342
+ .nf
343
+ cd myagent
344
+ ./deploy.sh
345
+ .fi
346
+ .RE
347
+ .SH AGENT TYPES
348
+ .SS Basic Agent
349
+ The basic agent type includes:
350
+ .IP \(bu 2
351
+ Minimal agent with single example tool
352
+ .IP \(bu 2
353
+ Basic prompt configuration
354
+ .IP \(bu 2
355
+ Test scaffolding
356
+ .IP \(bu 2
357
+ Simple app.py without extra features
358
+ .SS Full Agent
359
+ The full agent type includes everything in basic, plus:
360
+ .IP \(bu 2
361
+ Debug webhook endpoints (/debug, /post_prompt)
362
+ .IP \(bu 2
363
+ Pretty-printed console output for call events
364
+ .IP \(bu 2
365
+ Web UI for browser-based testing
366
+ .IP \(bu 2
367
+ Basic authentication for endpoints
368
+ .IP \(bu 2
369
+ Post-prompt summary configuration
370
+ .IP \(bu 2
371
+ Static file serving
372
+ .SH ENVIRONMENT
373
+ The following environment variables affect credential defaults:
374
+ .TP
375
+ .B SIGNALWIRE_SPACE_NAME
376
+ SignalWire space name. If set, used as default in interactive mode.
377
+ .TP
378
+ .B SIGNALWIRE_PROJECT_ID
379
+ SignalWire project ID. If set, used as default in interactive mode.
380
+ .TP
381
+ .B SIGNALWIRE_TOKEN
382
+ SignalWire API token. If set, used as default in interactive mode.
383
+ .SH EXIT STATUS
384
+ .TP
385
+ .B 0
386
+ Project created successfully.
387
+ .TP
388
+ .B 1
389
+ An error occurred. Check stderr for details.
390
+ .SH SEE ALSO
391
+ .BR swaig-test (1),
392
+ .BR sw-search (1),
393
+ .BR pytest (1)
394
+ .PP
395
+ SignalWire AI Agents SDK documentation:
396
+ .I https://github.com/signalwire/signalwire-agents
397
+ .SH AUTHORS
398
+ SignalWire Team <info@signalwire.com>
399
+ .SH COPYRIGHT
400
+ Copyright (c) 2025 SignalWire. Licensed under the MIT License.