# Text agent to strands voice agent

> Text agent to strands voice agent is an open-source agent skill for design and media. Converts a text-based agent into a live Nova Sonic speech-to-speech voice agent. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/aws-samples/amazon-ai-samples/tree/main/skills/text-agent-to-strands-voice-agent
- **Repository:** https://github.com/aws-samples/amazon-ai-samples
- **GitHub stars:** 469
- **License:** MIT-0
- **Skill name:** text-agent-to-strands-voice-agent
- **Collection:** https://github.com/aws-samples/amazon-ai-samples
- **Categories:** [design and media](https://ai-powered.com/categories/design-and-media), [AI models and LLM tooling](https://ai-powered.com/categories/ai-and-llm)
- **Listing updated:** 2026-12-03

## About

This skill walks an agent through turning an existing text agent into a real-time voice agent built on Strands BidiAgent and Amazon Nova Sonic. The work is split into a browser frontend that captures microphone audio as 16kHz PCM over WebSocket and plays back spoken replies, and a FastAPI orchestrator that loads the migrated system prompt and tools into a bidirectional streaming agent.

The skill covers rewriting the text prompt for speech, for example keeping answers short, spelling out numbers and avoiding formatting, and moving existing tool functions onto Strands tool decorators or an MCP gateway. It also includes a generated Python client that serves the HTML page, a project layout, a README template and setup notes for PortAudio and the Bedrock runtime SDK.

The user supplies the source text agent, including its system prompt, tool definitions and model settings. Running the result needs Python, PortAudio for audio input and output, and AWS access to Nova Sonic. Three before-and-after examples cover LangChain, OpenAI function calling and Bedrock Converse agents.

## When your agent uses it

> Migrate any text-based agent to a Nova Sonic voice agent using Strands BidiAgent. Covers two layers: (1) Frontend — browser WebSocket client with Web Audio API for mic capture and audio playback, (2) Orchestrator — FastAPI + Strands BidiAgent server that takes the text agent's system prompt and tools and runs them as a real-time speech-to-speech agent. TRIGGER when: user wants to add voice to an existing text agent; user asks about converting a chatbot to a Nova Sonic voice agent; user mentions text-to-voice migration, Strands BidiAgent, or Nova Sonic voice agent. SKIP when: user is building a text-only agent; user wants TTS/STT without a live agent loop; user is asking about deployment or infrastructure.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs Python scripts](https://github.com/aws-samples/amazon-ai-samples/tree/HEAD/skills/text-agent-to-strands-voice-agent)
- [No network calls found in its scripts](https://github.com/aws-samples/amazon-ai-samples/tree/HEAD/skills/text-agent-to-strands-voice-agent)
- [License: MIT-0](https://github.com/aws-samples/amazon-ai-samples/tree/HEAD/skills/text-agent-to-strands-voice-agent)

## Features

- **Browser voice client:** Captures microphone audio, streams it over WebSocket and plays back the agent's spoken responses.
- **Voice prompt rewriting:** Guides converting a text system prompt into brief, speech-friendly instructions with confirmations and greetings.
- **BidiAgent server:** Provides a FastAPI WebSocket server that runs a Strands BidiAgent with the Nova Sonic model.
- **Tool migration:** Shows how to move existing agent functions onto Strands tool decorators or an MCP gateway.
- **Framework migration examples:** Includes before-and-after examples for LangChain, OpenAI function calling and Bedrock Converse agents.
- **Generated client and README:** Produces a Python HTTP server, HTML client and setup README alongside the voice agent code.

## Good for

- Add a voice interface to an existing customer support chatbot
- Convert a LangChain agent into a speech-to-speech assistant
- Port OpenAI function-calling tools into a Nova Sonic voice agent
- Rewrite a chatbot system prompt so answers sound natural when spoken

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/text-agent-to-strands-voice-agent` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/aws-samples/amazon-ai-samples.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/text-agent-to-strands-voice-agent &&
cp -R "$tmp/skills/text-agent-to-strands-voice-agent" ~/.claude/skills/text-agent-to-strands-voice-agent &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/text-agent-to-strands-voice-agent` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/text-agent-to-strands-voice-agent` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/aws-samples/amazon-ai-samples.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/text-agent-to-strands-voice-agent &&
cp -R "$tmp/skills/text-agent-to-strands-voice-agent" ~/.agents/skills/text-agent-to-strands-voice-agent &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/text-agent-to-strands-voice-agent` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/text-agent-to-strands-voice-agent` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/aws-samples/amazon-ai-samples.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/text-agent-to-strands-voice-agent &&
cp -R "$tmp/skills/text-agent-to-strands-voice-agent" ~/.cursor/skills/text-agent-to-strands-voice-agent &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/text-agent-to-strands-voice-agent` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/aws-samples/amazon-ai-samples.git --path skills/text-agent-to-strands-voice-agent
```

Or copy the folder to `~/.gemini/skills/text-agent-to-strands-voice-agent` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/text-agent-to-strands-voice-agent`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/aws-samples/amazon-ai-samples.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/text-agent-to-strands-voice-agent &&
cp -R "$tmp/skills/text-agent-to-strands-voice-agent" ~/.copilot/skills/text-agent-to-strands-voice-agent &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/text-agent-to-strands-voice-agent` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/aws-samples/amazon-ai-samples.git
```

Then copy `amazon-ai-samples/skills/text-agent-to-strands-voice-agent` into your agent's skills folder as `text-agent-to-strands-voice-agent`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need to run?

It needs Python with the strands-agents, FastAPI, uvicorn, aws_sdk_bedrock_runtime and pyaudio packages, the PortAudio system library, and access to Amazon Nova Sonic through AWS.

### Does Text agent to strands voice agent change my existing text agent?

No. It guides creating a new voice agent project that reuses the text agent's system prompt and tool logic.

### Which audio format does Text agent to strands voice agent use?

The skill configures 16kHz PCM audio in both directions, which Nova Sonic requires.

### How do I install Text agent to strands voice agent in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/text-agent-to-strands-voice-agent to use it in all your projects, or to .claude/skills/text-agent-to-strands-voice-agent in one project.

### Does Text agent to strands voice agent run scripts?

Yes. It runs Python scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Text agent to strands voice agent?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Text agent to strands voice agent?

The closest alternatives to Text agent to strands voice agent are Cascading voice agent, Openai to nova, Nemotron voice agent builder, Nova sonic25 prompt and Nova2 prompt.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Cascading voice agent](https://ai-powered.com/skills/cascading-voice-agent): Cascading voice agent is an open-source agent skill for design and media.
- [Openai to nova](https://ai-powered.com/skills/openai-to-nova): Openai to nova is an open-source agent skill for ai models and llm tooling.
- [Nemotron voice agent builder](https://ai-powered.com/skills/nemotron-voice-agent-builder): Nemotron voice agent builder is an open-source agent skill for design and media.
- [Nova sonic25 prompt](https://ai-powered.com/skills/nova-sonic25-prompt): Nova sonic25 prompt is an open-source agent skill for ai models and llm tooling.
- [Nova2 prompt](https://ai-powered.com/skills/nova2-prompt): Nova2 prompt is an open-source agent skill for design and media.
- [Podcast generation](https://ai-powered.com/skills/podcast-generation): Podcast generation is an open-source agent skill for design and media.
- [Speech](https://ai-powered.com/skills/speech): Speech is a free agent skill for design and media.
- [Azure AI voicelive ts](https://ai-powered.com/skills/azure-ai-voicelive-ts): Azure AI voicelive ts is an open-source agent skill for cloud and infrastructure.

---
Source: https://ai-powered.com/skills/text-agent-to-strands-voice-agent
