> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # Agents ## Docs - [AgentBase](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base.md): The central class for building AI-powered voice agents with SignalWire. - [add_answer_verb](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/add-answer-verb.md): Configure the answer verb that connects the call. - [add_function_include](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/add-function-include.md): Add a remote function include to the SWAIG configuration. - [add_hint](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/add-hint.md): Add a single speech recognition hint to improve transcription accuracy. - [add_hints](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/add-hints.md): Add multiple speech recognition hints at once. - [add_internal_filler](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/add-internal-filler.md): Add filler phrases for a specific internal/native SWAIG function and language. - [add_language](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/add-language.md): Add a language configuration with voice settings for multilingual conversations. - [add_mcp_server](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/add-mcp-server.md): Add an external MCP server for tool discovery and invocation. - [add_pattern_hint](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/add-pattern-hint.md): Add a speech recognition hint with pattern matching and replacement. - [add_per_call_config](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/add-per-call-config.md): Register a per-request configuration callback without replacing callbacks already set. - [add_post_ai_verb](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/add-post-ai-verb.md): Add a SWML verb to run after the AI conversation ends. - [add_post_answer_verb](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/add-post-answer-verb.md): Add a SWML verb to run after the call is answered but before the AI starts. - [add_pre_answer_verb](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/add-pre-answer-verb.md): Add a SWML verb to run before the call is answered. - [add_pronunciation](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/add-pronunciation.md): Add a pronunciation rule to correct how the AI speaks a specific word or phrase. - [add_skill](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/add-skill.md): Load and activate a skill on the agent. - [add_swaig_query_params](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/add-swaig-query-params.md): Append query parameters to all SWAIG webhook URLs. - [as_router](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/as-router.md): Get the agent's endpoints as a FastAPI APIRouter for mounting in larger applications. - [auto_map_sip_usernames](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/auto-map-sip-usernames.md): Automatically register common SIP usernames derived from the agent's name and route. - [clear_post_ai_verbs](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/clear-post-ai-verbs.md): Remove all post-AI verbs from the call flow. - [clear_post_answer_verbs](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/clear-post-answer-verbs.md): Remove all post-answer verbs from the call flow. - [clear_pre_answer_verbs](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/clear-pre-answer-verbs.md): Remove all pre-answer verbs from the call flow. - [clear_swaig_query_params](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/clear-swaig-query-params.md): Remove all SWAIG query parameters from the agent. - [define_contexts](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/define-contexts.md): Define multi-step conversation contexts and workflows for complex agent interactions. - [define_tool](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/define-tool.md): Programmatically define a SWAIG tool that the AI can invoke during conversations. - [define_tools](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/define-tools.md): Override hook that returns the list of SWAIG tools available to the AI. - [enable_debug_events](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/enable-debug-events.md): Enable real-time debug event webhooks from the AI module during calls. - [enable_debug_routes](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/enable-debug-routes.md): Enable debug and testing routes on the agent's HTTP server. - [enable_mcp_server](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/enable-mcp-server.md): Expose the agent's tools as an MCP server endpoint. - [enable_sip_routing](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/enable-sip-routing.md): Enable SIP-based call routing for this agent. - [get_app](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/get-app.md): Get the FastAPI application instance for use with deployment adapters. - [get_basic_auth_credentials](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/get-basic-auth-credentials.md): Retrieve the agent's Basic Auth credentials and their origin. - [get_full_url](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/get-full-url.md): Get the full URL for this agent's endpoint, including host, port, and route. - [get_language_params](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/get-language-params.md): Retrieve the per-language params previously set on an added language. - [get_name](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/get-name.md): Get the agent's display name. - [get_post_prompt](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/get-post-prompt.md): Retrieve the current post-prompt text. - [get_prompt](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/get-prompt.md): Retrieve the current prompt configured on the agent. - [handle_request](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/handle-request.md): Dispatch one HTTP request to the agent without a web framework. - [handle_serverless_request](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/serverless.md): Handle requests in serverless environments like AWS Lambda, Google Cloud Functions, and Azure Functions. - [has_skill](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/has-skill.md): Check whether a specific skill is currently loaded on the agent. - [list_skills](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/list-skills.md): List the names of all currently loaded skills on the agent. - [manual_set_proxy_url](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/manual-set-proxy-url.md): Manually set the proxy URL base for webhook callbacks. - [mount](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/mount.md): Attach an extra router or ASGI app to the agent's web app without shadowing its routes. - [on_call_end](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/on-call-end.md): Register a handler that receives the conversation transcript when a call ends. - [on_debug_event](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/on-debug-event.md): Register a callback for debug events received at the /debug_events endpoint. - [on_function_call](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/on-function-call.md): Override hook called when a SWAIG function is invoked during a conversation. - [on_summary](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/on-summary.md): Handle post-prompt summaries generated after a conversation ends. - [on_swml_request](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/on-swml-request.md): Override hook for customizing the SWML document on a per-request basis. - [prompt_add_section](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/prompt-add-section.md): Add a new section to the agent's structured prompt. - [prompt_add_subsection](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/prompt-add-subsection.md): Add a subsection to an existing prompt section. - [prompt_add_to_section](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/prompt-add-to-section.md): Append content to an existing prompt section or create it if it does not exist. - [prompt_has_section](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/prompt-has-section.md): Check whether a named section exists in the agent's prompt. - [register_routing_callback](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/register-routing-callback.md): Register a callback for dynamic request routing based on SIP URIs or POST data. - [register_sip_username](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/register-sip-username.md): Register a specific SIP username to route calls to this agent. - [register_swaig_function](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/register-swaig-function.md): Register a raw SWAIG function dictionary, typically from a DataMap. - [remove_skill](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/remove-skill.md): Unload a skill from the agent. - [reset_contexts](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/reset-contexts.md): Remove all contexts from the agent, returning it to a no-contexts state. - [run](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/run.md): Smart entry point that auto-detects the runtime environment and starts the agent accordingly. - [serve](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/serve.md): Start a FastAPI/uvicorn web server to serve this agent's SWML and SWAIG endpoints. - [set_dynamic_config_callback](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/set-dynamic-config-callback.md): Set a callback for per-request dynamic agent configuration. - [set_function_includes](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/set-function-includes.md): Set the complete list of remote function includes. - [set_global_data](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/set-global-data.md): Merge data into the global data dictionary available to the AI throughout a conversation. - [set_internal_fillers](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/set-internal-fillers.md): Set filler phrases for native SWAIG functions. - [set_language_params](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/set-language-params.md): Set or replace the per-language params on an already-added language. - [set_languages](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/set-languages.md): Replace all language configurations at once with a list of raw language dictionaries. - [set_multilingual](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/set-multilingual.md): Let the caller switch languages mid-call by configuring recognizer-driven multilingual mode. - [set_native_functions](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/native-functions.md): Enable built-in native functions that execute directly on the SignalWire platform. - [set_param](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/set-param.md): Set a single AI parameter by key. - [set_params](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/set-params.md): Configure AI model parameters such as temperature, timeouts, and speech recognition settings. - [set_post_prompt](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/set-post-prompt.md): Set the post-prompt used for generating call summaries after a conversation ends. - [set_post_prompt_llm_params](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/set-post-prompt-llm-params.md): Set LLM parameters specifically for the post-prompt. - [set_post_prompt_url](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/set-post-prompt-url.md): Override the default URL where post-prompt summaries are delivered. - [set_prompt_llm_params](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/set-prompt-llm-params.md): Set LLM parameters specifically for the main prompt. - [set_prompt_pom](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/set-prompt-pom.md): Set the prompt using a raw Prompt Object Model dictionary structure. - [set_prompt_text](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/set-prompt-text.md): Set the agent's system prompt as a raw text string. - [set_pronunciations](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/set-pronunciations.md): Replace all pronunciation rules at once with a list of raw rule dictionaries. - [set_web_hook_url](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/set-web-hook-url.md): Override the default webhook URL used for SWAIG function calls in the SWML document. - [setup_graceful_shutdown](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/setup-graceful-shutdown.md): Register signal handlers for graceful shutdown, useful for Kubernetes and containerized deployments. - [update_global_data](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/update-global-data.md): Update the global data dictionary with new values. - [validate_basic_auth](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-base/validate-basic-auth.md): Validate HTTP Basic Auth credentials against the agent's stored credentials. - [AgentServer](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-server.md): Host multiple AI agents on a single FastAPI server with shared routing and health checks. - [get_agent](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-server/get-agent.md): Retrieve a specific registered agent by its route. - [get_agents](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-server/get-agents.md): Return all registered agents as a list of route/agent tuples. - [register](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-server/register.md): Register an agent at a URL route on the server. - [register_global_routing_callback](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-server/routing-callback.md): Register a routing callback across all agents for custom request routing. - [run](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-server/run.md): Start the multi-agent server with automatic environment detection. - [serve_static_files](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-server/static-files.md): Serve static files from a directory alongside agent routes. - [setup_sip_routing](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-server/sip-routing.md): Configure SIP-based routing to direct calls to specific agents by username. - [unregister](https://signalwire.com/docs/server-sdks/reference/python/agents/agent-server/unregister.md): Remove an agent from the server's registry by route. - [AIChatClient](https://signalwire.com/docs/server-sdks/reference/python/agents/ai-chat-client.md): Async client for holding a text conversation with a SignalWire AI agent from your own server. - [chat](https://signalwire.com/docs/server-sdks/reference/python/agents/ai-chat-client/chat.md): Send a message to an AI agent and return its reply. - [close](https://signalwire.com/docs/server-sdks/reference/python/agents/ai-chat-client/close.md): Close the HTTP session the client created. - [create_conversation](https://signalwire.com/docs/server-sdks/reference/python/agents/ai-chat-client/create-conversation.md): Create a conversation against your agent's SWML, or reset an existing one. - [delete](https://signalwire.com/docs/server-sdks/reference/python/agents/ai-chat-client/delete.md): Permanently remove a conversation and its data. - [end](https://signalwire.com/docs/server-sdks/reference/python/agents/ai-chat-client/end.md): End a conversation and trigger its post-processing. - [log](https://signalwire.com/docs/server-sdks/reference/python/agents/ai-chat-client/log.md): Read back the full conversation and its timeline of structured events. - [raw_post](https://signalwire.com/docs/server-sdks/reference/python/agents/ai-chat-client/raw-post.md): Access one JSON-RPC HTTP response with its body unread. - [summarize](https://signalwire.com/docs/server-sdks/reference/python/agents/ai-chat-client/summarize.md): Generate an AI summary of a conversation on demand. - [BedrockAgent](https://signalwire.com/docs/server-sdks/reference/python/agents/bedrock-agent.md): Amazon Bedrock voice-to-voice agent extending AgentBase. - [set_inference_params](https://signalwire.com/docs/server-sdks/reference/python/agents/bedrock-agent/set-inference-params.md): Update Bedrock inference parameters. - [set_voice](https://signalwire.com/docs/server-sdks/reference/python/agents/bedrock-agent/set-voice.md): Set the Bedrock voice ID after construction. - [ChatGateway](https://signalwire.com/docs/server-sdks/reference/python/agents/chat-gateway.md): Browser-facing proxy that lets a page chat with an AI agent without holding a SignalWire API token. - [close](https://signalwire.com/docs/server-sdks/reference/python/agents/chat-gateway/close.md): Close the AIChatClient the gateway created. - [last_activity](https://signalwire.com/docs/server-sdks/reference/python/agents/chat-gateway/last-activity.md): Find when a conversation was last touched, so a reload can resume its idle clock. - [mint_handle](https://signalwire.com/docs/server-sdks/reference/python/agents/chat-gateway/mint-handle.md): Issue a signed handle for a conversation, server-side. - [prepare](https://signalwire.com/docs/server-sdks/reference/python/agents/chat-gateway/prepare.md): Validate a browser request and build the upstream JSON-RPC call, without FastAPI. - [read_handle](https://signalwire.com/docs/server-sdks/reference/python/agents/chat-gateway/read-handle.md): Verify a signed handle and return the conversation id inside it. - [router](https://signalwire.com/docs/server-sdks/reference/python/agents/chat-gateway/router.md): Build the APIRouter that exposes the gateway to a browser. - [visible_messages](https://signalwire.com/docs/server-sdks/reference/python/agents/chat-gateway/visible-messages.md): Filter a conversation down to the dialogue a browser may redraw. - [CLI Tools](https://signalwire.com/docs/server-sdks/reference/python/agents/cli.md): Command-line tools for testing, searching, and scaffolding. - [mcp-gateway](https://signalwire.com/docs/server-sdks/reference/python/agents/cli/mcp-gateway.md): HTTP bridge between MCP servers and SignalWire SWAIG functions. - [sw-agent-dokku](https://signalwire.com/docs/server-sdks/reference/python/agents/cli/sw-agent-dokku.md): Deploy and manage SignalWire agents on Dokku hosting. - [sw-agent-init](https://signalwire.com/docs/server-sdks/reference/python/agents/cli/sw-agent-init.md): Scaffold new SignalWire agent projects with configurable templates. - [sw-search](https://signalwire.com/docs/server-sdks/reference/python/agents/cli/sw-search.md): Build, search, and validate vector search indexes for AI agent knowledge bases. - [swaig-test](https://signalwire.com/docs/server-sdks/reference/python/agents/cli/swaig-test.md): Test SWAIG functions and generate SWML documents locally without deploying. - [Configuration](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration.md): Environment variables, config files, and security settings. - [AuthHandler](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/auth-handler.md): Unified authentication handler for Basic Auth, Bearer tokens, and API keys. - [flask_decorator](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/auth-handler/flask-decorator.md): Flask decorator for protecting routes with authentication. - [get_auth_info](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/auth-handler/get-auth-info.md): Get a summary of configured authentication methods. - [get_fastapi_dependency](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/auth-handler/get-fastapi-dependency.md): Get a FastAPI dependency function for protecting routes. - [verify_api_key](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/auth-handler/verify-api-key.md): Verify an API key using constant-time comparison. - [verify_basic_auth](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/auth-handler/verify-basic-auth.md): Verify HTTP Basic Auth credentials using constant-time comparison. - [verify_bearer_token](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/auth-handler/verify-bearer-token.md): Verify a Bearer token using constant-time comparison. - [ConfigLoader](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/config-loader.md): JSON configuration loading with environment variable substitution. - [find_config_file](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/config-loader/find-config-file.md): Static method to locate a config file without loading it. - [get](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/config-loader/get.md): Get a configuration value by dot-notation path. - [get_config](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/config-loader/get-config.md): Get the raw configuration dictionary before environment variable substitution. - [get_config_file](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/config-loader/get-config-file.md): Get the path of the loaded config file. - [get_section](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/config-loader/get-section.md): Get an entire configuration section with environment variables substituted. - [has_config](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/config-loader/has-config.md): Check whether a configuration file was successfully loaded. - [merge_with_env](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/config-loader/merge-with-env.md): Merge configuration with environment variables matching a prefix. - [substitute_vars](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/config-loader/substitute-vars.md): Recursively substitute environment variables in configuration values. - [Environment Variables](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/environment-variables.md): Complete reference for all environment variables used by the SignalWire Server SDK. - [SecurityConfig](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/security-config.md): Unified security configuration for SSL, CORS, host allowlists, and rate limiting. - [get_basic_auth](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/security-config/get-basic-auth.md): Get basic authentication credentials, generating a password if not set. - [get_cors_config](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/security-config/get-cors-config.md): Get CORS configuration suitable for FastAPI's CORSMiddleware. - [get_security_headers](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/security-config/get-security-headers.md): Get security headers to add to HTTP responses. - [get_ssl_context_kwargs](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/security-config/get-ssl-context-kwargs.md): Get SSL parameters suitable for passing to uvicorn. - [get_url_scheme](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/security-config/get-url-scheme.md): Get the URL scheme based on SSL configuration. - [load_from_env](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/security-config/load-from-env.md): Reload all settings from environment variables. - [log_config](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/security-config/log-config.md): Log the current security configuration for debugging. - [should_allow_host](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/security-config/should-allow-host.md): Check if a host is in the allowed hosts list. - [validate_ssl_config](https://signalwire.com/docs/server-sdks/reference/python/agents/configuration/security-config/validate-ssl-config.md): Validate that SSL configuration is complete and certificate files exist. - [ContextBuilder](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder.md): Build multi-step conversation workflows with structured contexts and steps. - [add_context](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/add-context.md): Create a new named context and add it to the builder. - [Context](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/context.md): A named conversation workflow containing steps, prompts, and navigation rules. - [add_bullets](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/context/add-bullets.md): Add a POM section with bullet points to the context prompt. - [add_enter_filler](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/context/add-enter-filler.md): Add enter fillers for a specific language. - [add_exit_filler](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/context/add-exit-filler.md): Add exit fillers for a specific language. - [add_section](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/context/add-section.md): Add a POM section to the context prompt. - [add_step](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/context/add-step.md): Add a new step to this context. - [add_system_bullets](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/context/add-system-bullets.md): Add a POM section with bullets to the system prompt. - [add_system_section](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/context/add-system-section.md): Add a POM section to the system prompt. - [get_step](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/context/get-step.md): Get an existing step by name. - [move_step](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/context/move-step.md): Move an existing step to a specific position in the step order. - [remove_step](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/context/remove-step.md): Remove a step from this context. - [set_consolidate](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/context/set-consolidate.md): Set whether to consolidate conversation history when entering this context. - [set_enter_fillers](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/context/set-enter-fillers.md): Set all enter fillers at once. - [set_exit_fillers](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/context/set-exit-fillers.md): Set all exit fillers at once. - [set_full_reset](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/context/set-full-reset.md): Set whether to completely replace the system prompt when entering this context. - [set_history](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/context/set-history.md): Set the default history visibility mode for every step in this context. - [set_initial_step](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/context/set-initial-step.md): Set which step the context starts on when entered. - [set_isolated](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/context/set-isolated.md): Set whether to truncate conversation history when entering this context. - [set_post_prompt](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/context/set-post-prompt.md): Override the post-prompt text while this context is active. - [set_prompt](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/context/set-prompt.md): Set the context's prompt text directly. - [set_system_prompt](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/context/set-system-prompt.md): Set a new system prompt that takes effect when this context is entered. - [set_user_prompt](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/context/set-user-prompt.md): Inject a user message when entering this context. - [set_valid_contexts](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/context/set-valid-contexts.md): Set which contexts the agent can navigate to from this context. - [set_valid_steps](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/context/set-valid-steps.md): Set which steps can be navigated to from any step in this context. - [create_simple_context](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/create-simple-context.md): Helper function to create a standalone Context without a ContextBuilder. - [GatherInfo & GatherQuestion](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/gather-classes.md): Structured information gathering within context steps using the server-side gather_info system. - [get_context](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/get-context.md): Retrieve an existing context by name. - [reset](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/reset.md): Remove all contexts, returning the builder to its initial state. - [Step](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/step.md): An individual step in a conversation context with prompt, criteria, and navigation. - [add_bullets](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/step/add-bullets.md): Add a POM section with bullet points to the step. - [add_gather_question](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/step/add-gather-question.md): Add a question to this step's gather_info configuration. - [add_section](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/step/add-section.md): Add a POM section to the step. - [clear_sections](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/step/clear-sections.md): Remove all POM sections and direct text from this step. - [set_end](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/step/set-end.md): Set whether the conversation should end after this step completes. - [set_functions](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/step/set-functions.md): Set which SWAIG functions are available during this step. - [set_gather_info](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/step/set-gather-info.md): Enable structured info gathering for this step. - [set_history](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/step/set-history.md): Control what the model still sees from earlier steps when this step is entered. - [set_reset_consolidate](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/step/set-reset-consolidate.md): Set whether to consolidate conversation history on context switch. - [set_reset_full_reset](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/step/set-reset-full-reset.md): Set whether to completely replace the system prompt on context switch. - [set_reset_system_prompt](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/step/set-reset-system-prompt.md): Set a new system prompt for context switching from this step. - [set_reset_user_prompt](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/step/set-reset-user-prompt.md): Set a user message to inject when this step triggers a context switch. - [set_skip_to_next_step](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/step/set-skip-to-next-step.md): Automatically advance to the next step without evaluating criteria. - [set_skip_user_turn](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/step/set-skip-user-turn.md): Skip waiting for user input after this step completes. - [set_step_criteria](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/step/set-step-criteria.md): Define when this step is considered complete. - [set_text](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/step/set-text.md): Set the step's prompt text directly. - [set_valid_contexts](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/step/set-valid-contexts.md): Set which contexts the agent can navigate to from this step. - [set_valid_steps](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/step/set-valid-steps.md): Set which steps the agent can navigate to from this step. - [to_dict](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/to-dict.md): Convert all contexts to a dictionary for SWML generation. - [validate](https://signalwire.com/docs/server-sdks/reference/python/agents/context-builder/validate.md): Validate the entire context configuration tree. - [DataMap](https://signalwire.com/docs/server-sdks/reference/python/agents/data-map.md): Fluent builder for server-side API tools that execute without webhooks. - [body](https://signalwire.com/docs/server-sdks/reference/python/agents/data-map/body.md): Set the request body for a webhook. - [description](https://signalwire.com/docs/server-sdks/reference/python/agents/data-map/description.md): Alias for purpose — sets the tool description shown to the AI. - [error_keys](https://signalwire.com/docs/server-sdks/reference/python/agents/data-map/error-keys.md): Set error detection keys for webhook responses. - [expression](https://signalwire.com/docs/server-sdks/reference/python/agents/data-map/expression.md): Add a pattern-based response without an API call. - [fallback_output](https://signalwire.com/docs/server-sdks/reference/python/agents/data-map/fallback-output.md): Set the top-level fallback output used when no webhook or expression matches. - [foreach](https://signalwire.com/docs/server-sdks/reference/python/agents/data-map/foreach.md): Process an array from the webhook response. - [global_error_keys](https://signalwire.com/docs/server-sdks/reference/python/agents/data-map/global-error-keys.md): Set top-level error detection keys that apply regardless of webhook context. - [Helper Functions](https://signalwire.com/docs/server-sdks/reference/python/agents/data-map/helper-functions.md): Convenience functions for creating common DataMap patterns. - [output](https://signalwire.com/docs/server-sdks/reference/python/agents/data-map/output.md): Set the output template for a webhook. - [parameter](https://signalwire.com/docs/server-sdks/reference/python/agents/data-map/parameter.md): Add a function parameter to the tool definition. - [params](https://signalwire.com/docs/server-sdks/reference/python/agents/data-map/params.md): Set query or form parameters for the most recently added webhook. - [purpose](https://signalwire.com/docs/server-sdks/reference/python/agents/data-map/purpose.md): Set the function description shown to the AI. - [to_swaig_function](https://signalwire.com/docs/server-sdks/reference/python/agents/data-map/to-swaig-function.md): Convert the DataMap to a SWAIG function definition dictionary. - [webhook](https://signalwire.com/docs/server-sdks/reference/python/agents/data-map/webhook.md): Add an API call to the DataMap. - [webhook_expressions](https://signalwire.com/docs/server-sdks/reference/python/agents/data-map/webhook-expressions.md): Add post-processing expressions for a webhook response. - [FunctionResult](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result.md): Fluent interface for returning responses and actions from SWAIG tool functions. - [add_action](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/add-action.md): Append a raw action to the FunctionResult action list. - [add_actions](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/add-actions.md): Append multiple raw actions to the FunctionResult action list. - [add_dynamic_hints](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/add-dynamic-hints.md): Add speech recognition hints dynamically during a call. - [clear_dynamic_hints](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/clear-dynamic-hints.md): Remove all dynamically added speech recognition hints. - [connect](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/connect.md): Transfer or connect the call to another destination. - [create_payment_action](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/create-payment-action.md): Build a single action entry for a payment prompt. - [create_payment_parameter](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/create-payment-parameter.md): Build a parameter entry for the pay() method. - [create_payment_prompt](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/create-payment-prompt.md): Build a payment prompt object for use with pay(). - [enable_extensive_data](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/enable-extensive-data.md): Send full data to the LLM for the current turn only. - [enable_functions_on_timeout](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/enable-functions-on-timeout.md): Allow SWAIG function calls when a speaker timeout occurs. - [execute_rpc](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/execute-rpc.md): Execute a generic RPC method on a call. - [execute_swml](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/execute-swml.md): Execute a raw SWML document as an action. - [hangup](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/hangup.md): End the call immediately. - [hold](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/hold.md): Put the call on hold, announce it first, and route where the call resumes. - [join_conference](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/join-conference.md): Join an ad-hoc audio conference with extensive configuration options. - [join_room](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/join-room.md): Join a Relay room for multi-party communication. - [pay](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/pay.md): Collect and process a credit card payment during a call. - [play_background_file](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/play-background-file.md): Play an audio or video file in the background during a call. - [record_call](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/record-call.md): Start recording the call in the background. - [remove_global_data](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/remove-global-data.md): Remove one or more keys from the global session data. - [remove_metadata](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/remove-metadata.md): Remove one or more keys from the current function's metadata store. - [replace_in_history](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/replace-in-history.md): Control how this function call appears in the AI's conversation history. - [rpc_ai_global_data](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/rpc-ai-global-data.md): Merge data into another call's global_data without adding a conversation turn. - [rpc_ai_message](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/rpc-ai-message.md): Inject a message into the AI agent running on another call. - [rpc_ai_unhold](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/rpc-ai-unhold.md): Release another call from hold via RPC. - [rpc_dial](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/rpc-dial.md): Dial out to a phone number with a destination SWML URL via RPC. - [say](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/say.md): Make the AI agent speak specific text immediately. - [send_sms](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/send-sms.md): Send an SMS or MMS message from a tool function. - [set_end_of_speech_timeout](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/set-end-of-speech-timeout.md): Adjust the end-of-speech silence timeout for speech recognition. - [set_metadata](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/set-metadata.md): Set function-scoped metadata on a FunctionResult. - [set_post_process](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/set-post-process.md): Enable or disable post-processing on a FunctionResult. - [set_response](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/set-response.md): Set or replace the response text on a FunctionResult. - [set_speech_event_timeout](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/set-speech-event-timeout.md): Adjust the speech event timeout for noisy environments. - [set_tool_response](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/set-tool-response.md): Split the response into a factual result and a speaking instruction. - [simulate_user_input](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/simulate-user-input.md): Inject text as simulated user speech input. - [sip_refer](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/sip-refer.md): Send a SIP REFER message to transfer the call in a SIP environment. - [stop](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/stop.md): Stop the agent execution immediately. - [stop_background_file](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/stop-background-file.md): Stop the currently playing background audio file. - [stop_record_call](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/stop-record-call.md): Stop an active background call recording. - [stop_tap](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/stop-tap.md): Stop an active media tap stream. - [switch_context](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/switch-context.md): Perform an advanced context switch with prompt replacement and history control. - [swml_change_context](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/swml-change-context.md): Switch to a different conversation context. - [swml_change_step](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/swml-change-step.md): Transition to a different step within the current conversation context. - [swml_transfer](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/swml-transfer.md): Transfer the call to a SWML endpoint with a return message. - [swml_user_event](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/swml-user-event.md): Send a custom user event through SWML for real-time UI updates. - [tap](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/tap.md): Stream call audio to an external endpoint via WebSocket or RTP. - [to_dict](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/to-dict.md): Serialize a FunctionResult to the SWAIG response format. - [toggle_functions](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/toggle-functions.md): Enable or disable specific SWAIG functions at runtime. - [update_global_data](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/update-global-data.md): Set or update key-value pairs in the global session data. - [update_settings](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/update-settings.md): Update AI runtime settings dynamically during a call. - [wait_for_user](https://signalwire.com/docs/server-sdks/reference/python/agents/function-result/wait-for-user.md): Control how the agent pauses and waits for user input. - [HandoffRouter](https://signalwire.com/docs/server-sdks/reference/python/agents/handoff-router.md): The three routes a browser chat widget calls to move a conversation between text and a phone call. - [escalate](https://signalwire.com/docs/server-sdks/reference/python/agents/handoff-router/escalate.md): End a chat leg and wait for its record before a phone call is placed. - [redeem](https://signalwire.com/docs/server-sdks/reference/python/agents/handoff-router/redeem.md): Exchange a handoff nonce for a chat handle, ending the call first. - [register](https://signalwire.com/docs/server-sdks/reference/python/agents/handoff-router/register.md): Record which conversation and call a handoff nonce stands for. - [router](https://signalwire.com/docs/server-sdks/reference/python/agents/handoff-router/router.md): Build the APIRouter serving the handoff, escalate, and say routes. - [say](https://signalwire.com/docs/server-sdks/reference/python/agents/handoff-router/say.md): Deliver typed text into the live call a nonce names. - [Helper Functions](https://signalwire.com/docs/server-sdks/reference/python/agents/helpers.md): Top-level convenience functions for creating contexts, data map tools, and managing skills. - [LiveWire](https://signalwire.com/docs/server-sdks/reference/python/agents/livewire.md): LiveKit-compatible API layer that maps to SignalWire infrastructure. - [Agent](https://signalwire.com/docs/server-sdks/reference/python/agents/livewire/agent.md): LiveKit-compatible agent class that holds instructions, tools, and lifecycle hooks. - [on_enter](https://signalwire.com/docs/server-sdks/reference/python/agents/livewire/agent/on-enter.md): Lifecycle hook called when the agent enters a session. - [on_exit](https://signalwire.com/docs/server-sdks/reference/python/agents/livewire/agent/on-exit.md): Lifecycle hook called when the agent exits a session. - [on_user_turn_completed](https://signalwire.com/docs/server-sdks/reference/python/agents/livewire/agent/on-user-turn-completed.md): Lifecycle hook called when the user finishes speaking. - [Pipeline Nodes](https://signalwire.com/docs/server-sdks/reference/python/agents/livewire/agent/pipeline-nodes.md): No-op pipeline stubs for LiveKit API compatibility. - [update_instructions](https://signalwire.com/docs/server-sdks/reference/python/agents/livewire/agent/update-instructions.md): Update the agent's system prompt mid-session. - [update_tools](https://signalwire.com/docs/server-sdks/reference/python/agents/livewire/agent/update-tools.md): Replace the agent's tool list mid-session. - [AgentServer](https://signalwire.com/docs/server-sdks/reference/python/agents/livewire/agent-server.md): Server registration and session entrypoint decorator for LiveWire agents. - [rtc_session](https://signalwire.com/docs/server-sdks/reference/python/agents/livewire/agent-server/rtc-session.md): Decorator that registers the session entrypoint function. - [AgentSession](https://signalwire.com/docs/server-sdks/reference/python/agents/livewire/agent-session.md): Session orchestrator that binds an Agent to the SignalWire platform. - [generate_reply](https://signalwire.com/docs/server-sdks/reference/python/agents/livewire/agent-session/generate-reply.md): Trigger the agent to generate a reply. - [interrupt](https://signalwire.com/docs/server-sdks/reference/python/agents/livewire/agent-session/interrupt.md): No-op. SignalWire handles barge-in automatically via its control plane. - [say](https://signalwire.com/docs/server-sdks/reference/python/agents/livewire/agent-session/say.md): Queue text to be spoken by the agent. - [start](https://signalwire.com/docs/server-sdks/reference/python/agents/livewire/agent-session/start.md): Bind an Agent and prepare the underlying SignalWire AgentBase. - [update_agent](https://signalwire.com/docs/server-sdks/reference/python/agents/livewire/agent-session/update-agent.md): Swap in a new Agent mid-session. - [function_tool](https://signalwire.com/docs/server-sdks/reference/python/agents/livewire/function-tool.md): Decorator for wrapping plain Python functions as agent tools. - [Infrastructure](https://signalwire.com/docs/server-sdks/reference/python/agents/livewire/job-context.md): JobContext, JobProcess, and Room stubs for connection lifecycle. - [Plugins](https://signalwire.com/docs/server-sdks/reference/python/agents/livewire/plugins.md): No-op plugin stubs and inference classes for LiveKit API compatibility. - [run_app](https://signalwire.com/docs/server-sdks/reference/python/agents/livewire/run-app.md): Main entry point that starts a LiveWire agent server. - [RunContext](https://signalwire.com/docs/server-sdks/reference/python/agents/livewire/run-context.md): Context object available inside tool handler functions. - [Signals](https://signalwire.com/docs/server-sdks/reference/python/agents/livewire/signals.md): Exception and signal classes for controlling tool behavior and multi-agent handoffs. - [MCP Gateway](https://signalwire.com/docs/server-sdks/reference/python/agents/mcp-gateway.md): Bridge MCP servers with SignalWire SWAIG functions via an HTTP gateway. - [MCPClient](https://signalwire.com/docs/server-sdks/reference/python/agents/mcp-gateway/mcp-client.md): Manage a single MCP server subprocess with JSON-RPC communication. - [MCPGateway](https://signalwire.com/docs/server-sdks/reference/python/agents/mcp-gateway/mcp-gateway.md): The main HTTP gateway service bridging MCP servers with SignalWire SWAIG functions. - [run](https://signalwire.com/docs/server-sdks/reference/python/agents/mcp-gateway/mcp-gateway/run.md): Start the MCP Gateway HTTP server. - [shutdown](https://signalwire.com/docs/server-sdks/reference/python/agents/mcp-gateway/mcp-gateway/shutdown.md): Gracefully shut down the MCP Gateway service. - [MCPService, MCPClient & MCPManager](https://signalwire.com/docs/server-sdks/reference/python/agents/mcp-gateway/mcp-manager.md): Spawn, communicate with, and manage MCP server processes. - [create_client](https://signalwire.com/docs/server-sdks/reference/python/agents/mcp-gateway/mcp-manager/create-client.md): Create and start a new MCP client for a service. - [get_service_tools](https://signalwire.com/docs/server-sdks/reference/python/agents/mcp-gateway/mcp-manager/get-service-tools.md): Discover a service's available tools without maintaining a persistent session. - [shutdown](https://signalwire.com/docs/server-sdks/reference/python/agents/mcp-gateway/mcp-manager/shutdown.md): Stop all active MCP clients. - [validate_services](https://signalwire.com/docs/server-sdks/reference/python/agents/mcp-gateway/mcp-manager/validate-services.md): Validate that all configured services can be started successfully. - [Session & SessionManager](https://signalwire.com/docs/server-sdks/reference/python/agents/mcp-gateway/session-manager.md): Manage MCP session lifecycles with automatic timeout and cleanup. - [close_session](https://signalwire.com/docs/server-sdks/reference/python/agents/mcp-gateway/session-manager/close-session.md): Close and remove a session. - [create_session](https://signalwire.com/docs/server-sdks/reference/python/agents/mcp-gateway/session-manager/create-session.md): Create and register a new MCP session. - [get_session](https://signalwire.com/docs/server-sdks/reference/python/agents/mcp-gateway/session-manager/get-session.md): Retrieve an active session by ID. - [list_sessions](https://signalwire.com/docs/server-sdks/reference/python/agents/mcp-gateway/session-manager/list-sessions.md): List all active sessions with their metadata. - [shutdown](https://signalwire.com/docs/server-sdks/reference/python/agents/mcp-gateway/session-manager/shutdown.md): Close all sessions and stop the background cleanup thread. - [PomBuilder](https://signalwire.com/docs/server-sdks/reference/python/agents/pom-builder.md): Build structured Prompt Object Model prompts with sections, subsections, and bullets. - [add_section](https://signalwire.com/docs/server-sdks/reference/python/agents/pom-builder/add-section.md): Add a new top-level section to the POM. - [add_subsection](https://signalwire.com/docs/server-sdks/reference/python/agents/pom-builder/add-subsection.md): Add a subsection to an existing section. - [add_to_section](https://signalwire.com/docs/server-sdks/reference/python/agents/pom-builder/add-to-section.md): Add content to an existing section. - [from_sections](https://signalwire.com/docs/server-sdks/reference/python/agents/pom-builder/from-sections.md): Create a PomBuilder from a list of section dictionaries. - [has_section / get_section](https://signalwire.com/docs/server-sdks/reference/python/agents/pom-builder/has-section.md): Check if a section exists and retrieve it by title. - [render_markdown / render_xml](https://signalwire.com/docs/server-sdks/reference/python/agents/pom-builder/render.md): Render the POM as Markdown or XML. - [to_dict](https://signalwire.com/docs/server-sdks/reference/python/agents/pom-builder/to-dict.md): Convert the POM to a list of section dictionaries. - [to_json](https://signalwire.com/docs/server-sdks/reference/python/agents/pom-builder/to-json.md): Convert the POM to a JSON string. - [Prefabs](https://signalwire.com/docs/server-sdks/reference/python/agents/prefabs.md): Pre-built agent templates for common conversational patterns. - [ConciergeAgent](https://signalwire.com/docs/server-sdks/reference/python/agents/prefabs/concierge-agent.md): A virtual concierge that provides venue information, answers questions about amenities and services, helps with bookings, and gives directions. - [FAQBotAgent](https://signalwire.com/docs/server-sdks/reference/python/agents/prefabs/faq-bot-agent.md): Answers frequently asked questions by matching user queries against a provided knowledge base. - [InfoGathererAgent](https://signalwire.com/docs/server-sdks/reference/python/agents/prefabs/info-gatherer-agent.md): Collects answers to a series of questions in sequence, with optional confirmation for critical fields. - [ReceptionistAgent](https://signalwire.com/docs/server-sdks/reference/python/agents/prefabs/receptionist-agent.md): Greets callers, collects basic information about their needs, and transfers them to the appropriate department. - [SurveyAgent](https://signalwire.com/docs/server-sdks/reference/python/agents/prefabs/survey-agent.md): Conducts automated surveys with support for multiple question types, response validation, and structured result summaries. - [Search](https://signalwire.com/docs/server-sdks/reference/python/agents/search.md): Build, query, and manage vector search indexes for agent knowledge bases. - [DocumentProcessor](https://signalwire.com/docs/server-sdks/reference/python/agents/search/document-processor.md): Process and chunk documents for search indexing with multiple strategies. - [create_chunks](https://signalwire.com/docs/server-sdks/reference/python/agents/search/document-processor/create-chunks.md): Split document content into chunks using the configured chunking strategy. - [Helper Functions & Constants](https://signalwire.com/docs/server-sdks/reference/python/agents/search/helpers.md): Query preprocessing, document preprocessing, model alias resolution, and constants. - [IndexBuilder](https://signalwire.com/docs/server-sdks/reference/python/agents/search/index-builder.md): Build searchable vector indexes from document directories. - [build_index](https://signalwire.com/docs/server-sdks/reference/python/agents/search/index-builder/build-index.md): Build a search index from a single directory. - [build_index_from_sources](https://signalwire.com/docs/server-sdks/reference/python/agents/search/index-builder/build-index-from-sources.md): Build a complete search index from multiple source files and directories. - [validate_index](https://signalwire.com/docs/server-sdks/reference/python/agents/search/index-builder/validate-index.md): Validate an existing .swsearch index file. - [SearchEngine](https://signalwire.com/docs/server-sdks/reference/python/agents/search/search-engine.md): Hybrid search engine for vector and keyword search over indexed documents. - [get_stats](https://signalwire.com/docs/server-sdks/reference/python/agents/search/search-engine/get-stats.md): Return statistics about the search index. - [search](https://signalwire.com/docs/server-sdks/reference/python/agents/search/search-engine/search.md): Perform a hybrid search query against the indexed documents. - [SearchIndexMigrator](https://signalwire.com/docs/server-sdks/reference/python/agents/search/migrator.md): Migrate search indexes between SQLite and pgvector backends. - [get_index_info](https://signalwire.com/docs/server-sdks/reference/python/agents/search/migrator/get-index-info.md): Retrieve information about a search index. - [migrate_pgvector_to_sqlite](https://signalwire.com/docs/server-sdks/reference/python/agents/search/migrator/migrate-pgvector-to-sqlite.md): Migrate a pgvector collection to a SQLite .swsearch file. - [migrate_sqlite_to_pgvector](https://signalwire.com/docs/server-sdks/reference/python/agents/search/migrator/migrate-sqlite-to-pgvector.md): Migrate a .swsearch SQLite index to a pgvector collection in PostgreSQL. - [SearchService](https://signalwire.com/docs/server-sdks/reference/python/agents/search/search-service.md): HTTP API service for serving search queries with authentication and caching. - [search_direct](https://signalwire.com/docs/server-sdks/reference/python/agents/search/search-service/search-direct.md): Perform a search programmatically without going through the HTTP API. - [start](https://signalwire.com/docs/server-sdks/reference/python/agents/search/search-service/start.md): Start the HTTP search service. - [stop](https://signalwire.com/docs/server-sdks/reference/python/agents/search/search-service/stop.md): Placeholder for stopping the search service (not yet implemented). - [SkillBase](https://signalwire.com/docs/server-sdks/reference/python/agents/skill-base.md): Abstract base class for creating reusable, pluggable agent skills. - [cleanup](https://signalwire.com/docs/server-sdks/reference/python/agents/skill-base/cleanup.md): Release resources when the skill is removed or the agent shuts down. - [define_tool](https://signalwire.com/docs/server-sdks/reference/python/agents/skill-base/define-tool.md): Register a tool with automatic swaig_fields merging. - [get_global_data](https://signalwire.com/docs/server-sdks/reference/python/agents/skill-base/get-global-data.md): Return data to merge into the agent's global_data dictionary. - [get_hints](https://signalwire.com/docs/server-sdks/reference/python/agents/skill-base/get-hints.md): Return speech recognition hints for this skill. - [get_instance_key](https://signalwire.com/docs/server-sdks/reference/python/agents/skill-base/get-instance-key.md): Get the unique key used to track this skill instance. - [get_parameter_schema](https://signalwire.com/docs/server-sdks/reference/python/agents/skill-base/get-parameter-schema.md): Return metadata about all parameters the skill accepts. - [get_prompt_sections](https://signalwire.com/docs/server-sdks/reference/python/agents/skill-base/get-prompt-sections.md): Return POM prompt sections for the agent. - [get_skill_data](https://signalwire.com/docs/server-sdks/reference/python/agents/skill-base/get-skill-data.md): Read this skill instance's namespaced state from raw_data. - [register_tools](https://signalwire.com/docs/server-sdks/reference/python/agents/skill-base/register-tools.md): Register SWAIG tools with the parent agent. - [setup](https://signalwire.com/docs/server-sdks/reference/python/agents/skill-base/setup.md): Initialize the skill and validate dependencies. - [update_skill_data](https://signalwire.com/docs/server-sdks/reference/python/agents/skill-base/update-skill-data.md): Write this skill instance's namespaced state into a FunctionResult. - [validate_env_vars](https://signalwire.com/docs/server-sdks/reference/python/agents/skill-base/validate-env-vars.md): Check whether all required environment variables are set. - [validate_packages](https://signalwire.com/docs/server-sdks/reference/python/agents/skill-base/validate-packages.md): Check whether all required packages can be imported. - [Skills](https://signalwire.com/docs/server-sdks/reference/python/agents/skills.md): Built-in skills catalog with configuration parameters and usage patterns. - [api_ninjas_trivia](https://signalwire.com/docs/server-sdks/reference/python/agents/skills/api-ninjas-trivia.md): Get trivia questions from API Ninjas with configurable categories. - [claude_skills](https://signalwire.com/docs/server-sdks/reference/python/agents/skills/claude-skills.md): Load Claude Code-style SKILL.md files as agent tools. - [Custom Skills](https://signalwire.com/docs/server-sdks/reference/python/agents/skills/custom-skills.md): Create custom skills and register them from external directories or via pip packages. - [datasphere](https://signalwire.com/docs/server-sdks/reference/python/agents/skills/datasphere.md): Search documents uploaded to SignalWire DataSphere. - [datasphere_serverless](https://signalwire.com/docs/server-sdks/reference/python/agents/skills/datasphere-serverless.md): Search SignalWire DataSphere documents using a DataMap for serverless execution. - [datetime](https://signalwire.com/docs/server-sdks/reference/python/agents/skills/datetime.md): Get current date and time information with timezone support. - [google_maps](https://signalwire.com/docs/server-sdks/reference/python/agents/skills/google-maps.md): Validate addresses and compute driving routes using Google Maps. - [info_gatherer](https://signalwire.com/docs/server-sdks/reference/python/agents/skills/info-gatherer.md): Collect answers to a configurable list of questions. - [joke](https://signalwire.com/docs/server-sdks/reference/python/agents/skills/joke.md): Tell jokes using the API Ninjas joke API. - [math](https://signalwire.com/docs/server-sdks/reference/python/agents/skills/math.md): Perform mathematical calculations using a secure expression evaluator. - [mcp_gateway](https://signalwire.com/docs/server-sdks/reference/python/agents/skills/mcp-gateway.md): Connect to MCP (Model Context Protocol) servers via the MCP Gateway service. - [native_vector_search](https://signalwire.com/docs/server-sdks/reference/python/agents/skills/native-vector-search.md): Search local .swsearch vector index files. - [play_background_file](https://signalwire.com/docs/server-sdks/reference/python/agents/skills/play-background-file.md): Control background file playback during calls. - [spider](https://signalwire.com/docs/server-sdks/reference/python/agents/skills/spider.md): Fast web scraping and crawling. - [swml_transfer](https://signalwire.com/docs/server-sdks/reference/python/agents/skills/swml-transfer.md): Transfer calls between agents using SWML or direct connect. - [weather_api](https://signalwire.com/docs/server-sdks/reference/python/agents/skills/weather-api.md): Get current weather conditions for locations worldwide using WeatherAPI.com. - [web_search](https://signalwire.com/docs/server-sdks/reference/python/agents/skills/web-search.md): Search the web using the Google Custom Search API. - [wikipedia_search](https://signalwire.com/docs/server-sdks/reference/python/agents/skills/wikipedia-search.md): Search Wikipedia for factual information. - [SWAIGFunction](https://signalwire.com/docs/server-sdks/reference/python/agents/swaig-function.md): Wrapper class for SWAIG function definitions with execution and validation. - [execute](https://signalwire.com/docs/server-sdks/reference/python/agents/swaig-function/execute.md): Execute the function with the given arguments. - [to_swaig](https://signalwire.com/docs/server-sdks/reference/python/agents/swaig-function/to-swaig.md): Convert the function to a SWAIG-compatible dictionary for SWML. - [validate_args](https://signalwire.com/docs/server-sdks/reference/python/agents/swaig-function/validate-args.md): Validate arguments against the parameter JSON Schema. - [SWMLBuilder](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-builder.md): Fluent builder API for constructing SWML documents with method chaining. - [add_section](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-builder/add-section.md): Add a new named section to the SWML document. - [ai](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-builder/ai.md): Add an AI verb to start an AI-powered conversation. - [answer](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-builder/answer.md): Add an answer verb to the SWML document. - [build](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-builder/build.md): Build and return the complete SWML document as a dictionary. - [hangup](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-builder/hangup.md): Add a hangup verb to end the current call. - [play](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-builder/play.md): Add a play verb to play audio or text-to-speech. - [render](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-builder/render.md): Build and render the complete SWML document as a JSON string. - [reset](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-builder/reset.md): Reset the SWML document to an empty state. - [say](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-builder/say.md): Add text-to-speech playback to the SWML document. - [SWMLService](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-service.md): SWML document generation and FastAPI service base class. - [add_section](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-service/add-section.md): Add a new empty section to the SWML document. - [add_verb](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-service/add-verb.md): Add a SWML verb to the main section of the document. - [add_verb_to_section](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-service/add-verb-to-section.md): Add a SWML verb to a specific named section of the document. - [as_router](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-service/as-router.md): Create a FastAPI APIRouter for mounting the service into an existing application. - [get_basic_auth_credentials](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-service/get-basic-auth-credentials.md): Retrieve the HTTP Basic Auth credentials for the service. - [get_document](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-service/get-document.md): Get the current SWML document as a Python dictionary. - [handle_request](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-service/handle-request.md): Dispatch one HTTP request to the service without a web framework. - [manual_set_proxy_url](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-service/manual-set-proxy-url.md): Manually set the proxy URL base for webhook callback generation. - [on_request](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-service/on-request.md): Request handling hook for customizing SWML output per request. - [register_routing_callback](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-service/register-routing-callback.md): Register routing callbacks for dynamic request handling and SIP routing. - [register_verb_handler](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-service/register-verb-handler.md): Register custom verb handlers for specialized SWML verb processing. - [render_document](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-service/render-document.md): Render the current SWML document as a JSON string. - [reset_document](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-service/reset-document.md): Reset the SWML document to an empty state. - [serve](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-service/serve.md): Start the FastAPI/Uvicorn web server for the SWML service. - [stop](https://signalwire.com/docs/server-sdks/reference/python/agents/swml-service/stop.md): Set the internal running flag (does not stop a running Uvicorn server). - [WebService](https://signalwire.com/docs/server-sdks/reference/python/agents/web-service.md): Static file serving service with HTTP API, authentication, and security headers. - [add_directory](https://signalwire.com/docs/server-sdks/reference/python/agents/web-service/add-directory.md): Mount a new directory at a URL route. - [remove_directory](https://signalwire.com/docs/server-sdks/reference/python/agents/web-service/remove-directory.md): Remove a directory from being served. - [start](https://signalwire.com/docs/server-sdks/reference/python/agents/web-service/start.md): Start the HTTP server with optional HTTPS support. - [stop](https://signalwire.com/docs/server-sdks/reference/python/agents/web-service/stop.md): Stop the service and run cleanup tasks. > **Note:** This page contains both a page directory (above) and the landing page content (below). The page directory is generated for agent use and does not appear on the landing page. > Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # Agents > Core framework for building AI-powered voice agents. [swml]: /docs/swml/reference/ai [agent-base]: /docs/server-sdks/reference/python/agents/agent-base [swml-service]: /docs/server-sdks/reference/python/agents/swml-service [swml-builder]: /docs/server-sdks/reference/python/agents/swml-builder [swaig-function]: /docs/server-sdks/reference/python/agents/swaig-function [function-result]: /docs/server-sdks/reference/python/agents/function-result [context-builder]: /docs/server-sdks/reference/python/agents/context-builder [data-map]: /docs/server-sdks/reference/python/agents/data-map [skill-base]: /docs/server-sdks/reference/python/agents/skill-base [pom-builder]: /docs/server-sdks/reference/python/agents/pom-builder [agent-server]: /docs/server-sdks/reference/python/agents/agent-server [bedrock-agent]: /docs/server-sdks/reference/python/agents/bedrock-agent [prefabs]: /docs/server-sdks/reference/python/agents/prefabs [skills]: /docs/server-sdks/reference/python/agents/skills [cli]: /docs/server-sdks/reference/python/agents/cli [configuration]: /docs/server-sdks/reference/python/agents/configuration [livewire]: /docs/server-sdks/reference/python/agents/livewire [search]: /docs/server-sdks/reference/python/agents/search [mcp-gateway]: /docs/server-sdks/reference/python/agents/mcp-gateway [web-service]: /docs/server-sdks/reference/python/agents/web-service [helpers]: /docs/server-sdks/reference/python/agents/helpers [ref-agentbase]: /docs/server-sdks/reference/python/agents/agent-base The Agents namespace provides the core framework for building AI-powered voice agents with SignalWire. It includes the central [`AgentBase`][ref-agentbase] class, SWML document generation, tool/function definitions, skills, multi-agent hosting, CLI tools for local testing and deployment, and configuration management for security and environment settings. > **Info** > > The Server SDK generates [SWML][swml] documents under the hood. > Each agent produces a SWML document with the `ai` verb that the SignalWire platform executes. ## Example A complete agent that answers calls, uses an AI prompt, and exposes a custom tool: ```python from signalwire import AgentBase from signalwire.core.function_result import FunctionResult agent = AgentBase(name="support-agent", route="/support") agent.set_prompt_text( "You are a friendly support agent for Acme Corp. " "Help customers check their order status. " "Be concise and professional." ) agent.set_params({"temperature": 0.5, "end_of_speech_timeout": 800}) @agent.tool(description="Look up an order by ID") def check_order(args, raw_data): order_id = args.get("order_id", "unknown") return FunctionResult(f"Order {order_id} shipped on March 28 and arrives tomorrow.") agent.add_skill("datetime") if __name__ == "__main__": agent.serve() ``` ## Classes #### [AIChatClient](/docs/server-sdks/reference/python/agents/ai-chat-client) Async client for creating, messaging, inspecting, and ending AI chat conversations. #### [ChatGateway](/docs/server-sdks/reference/python/agents/chat-gateway) Browser-facing gateway that keeps AI chat credentials and agent configuration on your server. #### [HandoffRouter](/docs/server-sdks/reference/python/agents/handoff-router) Routes that move a chat conversation to a phone call and back, beside a ChatGateway. #### [AgentBase](/docs/server-sdks/reference/python/agents/agent-base) The central class for building AI agents. Manages prompts, tools, skills, and serving. #### [SWMLService](/docs/server-sdks/reference/python/agents/swml-service) SWML document generation and FastAPI service base class. #### [SWMLBuilder](/docs/server-sdks/reference/python/agents/swml-builder) Fluent builder for constructing SWML documents programmatically. #### [SWAIGFunction](/docs/server-sdks/reference/python/agents/swaig-function) Wraps Python functions as callable SWAIG tools with validation and metadata. #### [FunctionResult](/docs/server-sdks/reference/python/agents/function-result) Fluent interface for returning actions and responses from tool functions. #### [ContextBuilder](/docs/server-sdks/reference/python/agents/context-builder) Multi-step agent workflows with context and step navigation. #### [DataMap](/docs/server-sdks/reference/python/agents/data-map) Server-side API tools that execute REST calls without agent webhooks. #### [SkillBase](/docs/server-sdks/reference/python/agents/skill-base) Base class for building reusable skill plugins. #### [PomBuilder](/docs/server-sdks/reference/python/agents/pom-builder) Prompt Object Model builder for structured prompt composition. #### [AgentServer](/docs/server-sdks/reference/python/agents/agent-server) Host multiple agents on a single FastAPI process with route-based dispatch. #### [BedrockAgent](/docs/server-sdks/reference/python/agents/bedrock-agent) Amazon Bedrock voice-to-voice agent extending AgentBase. #### [Prefabs](/docs/server-sdks/reference/python/agents/prefabs) Pre-built agent templates for common conversational patterns. #### [Skills](/docs/server-sdks/reference/python/agents/skills) Built-in skills catalog with 17 pluggable capabilities. #### [CLI Tools](/docs/server-sdks/reference/python/agents/cli) Command-line tools for testing, searching, scaffolding, and deployment. #### [Configuration](/docs/server-sdks/reference/python/agents/configuration) Environment variables, config files, security settings, and authentication. #### [LiveWire](/docs/server-sdks/reference/python/agents/livewire) LiveKit-compatible API layer — use familiar livekit-agents classes on SignalWire infrastructure. #### [Search](/docs/server-sdks/reference/python/agents/search) Vector search engine for building knowledge bases with document processing and indexing. #### [MCP Gateway](/docs/server-sdks/reference/python/agents/mcp-gateway) Model Context Protocol bridge connecting MCP servers to SWAIG functions. #### [WebService](/docs/server-sdks/reference/python/agents/web-service) Static file serving with security, CORS, and SSL support. #### [Helper Functions](/docs/server-sdks/reference/python/agents/helpers) Convenience functions for creating contexts, API tools, and managing skills.