signalwire-agents 0.1.30__py3-none-any.whl → 0.1.32__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.
@@ -18,7 +18,7 @@ A package for building AI agents using SignalWire's AI and SWML capabilities.
18
18
  from .core.logging_config import configure_logging
19
19
  configure_logging()
20
20
 
21
- __version__ = "0.1.30"
21
+ __version__ = "0.1.32"
22
22
 
23
23
  # Import core classes for easier access
24
24
  from .core.agent_base import AgentBase
@@ -6455,6 +6455,20 @@
6455
6455
  "type": "boolean",
6456
6456
  "description": "A boolean value, if set to `true`, the conversation history will be reset and the agent will only have the context of the original system prompt."
6457
6457
  },
6458
+ "enter_fillers": {
6459
+ "type": "array",
6460
+ "items": {
6461
+ "$ref": "#/$defs/FunctionFillers"
6462
+ },
6463
+ "description": "An array of objects that define the enter fillers for the context. Enter fillers are used when entering the context."
6464
+ },
6465
+ "exit_fillers": {
6466
+ "type": "array",
6467
+ "items": {
6468
+ "$ref": "#/$defs/FunctionFillers"
6469
+ },
6470
+ "description": "An array of objects that define the exit fillers for the context. Exit fillers are used when exiting the context."
6471
+ },
6458
6472
  "pom": {
6459
6473
  "type": "array",
6460
6474
  "items": {
@@ -6484,6 +6498,20 @@
6484
6498
  "type": "boolean",
6485
6499
  "description": "A boolean value, if set to `true`, the conversation history will be reset and the agent will only have the context of the original system prompt."
6486
6500
  },
6501
+ "enter_fillers": {
6502
+ "type": "array",
6503
+ "items": {
6504
+ "$ref": "#/$defs/FunctionFillers"
6505
+ },
6506
+ "description": "An array of objects that define the enter fillers for the context. Enter fillers are used when entering the context."
6507
+ },
6508
+ "exit_fillers": {
6509
+ "type": "array",
6510
+ "items": {
6511
+ "$ref": "#/$defs/FunctionFillers"
6512
+ },
6513
+ "description": "An array of objects that define the exit fillers for the context. Exit fillers are used when exiting the context."
6514
+ },
6487
6515
  "text": {
6488
6516
  "type": "string",
6489
6517
  "description": "The text to send to the agent."
@@ -6712,13 +6740,13 @@
6712
6740
  "ContextSteps": {
6713
6741
  "anyOf": [
6714
6742
  {
6715
- "$ref": "#/$defs/StepTypePOM"
6743
+ "$ref": "#/$defs/ContextPOMSteps"
6716
6744
  },
6717
6745
  {
6718
- "$ref": "#/$defs/StepTypeText"
6746
+ "$ref": "#/$defs/ContextTextSteps"
6719
6747
  }
6720
6748
  ],
6721
- "title": "ContextStepsParams union"
6749
+ "title": "Context step - supports either POM or text-based steps"
6722
6750
  },
6723
6751
  "StringProperty": {
6724
6752
  "type": "object",
@@ -7137,25 +7165,128 @@
7137
7165
  ],
7138
7166
  "title": "Action union"
7139
7167
  },
7140
- "StepTypePOM": {
7141
- "anyOf": [
7142
- {
7143
- "$ref": "#/$defs/POMEndStep"
7168
+ "ContextPOMSteps": {
7169
+ "type": "object",
7170
+ "properties": {
7171
+ "name": {
7172
+ "type": "string",
7173
+ "pattern": "^(?!next$).*$",
7174
+ "description": "The name of the step. The name must be unique within the context. The name is used for referencing the step in the context."
7144
7175
  },
7145
- {
7146
- "$ref": "#/$defs/POMValidSteps"
7176
+ "step_criteria": {
7177
+ "type": "string",
7178
+ "description": "The conditions that must be met for the conversation to proceed to the next step. \nIf a condition is not met, the conversation will not proceed to the next step.\nIt's **highly** recommended you create a custom criteria for the step to get the intended behavior. "
7179
+ },
7180
+ "functions": {
7181
+ "type": "array",
7182
+ "items": {
7183
+ "type": "string"
7184
+ },
7185
+ "description": "An array of strings, where each string is the name of a SWAIG.function that can be executed from this step."
7186
+ },
7187
+ "valid_contexts": {
7188
+ "type": "array",
7189
+ "items": {
7190
+ "type": "string"
7191
+ },
7192
+ "description": "An array of valid contexts that the conversation can transition to from this step."
7193
+ },
7194
+ "skip_user_turn": {
7195
+ "anyOf": [
7196
+ {
7197
+ "type": "boolean"
7198
+ },
7199
+ {
7200
+ "$ref": "#/$defs/SWMLVar"
7201
+ }
7202
+ ],
7203
+ "description": "A boolean value, if set to `true`, will skip the user's turn to respond in the conversation and proceed to the next step."
7204
+ },
7205
+ "end": {
7206
+ "type": "boolean",
7207
+ "description": "A boolean value, if set to `true`, will end the contexts conversation and transition to a normal interaction."
7208
+ },
7209
+ "valid_steps": {
7210
+ "type": "array",
7211
+ "items": {
7212
+ "type": "string"
7213
+ },
7214
+ "description": "An array of valid steps that the conversation can proceed to from this step.\nIf the array is empty, or the `valid_steps` key is not present, the conversation will proceed to the next step in the context."
7215
+ },
7216
+ "pom": {
7217
+ "type": "array",
7218
+ "items": {
7219
+ "$ref": "#/$defs/POM"
7220
+ },
7221
+ "description": "An array of objects that define the POM for the step. POM is the Post-Prompt Object Model, which is used to define the flow of the conversation."
7147
7222
  }
7148
- ]
7223
+ },
7224
+ "required": [
7225
+ "name",
7226
+ "pom"
7227
+ ],
7228
+ "title": "Context step with POM (Post-Prompt Object Model)",
7229
+ "unevaluatedProperties": false
7149
7230
  },
7150
- "StepTypeText": {
7151
- "anyOf": [
7152
- {
7153
- "$ref": "#/$defs/TextEndStep"
7231
+ "ContextTextSteps": {
7232
+ "type": "object",
7233
+ "properties": {
7234
+ "name": {
7235
+ "type": "string",
7236
+ "pattern": "^(?!next$).*$",
7237
+ "description": "The name of the step. The name must be unique within the context. The name is used for referencing the step in the context."
7154
7238
  },
7155
- {
7156
- "$ref": "#/$defs/TextValidSteps"
7239
+ "step_criteria": {
7240
+ "type": "string",
7241
+ "description": "The conditions that must be met for the conversation to proceed to the next step. \nIf a condition is not met, the conversation will not proceed to the next step.\nIt's **highly** recommended you create a custom criteria for the step to get the intended behavior. "
7242
+ },
7243
+ "functions": {
7244
+ "type": "array",
7245
+ "items": {
7246
+ "type": "string"
7247
+ },
7248
+ "description": "An array of strings, where each string is the name of a SWAIG.function that can be executed from this step."
7249
+ },
7250
+ "valid_contexts": {
7251
+ "type": "array",
7252
+ "items": {
7253
+ "type": "string"
7254
+ },
7255
+ "description": "An array of valid contexts that the conversation can transition to from this step."
7256
+ },
7257
+ "skip_user_turn": {
7258
+ "anyOf": [
7259
+ {
7260
+ "type": "boolean"
7261
+ },
7262
+ {
7263
+ "$ref": "#/$defs/SWMLVar"
7264
+ }
7265
+ ],
7266
+ "description": "A boolean value, if set to `true`, will skip the user's turn to respond in the conversation and proceed to the next step."
7267
+ },
7268
+ "end": {
7269
+ "type": "boolean",
7270
+ "description": "A boolean value, if set to `true`, will end the contexts conversation and transition to a normal interaction."
7271
+ },
7272
+ "valid_steps": {
7273
+ "type": "array",
7274
+ "items": {
7275
+ "type": "string"
7276
+ },
7277
+ "description": "An array of valid steps that the conversation can proceed to from this step.\nIf the array is empty, or the `valid_steps` key is not present, the conversation will proceed to the next step in the context."
7278
+ },
7279
+ "text": {
7280
+ "type": "string",
7281
+ "description": "The prompt or instructions given to the AI at this step."
7157
7282
  }
7158
- ]
7283
+ },
7284
+ "required": [
7285
+ "name",
7286
+ "text"
7287
+ ],
7288
+ "title": "Context step with text prompt",
7289
+ "unevaluatedProperties": false
7159
7290
  },
7160
7291
  "StringFormat": {
7161
7292
  "type": "string",
@@ -7469,230 +7600,6 @@
7469
7600
  ],
7470
7601
  "title": "UserInputAction object",
7471
7602
  "unevaluatedProperties": false
7472
- },
7473
- "POMEndStep": {
7474
- "type": "object",
7475
- "properties": {
7476
- "name": {
7477
- "type": "string",
7478
- "pattern": "^(?!next$).*$",
7479
- "description": "The name of the step. The name must be unique within the context. The name is used for referencing the step in the context."
7480
- },
7481
- "step_criteria": {
7482
- "type": "string",
7483
- "description": "The conditions that must be met for the conversation to proceed to the next step. \nIf a condition is not met, the conversation will not proceed to the next step.\nIt's **highly** recommended you create a custom criteria for the step to get the intended behavior. "
7484
- },
7485
- "functions": {
7486
- "type": "array",
7487
- "items": {
7488
- "type": "string"
7489
- },
7490
- "description": "An array of strings, where each string is the name of a SWAIG.function that can be executed from this step."
7491
- },
7492
- "valid_contexts": {
7493
- "type": "array",
7494
- "items": {
7495
- "type": "string"
7496
- },
7497
- "description": "An array of valid contexts that the conversation can transition to from this step."
7498
- },
7499
- "skip_user_turn": {
7500
- "anyOf": [
7501
- {
7502
- "type": "boolean"
7503
- },
7504
- {
7505
- "$ref": "#/$defs/SWMLVar"
7506
- }
7507
- ],
7508
- "description": "A boolean value, if set to `true`, will skip the user's turn to respond in the conversation and proceed to the next step."
7509
- },
7510
- "pom": {
7511
- "type": "array",
7512
- "items": {
7513
- "$ref": "#/$defs/POM"
7514
- },
7515
- "description": "An array of objects that define the POM for the step. POM is the Post-Prompt Object Model, which is used to define the flow of the conversation."
7516
- },
7517
- "end": {
7518
- "type": "boolean",
7519
- "description": "A boolean value, if set to `true`, will end the contexts conversation and transition to a normal interaction."
7520
- }
7521
- },
7522
- "required": [
7523
- "name",
7524
- "pom"
7525
- ],
7526
- "title": "ContextStepsEnd object",
7527
- "unevaluatedProperties": false
7528
- },
7529
- "POMValidSteps": {
7530
- "type": "object",
7531
- "properties": {
7532
- "name": {
7533
- "type": "string",
7534
- "pattern": "^(?!next$).*$",
7535
- "description": "The name of the step. The name must be unique within the context. The name is used for referencing the step in the context."
7536
- },
7537
- "step_criteria": {
7538
- "type": "string",
7539
- "description": "The conditions that must be met for the conversation to proceed to the next step. \nIf a condition is not met, the conversation will not proceed to the next step.\nIt's **highly** recommended you create a custom criteria for the step to get the intended behavior. "
7540
- },
7541
- "functions": {
7542
- "type": "array",
7543
- "items": {
7544
- "type": "string"
7545
- },
7546
- "description": "An array of strings, where each string is the name of a SWAIG.function that can be executed from this step."
7547
- },
7548
- "valid_contexts": {
7549
- "type": "array",
7550
- "items": {
7551
- "type": "string"
7552
- },
7553
- "description": "An array of valid contexts that the conversation can transition to from this step."
7554
- },
7555
- "skip_user_turn": {
7556
- "anyOf": [
7557
- {
7558
- "type": "boolean"
7559
- },
7560
- {
7561
- "$ref": "#/$defs/SWMLVar"
7562
- }
7563
- ],
7564
- "description": "A boolean value, if set to `true`, will skip the user's turn to respond in the conversation and proceed to the next step."
7565
- },
7566
- "pom": {
7567
- "type": "array",
7568
- "items": {
7569
- "$ref": "#/$defs/POM"
7570
- },
7571
- "description": "An array of objects that define the POM for the step. POM is the Post-Prompt Object Model, which is used to define the flow of the conversation."
7572
- },
7573
- "valid_steps": {
7574
- "type": "array",
7575
- "items": {
7576
- "type": "string"
7577
- },
7578
- "description": "An array of valid steps that the conversation can proceed to from this step.\nIf the array is empty, or the `valid_steps` key is not present, the conversation will proceed to the next step in the context."
7579
- }
7580
- },
7581
- "required": [
7582
- "name",
7583
- "pom"
7584
- ],
7585
- "title": "ContextStepsValidSteps object",
7586
- "unevaluatedProperties": false
7587
- },
7588
- "TextEndStep": {
7589
- "type": "object",
7590
- "properties": {
7591
- "name": {
7592
- "type": "string",
7593
- "pattern": "^(?!next$).*$",
7594
- "description": "The name of the step. The name must be unique within the context. The name is used for referencing the step in the context."
7595
- },
7596
- "step_criteria": {
7597
- "type": "string",
7598
- "description": "The conditions that must be met for the conversation to proceed to the next step. \nIf a condition is not met, the conversation will not proceed to the next step.\nIt's **highly** recommended you create a custom criteria for the step to get the intended behavior. "
7599
- },
7600
- "functions": {
7601
- "type": "array",
7602
- "items": {
7603
- "type": "string"
7604
- },
7605
- "description": "An array of strings, where each string is the name of a SWAIG.function that can be executed from this step."
7606
- },
7607
- "valid_contexts": {
7608
- "type": "array",
7609
- "items": {
7610
- "type": "string"
7611
- },
7612
- "description": "An array of valid contexts that the conversation can transition to from this step."
7613
- },
7614
- "skip_user_turn": {
7615
- "anyOf": [
7616
- {
7617
- "type": "boolean"
7618
- },
7619
- {
7620
- "$ref": "#/$defs/SWMLVar"
7621
- }
7622
- ],
7623
- "description": "A boolean value, if set to `true`, will skip the user's turn to respond in the conversation and proceed to the next step."
7624
- },
7625
- "text": {
7626
- "type": "string",
7627
- "description": "The prompt or instructions given to the AI at this step."
7628
- },
7629
- "end": {
7630
- "type": "boolean",
7631
- "description": "A boolean value, if set to `true`, will end the contexts conversation and transition to a normal interaction."
7632
- }
7633
- },
7634
- "required": [
7635
- "name",
7636
- "text"
7637
- ],
7638
- "title": "ContextStepsBase object",
7639
- "unevaluatedProperties": false
7640
- },
7641
- "TextValidSteps": {
7642
- "type": "object",
7643
- "properties": {
7644
- "name": {
7645
- "type": "string",
7646
- "pattern": "^(?!next$).*$",
7647
- "description": "The name of the step. The name must be unique within the context. The name is used for referencing the step in the context."
7648
- },
7649
- "step_criteria": {
7650
- "type": "string",
7651
- "description": "The conditions that must be met for the conversation to proceed to the next step. \nIf a condition is not met, the conversation will not proceed to the next step.\nIt's **highly** recommended you create a custom criteria for the step to get the intended behavior. "
7652
- },
7653
- "functions": {
7654
- "type": "array",
7655
- "items": {
7656
- "type": "string"
7657
- },
7658
- "description": "An array of strings, where each string is the name of a SWAIG.function that can be executed from this step."
7659
- },
7660
- "valid_contexts": {
7661
- "type": "array",
7662
- "items": {
7663
- "type": "string"
7664
- },
7665
- "description": "An array of valid contexts that the conversation can transition to from this step."
7666
- },
7667
- "skip_user_turn": {
7668
- "anyOf": [
7669
- {
7670
- "type": "boolean"
7671
- },
7672
- {
7673
- "$ref": "#/$defs/SWMLVar"
7674
- }
7675
- ],
7676
- "description": "A boolean value, if set to `true`, will skip the user's turn to respond in the conversation and proceed to the next step."
7677
- },
7678
- "text": {
7679
- "type": "string",
7680
- "description": "The prompt or instructions given to the AI at this step."
7681
- },
7682
- "valid_steps": {
7683
- "type": "array",
7684
- "items": {
7685
- "type": "string"
7686
- },
7687
- "description": "An array of valid steps that the conversation can proceed to from this step.\nIf the array is empty, or the `valid_steps` key is not present, the conversation will proceed to the next step in the context."
7688
- }
7689
- },
7690
- "required": [
7691
- "name",
7692
- "text"
7693
- ],
7694
- "title": "ContextStepsBase object",
7695
- "unevaluatedProperties": false
7696
7603
  }
7697
7604
  },
7698
7605
  "unevaluatedProperties": false
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: signalwire_agents
3
- Version: 0.1.30
3
+ Version: 0.1.32
4
4
  Summary: SignalWire AI Agents SDK
5
5
  Author-email: SignalWire Team <info@signalwire.com>
6
6
  License: MIT
@@ -72,26 +72,74 @@ Requires-Dist: python-pptx>=0.6.21; extra == "search-all"
72
72
  Requires-Dist: python-magic>=0.4.27; extra == "search-all"
73
73
  Dynamic: license-file
74
74
 
75
- # SignalWire AI Agent SDK
75
+ <!-- Header -->
76
+ <div align="center">
77
+ <img src="https://github.com/user-attachments/assets/0c8ed3b9-8c50-4dc6-9cc4-cc6cd137fd50" width="500" href="https://signalwire.com" />
76
78
 
77
- A Python SDK for creating, hosting, and securing SignalWire AI agents as microservices with minimal boilerplate.
79
+ # Agents SDK
80
+
81
+ #### _A Python SDK for creating, hosting, and securing SignalWire AI agents as microservices with minimal boilerplate._
82
+
83
+ <br/>
84
+
85
+ <p align="center">
86
+ <a href="https://developer.signalwire.com/sdks/agents-sdk" target="_blank">📖 Documentation</a> &nbsp; &nbsp; <code>#</code> &nbsp; &nbsp;
87
+ <a href="https://github.com/signalwire/signalwire-docs/issues/new/choose" target="_blank">🐛 Report an issue</a> &nbsp; &nbsp; <code>#</code> &nbsp; &nbsp;
88
+ <a href="https://pypi.org/project/signalwire-agents/" target="_blank">🐍 PyPI</a>
89
+ </p>
90
+
91
+ <br/>
92
+
93
+ <!-- Badges -->
94
+ <div align="center">
95
+ <img src="https://img.shields.io/badge/Discord%20Community-5865F2" alt="Discord" href="https://discord.com/invite/F2WNYTNjuF"/>
96
+ <img src="https://img.shields.io/badge/MIT-License-blue" alt="MIT License" href="LICENSE" />
97
+ <img src="https://img.shields.io/badge/GitHub-%23121011.svg?logo=github&logoColor=white&" alt="GitHub" href="https://github.com/signalwire"/>
98
+ <img src="https://img.shields.io/github/stars/signalwire/signalwire-agents" alt="GitHub Stars" href="https://github.com/signalwire/docs"/>
99
+ </div>
100
+
101
+ </div>
78
102
 
79
103
  ## Features
80
104
 
81
- - **Self-Contained Agents**: Each agent is both a web app and an AI persona
82
- - **Prompt Object Model**: Structured prompt composition using POM
83
- - **SWAIG Integration**: Easily define and handle AI tools/functions
84
- - **Dynamic Configuration**: Configure agents per-request for multi-tenant apps and personalization
85
- - **Custom Routing**: Dynamic request handling for different paths and content
86
- - **SIP Integration**: Route SIP calls to agents based on SIP usernames
87
- - **Security Built-In**: Session management, function-specific security tokens, and basic auth
88
- - **State Management**: Persistent conversation state with automatic tracking
89
- - **Prefab Archetypes**: Ready-to-use agent types for common scenarios
90
- - **Multi-Agent Support**: Host multiple agents on a single server
91
- - **Modular Skills System**: Add capabilities to agents with simple one-liner calls
92
- - **Local Search System**: Offline document search with vector similarity and keyword search
93
-
94
- ## Skills System
105
+ | | |
106
+ |-------------------------------|-----------------------------------------------------------------------------|
107
+ | 🤖 **Self-Contained Agents** | Each agent is both a web app and an AI persona |
108
+ | 📝 **Prompt Object Model** | Structured prompt composition using POM |
109
+ | ⚙️ **SWAIG Integration** | Easily define and handle AI tools/functions |
110
+ | 🔧 **Dynamic Configuration** | Configure agents per-request for multi-tenant apps and personalization |
111
+ | 🗺️ **Custom Routing** | Dynamic request handling for different paths and content |
112
+ | 📞 **SIP Integration** | Route SIP calls to agents based on SIP usernames |
113
+ | 🔒 **Security Built-In** | Session management, function-specific security tokens, and basic auth |
114
+ | 💾 **State Management** | Persistent conversation state with automatic tracking |
115
+ | 🏗️ **Prefab Archetypes** | Ready-to-use agent types for common scenarios |
116
+ | 🏢 **Multi-Agent Support** | Host multiple agents on a single server |
117
+ | � **Modular Skills System** | Add capabilities to agents with simple one-liner calls |
118
+ | 🔍 **Local Search System** | Offline document search with vector similarity and keyword search |
119
+
120
+ <picture>
121
+ <source
122
+ media="(prefers-color-scheme: dark)"
123
+ srcset="
124
+ https://api.star-history.com/svg?repos=signalwire/signalwire-agents&type=Date&theme=dark
125
+ "
126
+ />
127
+ <source
128
+ media="(prefers-color-scheme: light)"
129
+ srcset="
130
+ https://api.star-history.com/svg?repos=signalwire/signalwire-agents&type=Date
131
+ "
132
+ />
133
+ <img
134
+ alt="Star History Chart"
135
+ src="https://api.star-history.com/svg?repos=signalwire/signalwire-agents&type=Date"
136
+ />
137
+ </picture>
138
+
139
+ <details>
140
+ <summary><h2>Documentation</h2></summary>
141
+
142
+ ### Skills System
95
143
 
96
144
  The SignalWire Agents SDK includes a powerful modular skills system that allows you to add complex capabilities to your agents with simple one-liner calls:
97
145
 
@@ -163,7 +211,7 @@ agent.add_skill("datasphere", {
163
211
  agent.serve()
164
212
  ```
165
213
 
166
- ### Available Built-in Skills
214
+ #### Available Built-in Skills
167
215
 
168
216
  - **web_search**: Google Custom Search API integration with web scraping (supports multiple instances)
169
217
  - **datetime**: Current date and time with timezone support
@@ -171,7 +219,7 @@ agent.serve()
171
219
  - **datasphere**: SignalWire DataSphere knowledge search (supports multiple instances)
172
220
  - **native_vector_search**: Offline document search with vector similarity and keyword search
173
221
 
174
- ### Benefits
222
+ #### Benefits
175
223
 
176
224
  - **One-liner integration**: `agent.add_skill("skill_name")`
177
225
  - **Configurable parameters**: `agent.add_skill("skill_name", {"param": "value"})`
@@ -181,11 +229,11 @@ agent.serve()
181
229
 
182
230
  For detailed documentation, see [Skills System README](docs/skills_system.md).
183
231
 
184
- ## DataMap Tools
232
+ ### DataMap Tools
185
233
 
186
234
  The SDK provides a DataMap system for creating SWAIG tools that integrate directly with REST APIs without requiring custom webhook endpoints. DataMap tools execute on the SignalWire server, making them simpler to deploy than traditional webhook-based tools.
187
235
 
188
- ### Basic DataMap Usage
236
+ #### Basic DataMap Usage
189
237
 
190
238
  ```python
191
239
  from signalwire_agents import AgentBase
@@ -211,7 +259,7 @@ agent = APIAgent()
211
259
  agent.serve()
212
260
  ```
213
261
 
214
- ### Advanced DataMap Examples
262
+ #### Advanced DataMap Examples
215
263
 
216
264
  ```python
217
265
  # POST API with authentication
@@ -242,7 +290,7 @@ docs_tool = (DataMap('get_latest_docs')
242
290
  )
243
291
  ```
244
292
 
245
- ### Helper Functions
293
+ #### Helper Functions
246
294
 
247
295
  For simpler use cases, use the convenience functions:
248
296
 
@@ -272,7 +320,7 @@ self.register_swaig_function(weather.to_swaig_function())
272
320
  self.register_swaig_function(file_control.to_swaig_function())
273
321
  ```
274
322
 
275
- ### Variable Expansion
323
+ #### Variable Expansion
276
324
 
277
325
  DataMap tools support powerful variable expansion using `${variable}` syntax:
278
326
 
@@ -282,7 +330,7 @@ DataMap tools support powerful variable expansion using `${variable}` syntax:
282
330
  - **Global data**: `${global_data.key}`
283
331
  - **Metadata**: `${meta_data.call_id}`
284
332
 
285
- ### Benefits of DataMap Tools
333
+ #### Benefits of DataMap Tools
286
334
 
287
335
  - **No webhook infrastructure**: Tools run on SignalWire servers
288
336
  - **Simplified deployment**: No need to expose endpoints
@@ -293,11 +341,11 @@ DataMap tools support powerful variable expansion using `${variable}` syntax:
293
341
 
294
342
  For detailed documentation, see [DataMap Guide](docs/datamap_guide.md).
295
343
 
296
- ## Contexts and Steps
344
+ ### Contexts and Steps
297
345
 
298
346
  The SignalWire Agents SDK provides a powerful enhancement to traditional prompts through the **Contexts and Steps** system. This feature allows you to add structured, workflow-driven AI interactions on top of your base prompt, with explicit navigation control and step-by-step guidance.
299
347
 
300
- ### Why Use Contexts and Steps?
348
+ #### Why Use Contexts and Steps?
301
349
 
302
350
  - **Structured Workflows**: Define clear, step-by-step processes for complex interactions
303
351
  - **Navigation Control**: Explicitly control which steps or contexts users can access
@@ -306,7 +354,7 @@ The SignalWire Agents SDK provides a powerful enhancement to traditional prompts
306
354
  - **Workflow Isolation**: Create separate contexts for different conversation flows
307
355
  - **Enhanced Base Prompts**: Adds structured workflows on top of your existing prompt foundation
308
356
 
309
- ### Basic Usage
357
+ #### Basic Usage
310
358
 
311
359
  ```python
312
360
  from signalwire_agents import AgentBase
@@ -351,7 +399,7 @@ agent = WorkflowAgent()
351
399
  agent.serve()
352
400
  ```
353
401
 
354
- ### Advanced Features
402
+ #### Advanced Features
355
403
 
356
404
  ```python
357
405
  class MultiContextAgent(AgentBase):
@@ -394,13 +442,13 @@ class MultiContextAgent(AgentBase):
394
442
  .set_valid_contexts(["main"]) # Can return to main
395
443
  ```
396
444
 
397
- ### Context and Step Methods
445
+ #### Context and Step Methods
398
446
 
399
- #### Context Methods
447
+ ##### Context Methods
400
448
  - `add_step(name)`: Create a new step in this context
401
449
  - `set_valid_contexts(contexts)`: Control which contexts can be accessed from this context
402
450
 
403
- #### Step Methods
451
+ ##### Step Methods
404
452
  - `set_text(text)`: Set direct text prompt for the step
405
453
  - `add_section(title, body)`: Add POM-style section (alternative to set_text)
406
454
  - `add_bullets(bullets)`: Add bullet points to the current or last section
@@ -409,14 +457,14 @@ class MultiContextAgent(AgentBase):
409
457
  - `set_valid_steps(steps)`: Control navigation to other steps in same context
410
458
  - `set_valid_contexts(contexts)`: Control navigation to other contexts
411
459
 
412
- ### Navigation Rules
460
+ #### Navigation Rules
413
461
 
414
462
  - **Valid Steps**: If omitted, only "next" step is implied. If specified, only those steps are allowed.
415
463
  - **Valid Contexts**: If omitted, user is trapped in current context. If specified, can navigate to those contexts.
416
464
  - **Single Context**: Must be named "default" for single-context workflows.
417
465
  - **Function Restrictions**: Use `set_functions(["function_name"])` or `set_functions("none")` to control AI tool access.
418
466
 
419
- ### Complete Example: Customer Support Workflow
467
+ #### Complete Example: Customer Support Workflow
420
468
 
421
469
  ```python
422
470
  class SupportAgent(AgentBase):
@@ -471,7 +519,7 @@ agent = SupportAgent()
471
519
  agent.serve()
472
520
  ```
473
521
 
474
- ### Benefits
522
+ #### Benefits
475
523
 
476
524
  - **Clear Structure**: Explicit workflow definition makes agent behavior predictable
477
525
  - **Enhanced Control**: Fine-grained control over function access and navigation
@@ -481,19 +529,19 @@ agent.serve()
481
529
 
482
530
  For detailed documentation and advanced examples, see [Contexts and Steps Guide](docs/contexts_guide.md).
483
531
 
484
- ## Installation
532
+ ### Installation
485
533
 
486
- ### Basic Installation
534
+ #### Basic Installation
487
535
 
488
536
  ```bash
489
537
  pip install signalwire-agents
490
538
  ```
491
539
 
492
- ### Optional Search Functionality
540
+ #### Optional Search Functionality
493
541
 
494
542
  The SDK includes optional local search capabilities that can be installed separately to avoid adding large dependencies to the base installation:
495
543
 
496
- #### Search Installation Options
544
+ ##### Search Installation Options
497
545
 
498
546
  ```bash
499
547
  # Query existing .swsearch files only (smallest footprint)
@@ -512,7 +560,7 @@ pip install signalwire-agents[search-nlp]
512
560
  pip install signalwire-agents[search-all]
513
561
  ```
514
562
 
515
- #### What Each Option Includes
563
+ ##### What Each Option Includes
516
564
 
517
565
  | Option | Size | Features |
518
566
  |--------|------|----------|
@@ -528,7 +576,7 @@ pip install signalwire-agents[search-all]
528
576
  - Agents that only need to query knowledge bases (not build them)
529
577
  - Smaller deployment footprint requirements
530
578
 
531
- #### Search Features
579
+ ##### Search Features
532
580
 
533
581
  - **Local/Offline Search**: No external API dependencies
534
582
  - **Hybrid Search**: Vector similarity + keyword search
@@ -537,7 +585,7 @@ pip install signalwire-agents[search-all]
537
585
  - **CLI Tools**: Build search indexes from document directories
538
586
  - **HTTP API**: Standalone or embedded search service
539
587
 
540
- #### Usage Example
588
+ ##### Usage Example
541
589
 
542
590
  ```python
543
591
  # Only available with search extras installed
@@ -560,7 +608,7 @@ results = engine.search(
560
608
  )
561
609
  ```
562
610
 
563
- ## Quick Start
611
+ ### Quick Start
564
612
 
565
613
  ```python
566
614
  from signalwire_agents import AgentBase
@@ -593,7 +641,7 @@ if __name__ == "__main__":
593
641
  agent.serve(host="0.0.0.0", port=8000)
594
642
  ```
595
643
 
596
- ## Using Prefab Agents
644
+ ### Using Prefab Agents
597
645
 
598
646
  ```python
599
647
  from signalwire_agents.prefabs import InfoGathererAgent
@@ -618,16 +666,16 @@ Available prefabs include:
618
666
  - `SurveyAgent`: Conducts structured surveys with questions and rating scales
619
667
  - `ReceptionistAgent`: Greets callers and transfers them to appropriate departments
620
668
 
621
- ## Dynamic Agent Configuration
669
+ ### Dynamic Agent Configuration
622
670
 
623
671
  Configure agents dynamically based on request parameters for multi-tenant applications, A/B testing, and personalization.
624
672
 
625
- ### Static vs Dynamic Configuration
673
+ #### Static vs Dynamic Configuration
626
674
 
627
675
  - **Static**: Agent configured once at startup (traditional approach)
628
676
  - **Dynamic**: Agent configured fresh for each request based on parameters
629
677
 
630
- ### Basic Example
678
+ #### Basic Example
631
679
 
632
680
  ```python
633
681
  from signalwire_agents import AgentBase
@@ -672,7 +720,7 @@ class DynamicAgent(AgentBase):
672
720
  # curl "http://localhost:3000/dynamic?tier=standard&language=en"
673
721
  ```
674
722
 
675
- ### Use Cases
723
+ #### Use Cases
676
724
 
677
725
  - **Multi-tenant SaaS**: Different configurations per customer/organization
678
726
  - **A/B Testing**: Test different agent behaviors with different user groups
@@ -680,7 +728,7 @@ class DynamicAgent(AgentBase):
680
728
  - **Localization**: Language and cultural adaptation based on user location
681
729
  - **Dynamic Pricing**: Adjust features and capabilities based on subscription tiers
682
730
 
683
- ### Preserving Dynamic State in SWAIG Callbacks
731
+ #### Preserving Dynamic State in SWAIG Callbacks
684
732
 
685
733
  When using dynamic configuration to add skills or tools based on request parameters, there's a challenge: SWAIG webhook callbacks are separate HTTP requests that won't have the original query parameters. The SDK provides `add_swaig_query_params()` to solve this:
686
734
 
@@ -726,9 +774,9 @@ This ensures that any dynamic configuration based on request parameters is consi
726
774
 
727
775
  For detailed documentation and advanced examples, see the [Agent Guide](docs/agent_guide.md#dynamic-agent-configuration).
728
776
 
729
- ## Configuration
777
+ ### Configuration
730
778
 
731
- ### Environment Variables
779
+ #### Environment Variables
732
780
 
733
781
  The SDK supports the following environment variables:
734
782
 
@@ -745,14 +793,14 @@ When the auth environment variables are set, they will be used for all agents in
745
793
 
746
794
  To enable HTTPS directly (without a reverse proxy), set `SWML_SSL_ENABLED` to "true", provide valid paths to your certificate and key files, and specify your domain name.
747
795
 
748
- ## Testing
796
+ ### Testing
749
797
 
750
798
  The SDK includes powerful CLI tools for development and testing:
751
799
 
752
800
  - **`swaig-test`**: Comprehensive local testing and serverless environment simulation
753
801
  - **`sw-search`**: Build local search indexes from document directories and search within them
754
802
 
755
- ### Local Testing with swaig-test
803
+ #### Local Testing with swaig-test
756
804
 
757
805
  Test your agents locally without deployment:
758
806
 
@@ -774,7 +822,7 @@ swaig-test examples/my_agent.py --dump-swml
774
822
  swaig-test examples/my_agent.py --dump-swml --format-json | jq '.'
775
823
  ```
776
824
 
777
- ### Serverless Environment Simulation
825
+ #### Serverless Environment Simulation
778
826
 
779
827
  Test your agents in simulated serverless environments without deployment:
780
828
 
@@ -807,7 +855,7 @@ swaig-test examples/my_agent.py --simulate-serverless azure_function \
807
855
  --exec my_function
808
856
  ```
809
857
 
810
- ### Environment Management
858
+ #### Environment Management
811
859
 
812
860
  Use environment files for consistent testing across platforms:
813
861
 
@@ -829,7 +877,7 @@ swaig-test examples/my_agent.py --simulate-serverless lambda \
829
877
  --env-file production.env --env DEBUG=true --dump-swml
830
878
  ```
831
879
 
832
- ### Cross-Platform Testing
880
+ #### Cross-Platform Testing
833
881
 
834
882
  Test the same agent across multiple serverless platforms:
835
883
 
@@ -846,7 +894,7 @@ swaig-test examples/my_agent.py --simulate-serverless lambda --dump-swml | grep
846
894
  swaig-test examples/my_agent.py --simulate-serverless cgi --cgi-host example.com --dump-swml | grep web_hook_url
847
895
  ```
848
896
 
849
- ### Key Benefits
897
+ #### Key Benefits
850
898
 
851
899
  - **No Deployment Required**: Test serverless behavior locally
852
900
  - **Environment Simulation**: Complete platform-specific environment variable setup
@@ -857,7 +905,7 @@ swaig-test examples/my_agent.py --simulate-serverless cgi --cgi-host example.com
857
905
 
858
906
  For detailed testing documentation, see the [CLI Testing Guide](docs/cli_testing_guide.md).
859
907
 
860
- ## Documentation
908
+ ### Documentation
861
909
 
862
910
  The package includes comprehensive documentation in the `docs/` directory:
863
911
 
@@ -870,6 +918,12 @@ The package includes comprehensive documentation in the `docs/` directory:
870
918
 
871
919
  These documents provide in-depth explanations of the features, APIs, and usage patterns.
872
920
 
921
+ </details
922
+
923
+ ### ***[Read the official docs.](https://developer.signalwire.com/sdks/agents-sdk)***
924
+
925
+ ---
926
+
873
927
  ## License
874
928
 
875
929
  MIT
@@ -1,6 +1,6 @@
1
- signalwire_agents/__init__.py,sha256=5TiCvjU53y8o22RKkXnmqehcXDi62LZQ_YOaqIUq35k,2608
1
+ signalwire_agents/__init__.py,sha256=LAnGf-IAb3LdYxNKag2n8bhaqiDytjiKShisdVKXZ8U,2608
2
2
  signalwire_agents/agent_server.py,sha256=x9HyWia8D3r6KMqY-Q4DtNVivfJWLTx8B-KzUI8okuA,26880
3
- signalwire_agents/schema.json,sha256=AWhh6MoMU95roA_6RSdVdvbHDWPYqMavRoSnsVeMiw8,240965
3
+ signalwire_agents/schema.json,sha256=6-7ccbt39iM1CO36dOfvupRPfd0gnQ0XoAdyo-EFyjo,238042
4
4
  signalwire_agents/cli/__init__.py,sha256=XbxAQFaCIdGXIXJiriVBWoFPOJsC401u21588nO4TG8,388
5
5
  signalwire_agents/cli/build_search.py,sha256=KLQJBqVSADFyGcKAi0KLwU_UoUd5rtRoKAdfcH91u70,28652
6
6
  signalwire_agents/cli/config.py,sha256=2i4e0BArdKsaXxjeueYYRNke7GWicHPYC2wuitVrP7A,2541
@@ -121,9 +121,9 @@ signalwire_agents/utils/pom_utils.py,sha256=4Mr7baQ_xR_hfJ72YxQRAT_GFa663YjFX_Pu
121
121
  signalwire_agents/utils/schema_utils.py,sha256=i4okv_O9bUApwT_jJf4Yoij3bLCrGrW3DC-vzSy2RuY,16392
122
122
  signalwire_agents/utils/token_generators.py,sha256=4Mr7baQ_xR_hfJ72YxQRAT_GFa663YjFX_PumJ35Xds,191
123
123
  signalwire_agents/utils/validators.py,sha256=4Mr7baQ_xR_hfJ72YxQRAT_GFa663YjFX_PumJ35Xds,191
124
- signalwire_agents-0.1.30.dist-info/licenses/LICENSE,sha256=NYvAsB-rTcSvG9cqHt9EUHAWLiA9YzM4Qfz-mPdvDR0,1067
125
- signalwire_agents-0.1.30.dist-info/METADATA,sha256=AcO-83M3tqqeVWTfXm3hQ6KNk4SrHgKKGsvgR80zRZ4,35907
126
- signalwire_agents-0.1.30.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
127
- signalwire_agents-0.1.30.dist-info/entry_points.txt,sha256=sfdeRaTSs9J56pqFdcZGRTxQcTuecb8IMx8gqleJ6s0,136
128
- signalwire_agents-0.1.30.dist-info/top_level.txt,sha256=kDGS6ZYv84K9P5Kyg9_S8P_pbUXoHkso0On_DB5bbWc,18
129
- signalwire_agents-0.1.30.dist-info/RECORD,,
124
+ signalwire_agents-0.1.32.dist-info/licenses/LICENSE,sha256=NYvAsB-rTcSvG9cqHt9EUHAWLiA9YzM4Qfz-mPdvDR0,1067
125
+ signalwire_agents-0.1.32.dist-info/METADATA,sha256=weKRqyFq6N4mYkFJOr0v5TgGEN-nBjqsxA4cVmnmMn0,38391
126
+ signalwire_agents-0.1.32.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
127
+ signalwire_agents-0.1.32.dist-info/entry_points.txt,sha256=sfdeRaTSs9J56pqFdcZGRTxQcTuecb8IMx8gqleJ6s0,136
128
+ signalwire_agents-0.1.32.dist-info/top_level.txt,sha256=kDGS6ZYv84K9P5Kyg9_S8P_pbUXoHkso0On_DB5bbWc,18
129
+ signalwire_agents-0.1.32.dist-info/RECORD,,