By Sagar Shankaran, Founder of CallSphere
Stand up a production AI contact center: Amazon Connect contact flow, a Bedrock Agent with Knowledge Bases, Lex V2 fallback, and a Lambda for tool execution. Real CDK + JSON.
Key takeaways
TL;DR — Amazon Connect now ships with a first-class Bedrock Agents block in contact flows. Drop a Bedrock Agent into a Connect flow, point it at a Knowledge Base on S3, and add a Lambda action group for tool calls. No Lex required for the happy path; keep Lex V2 as a typed-slot fallback.
A working Amazon Connect inbound number that routes callers into a Bedrock Agent named support-agent with a Knowledge Base over your help-center S3 bucket. The agent can answer FAQs from the KB, transfer to a queue when the caller asks for a human, and call a Lambda function to look up order status. Real audio handled by Connect + Polly generative; reasoning by Claude 4.7 Sonnet.
anthropic.claude-sonnet-4-7-20250620-v1:0 in the same region as Connect.flowchart TD
PSTN[Caller PSTN] --> CONNECT[Amazon Connect]
CONNECT -->|contact flow block| BA[Bedrock Agent]
BA -->|retrieve| KB[Bedrock Knowledge Base]
KB --> S3[(S3 docs)]
KB --> OS[(OpenSearch Serverless)]
BA -->|action group| LAM[Lambda lookup_order]
LAM --> DDB[(DynamoDB)]
BA -->|response| CONNECT
CONNECT -->|Polly TTS| PSTN
In the Bedrock console, create a Knowledge Base support-kb backed by S3 (sync your help-center docs there) and OpenSearch Serverless as the vector store. Use amazon.titan-embed-text-v2:0 for embeddings — fast and cheap.
```bash aws bedrock-agent create-knowledge-base \ --name support-kb \ --role-arn arn:aws:iam::123:role/AmazonBedrockExecutionRoleForKnowledgeBase \ --knowledge-base-configuration '{"type":"VECTOR","vectorKnowledgeBaseConfiguration":{"embeddingModelArn":"arn:aws:bedrock:us-east-1::foundation-model/amazon.titan-embed-text-v2:0"}}' \ --storage-configuration file://oss-config.json ```
```python
import boto3, json ddb = boto3.client("dynamodb") def handler(event, _): order_id = event["parameters"][0]["value"] item = ddb.get_item(TableName="orders", Key={"id": {"S": order_id}}).get("Item", {}) body = {"status": item.get("status", {}).get("S", "unknown"), "eta": item.get("eta", {}).get("S")} return { "messageVersion": "1.0", "response": { "actionGroup": event["actionGroup"], "function": event["function"], "functionResponse": {"responseBody": {"TEXT": {"body": json.dumps(body)}}} } } ```
Hear it before you finish reading
Talk to a live CallSphere AI voice agent in your browser — 60 seconds, no signup.
```bash aws bedrock-agent create-agent \ --agent-name support-agent \ --foundation-model anthropic.claude-sonnet-4-7-20250620-v1:0 \ --instruction "You are a friendly support voice agent. Always check the knowledge base first. If the user asks about an order, use the lookup_order tool. Keep replies under 2 sentences." \ --agent-resource-role-arn arn:aws:iam::123:role/AmazonBedrockAgentRole ```
Then attach the KB and the Lambda action group:
```bash aws bedrock-agent associate-agent-knowledge-base --agent-id $AID --agent-version DRAFT --knowledge-base-id $KBID --description "Help center" aws bedrock-agent create-agent-action-group --agent-id $AID --agent-version DRAFT \ --action-group-name orders \ --action-group-executor lambda=arn:aws:lambda:us-east-1:123:function:lookup_order \ --function-schema file://schema.json ```
schema.json lists the lookup_order function with its parameter order_id.
In the Connect contact-flow editor (Amazon Connect → Routing → Flows), drop the Amazon Q in Connect or Bedrock Agent block (the latter is GA as of Q1 2026). Set:
support-agent alias PRODtier-1-humansThe block handles bidirectional streaming, partial transcription, barge-in, and turn-taking automatically.
Claim a number, attach the contact flow, dial in. Connect's CloudWatch logs show every turn with token counts and KB citations — verify the agent is answering from the KB and not hallucinating.
Still reading? Stop comparing — try CallSphere live.
CallSphere ships complete AI voice agents per industry — 14 tools for healthcare, 10 agents for real estate, 4 specialists for salons. See how it actually handles a call before you book a demo.
Enable Contact Lens for post-call sentiment + categorization. Add a "transfer to human" intent in the agent instruction; on transfer, Connect attaches the agent's transcript as a contact attribute so the human picks up with full context.
StartIngestionJob is async — re-vectorizing 10k docs takes ~15 min. Don't ship without polling.CallSphere ships its own contact-center surface that competes with Amazon Connect at $149/$499/$1499 (vs ~$0.018/min + add-ons on Connect). We run 37 voice agents and 90+ tools across 6 verticals on FastAPI :8084 with OpenAI Realtime, falling back to Bedrock Claude for HIPAA-locked tenants. The OneRoof multi-family vertical uses Pion Go + NATS for SIP fan-out at scale. 115+ Postgres tables back the entire orchestration; 14-day trial, 22% affiliate.
Q: Connect vs CallSphere — when does Connect make sense? If you already run thousands of agents on Connect and just want AI overlays, stay there. If you're starting from zero, a managed product like CallSphere with prebuilt verticals beats six weeks of Connect contact-flow engineering.
Q: Do I need Lex V2? No — Bedrock Agents handle NLU. Keep Lex only for slot-filling tasks where you need deterministic regex extraction.
Q: How do I handle warm transfers?
Use the Transfer to flow block downstream of the Bedrock block; pass agent transcript via contact attributes.
Q: Can the agent use a CRM tool? Yes — point a Lambda action group at your CRM SDK. Salesforce, HubSpot, Zendesk all have Python SDKs that fit in a Lambda layer.
Q: What's the all-in cost per minute? Connect telephony $0.018 + Bedrock Claude ~$0.05 + Polly generative ~$0.02 = ~$0.10/min, plus KB OSS at-rest costs.
Written by
Sagar Shankaran· Founder, CallSphere
Sagar Shankaran is the founder of CallSphere, where he builds production AI voice and chat agents deployed across healthcare, hospitality, real estate, and home services. He writes about agentic AI, LLM engineering, and shipping voice agents that handle real calls in production.
See how AI voice agents work for your industry. Live demo available -- no signup required.
Haystack 2.7's Agent component plus an Ollama-served Llama 3.2 gives you tool-calling RAG with citations. Here's a complete pipeline against your own document store.
Run STT, LLM, and TTS entirely on Cloudflare's edge — no OpenAI, no ElevenLabs. Real working code with Whisper, Llama 3.3 70B, and Deepgram Aura.
AWS HealthScribe became the open scribe layer EHR vendors built on top of in 2026. Here's the API surface, the per-encounter pricing, the BAA terms.
AWS Multi-Agent Orchestrator ships supervisor routing, classifier, and shared memory. How to compose a customer-support agent team on Bedrock that scales cleanly.
Version your prompts in git, run a 50-case eval suite on every PR, block merges below threshold, and ship a new agent prompt with confidence — full GitHub Actions tutorial.
Replace expensive outbound SDR tooling with a self-hosted dialer that runs OpenAI Realtime agents at 100 concurrent calls. Full architecture and code.
© 2026 CallSphere LLC. All rights reserved.
Watch how CallSphere handles real customer calls, schedules appointments, and processes payments — live.
Try Live DemoBook a DemoCalculate Your ROI