# Twilio Agent Connect (TAC)

## Twilio Agent Connect (TAC)

> \[!NOTE]
>
> Twilio Agent Connect is not PCI compliant or a HIPAA Eligible Service and should not be used in workflows that are subject to HIPAA or PCI.

Connect AI agents to Twilio's platform. TAC is an SDK that acts as middleware between your LLM applications and Twilio services — Voice, messaging channels, Conversation Memory, and Conversation Orchestrator — so you can focus on your agent's intelligence.

## Tutorial

```python !sample
from tac import TAC, TACConfig
from tac.channels.sms import SMSChannel
from tac.channels.voice import VoiceChannel
from tac.server import TACFastAPIServer

tac = TAC(config=TACConfig.from_env())
sms_channel = SMSChannel(tac)
voice_channel = VoiceChannel(tac)

async def handle_message_ready(message, context, memory):
    # Process with your LLM and return the response — TAC routes it to the correct channel
    llm_response = await your_llm.generate(message)
    return llm_response

tac.on_message_ready(handle_message_ready)

# Start the TACFastAPIServer to handle webhooks and WebSocket connections
server = TACFastAPIServer(tac=tac, voice_channel=voice_channel, messaging_channels=[sms_channel])
server.start()
```

1. Connect your AI agent to Voice and messaging channels
2. Retrieve customer context and conversation history from Conversation Memory
3. Add custom tools, knowledge search, and escalation to human agents

Tutorial code output: "Personalized, context-aware conversations across channels"

## Get started

TAC supports multiple starting points. Build from scratch with the quickstart, add TAC to an existing agent, or follow an integration guide for AWS Bedrock or Microsoft Foundry.

* [Quickstart](/docs/conversations/agent-connect/quickstart)
* [Add TAC to your agent](/docs/conversations/agent-connect/build-with-tac)
* [AWS integration](/docs/conversations/agent-connect/integrations/aws)
* [Microsoft Foundry integration](/docs/conversations/agent-connect/integrations/microsoft-foundry)

## What you can build with TAC

* Connect LLM-powered agents to Twilio's communication channels with a unified interface.
* Retrieve customer context from Conversation Memory to personalize every interaction.
* Define custom tools, search knowledge bases, and configure escalation to human agents.
* Integrate with AWS Bedrock, Microsoft Foundry, OpenAI, or any LLM provider.

### Learn more

* [TAC overview](/docs/conversations/agent-connect/overview)
* [Core concepts](/docs/conversations/agent-connect/core-concepts)
* [Channels](/docs/conversations/agent-connect/channels)
* [Troubleshooting](/docs/conversations/agent-connect/troubleshooting)

## Related Products

Conversation Orchestrator, Conversation Memory

### Conversation Orchestrator

Organize voice calls, SMS, and WhatsApp messages into conversations that link to customer profiles and are accessible for AI agents and analytics.

[Product Docs](/docs/conversations/orchestrator)

### Conversation Memory

Store and retrieve customer profiles, traits, and conversation context for personalized AI experiences.

[Product Docs](/docs/conversations/memory)
