Skip to main content

AWS integrations for Twilio Agent Connect (TAC) - adapters and servers for AWS agent runtimes

Project description

Twilio Agent Connect AWS Logo

Twilio Agent Connect AWS

AWS integrations for Twilio Agent Connect — connect AWS agent services to Twilio's communication channels.

PyPI Python SDK License Getting Started

DocumentationPython SDKExamplesDeployment

AWS-specific connectors for Twilio Agent Connect (TAC), enabling seamless integration with AWS agent services like Strands, Bedrock Agents, and Bedrock AgentCore.


Features

  • StrandsConnector - AWS Strands SDK integration
    • Per-conversation agent isolation with SessionManager support
    • Context-aware agent factories
  • BedrockConnector - AWS Bedrock Agents integration
    • Connect console-created agents to Twilio
    • Managed agent service with action groups and knowledge bases
  • BedrockAgentCoreConnector - AWS Bedrock AgentCore integration
    • Deploy custom agent code (Strands, LangGraph, OpenAI SDK)
    • Managed runtime with built-in memory
  • TACAWSFastAPIServer - AWS-optimized server for ALB deployments
    • Automatic header fixing for Twilio signature validation
    • Works with AWS ALB + ngrok for testing
    • Handles both HTTP (SMS) and WebSocket (Voice)
  • Multi-channel support (SMS + Voice)
  • Automatic TAC memory injection

Installation

With Strands SDK

pip install twilio-agent-connect-aws[strands,server]

With Bedrock Agents

pip install twilio-agent-connect-aws[bedrock,server]

With Bedrock AgentCore

pip install twilio-agent-connect-aws[agentcore,server]

Development

# Install with development tools (includes all connectors)
pip install twilio-agent-connect-aws[dev]

Configuration

twilio-agent-connect-aws requires TAC environment variables. See TAC Configuration for details.

Required Environment Variables

# Twilio Configuration
TWILIO_ACCOUNT_SID=your_account_sid
TWILIO_AUTH_TOKEN=your_auth_token
TWILIO_API_KEY=your_api_key          # Starts with SK
TWILIO_API_SECRET=your_api_secret    # Secret for API key
TWILIO_PHONE_NUMBER=+1234567890
TWILIO_CONVERSATION_CONFIGURATION_ID=conv_configuration_xxx

# Server Configuration (for Voice)
TWILIO_VOICE_PUBLIC_DOMAIN=your-domain.ngrok.io

Examples

Full examples available in getting_started/examples/:

  • strands_agents.py - Strands SDK with per-conversation agent management
  • bedrock_agents.py - AWS Bedrock Agents (console-created agents)
  • bedrock_agentcore_agents.py - AWS Bedrock AgentCore (custom agent code deployment)

Deployment

See deploy/README.md for production deployment guides:

  • Strands AWS Fargate - Deploy Strands SDK agents
  • Bedrock Agents AWS Fargate - Deploy console-created Bedrock agents
  • Bedrock AgentCore AWS Fargate - Deploy custom agent code to AgentCore runtime

Development

Setup

# Clone repository
git clone https://github.com/twilio/twilio-agent-connect-aws.git
cd twilio-agent-connect-aws

# Install dependencies
make sync

# Setup dev environment
make dev-setup

Code Quality

# Format code
make format

# Type check
make type-check

# Lint
make lint

# Run tests
make test

# Run all checks
make check

Dependencies

twilio-agent-connect-aws depends on:

  • tac - Core Twilio Agent Connect framework (installed from GitHub)
    • Requires tac[server] extra for TAC Server support
  • strands-agents (optional) - AWS Strands SDK

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

twilio_agent_connect_aws-1.0.2.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

twilio_agent_connect_aws-1.0.2-py3-none-any.whl (24.5 kB view details)

Uploaded Python 3

File details

Details for the file twilio_agent_connect_aws-1.0.2.tar.gz.

File metadata

  • Download URL: twilio_agent_connect_aws-1.0.2.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for twilio_agent_connect_aws-1.0.2.tar.gz
Algorithm Hash digest
SHA256 7f370fc7d0057167b9bc0cc55d2a79c70711d846a9d96f631f2cfbf11f57f9d0
MD5 f0de6dad785c78140414d9268afbeefd
BLAKE2b-256 3702ecfb2aa665ddd07627b0b5bfba725435c95076c8f287f988472176130efe

See more details on using hashes here.

File details

Details for the file twilio_agent_connect_aws-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: twilio_agent_connect_aws-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 24.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for twilio_agent_connect_aws-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f1594a4daec2269d98a6b0e5347062257ee337b405f0986b8f75b7b13f9c7d85
MD5 f38225577b1f557aa4370e8e76d5b6c1
BLAKE2b-256 d51f21df75f21d8f96a1a0f36d1c33124f5a5210e3e51b9b9be316fa5b65f08b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page