# Introducing Strands Agents, an Open Source AI Agents SDK

Suman Debnath

AI Engineer World's Fair 2025

[Talk page](https://ai.engineer/talks/Q3NreEAdKMc-introducing-strands-agents-open-source-ai-agents) · [Video](https://www.youtube.com/watch?v=Q3NreEAdKMc)

## Introducing Strands Agents, an Open Source AI Agents SDK

A file summary that speaks and a Manim animation generator show how Strands delegates tool selection to a model—and what remains in the surrounding application.

Basic Python knowledge, including imports, functions, and decorators, will help you follow the examples.

### How much workflow does an agent need?

[0:19](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=19s)

How much of an agent’s workflow must you prescribe before the model can do useful work? [Strands Agents](https://strandsagents.com/) starts with two ingredients: **a model and tools**. Its design motivation is to let increasingly capable models reason about the task and choose tools, reducing the need to encode each step in application scaffolding. The developer supplies capabilities; the model decides how to use them in response to a request.

That approach does not require a Bedrock-hosted model. The named [integrations](https://strandsagents.com/integrations/) serve different purposes: LiteLLM provides access to alternative model providers, Langfuse supports observability, and Ollama allows local experimentation. The agentic-loop diagram puts the agent between the incoming prompt, the model, and the tools, with a result returned to the user. Even the two strands in the logo represent the model and tools.

![Diagram with prompt and result boxes beside an agent, with arrows connecting the agent to model and tools boxes inside an agentic loop.](https://ai.engineer/api/talk-essay-media/01eac275e67f6f5f9c24120d4bb0204acab3171f83db1de8bf552d3b6260880e)

The Strands agentic loop connects an agent to a model and tools.

### Read a chapter, save a summary, and speak it

[1:49](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=109s)

The first task makes that division of responsibility concrete: read a file from disk, summarize it, save the summary locally, and speak the result. Reading, writing, and speech use [supplied Strands tools](https://github.com/strands-agents/tools); summarization is the model’s contribution. No custom tool is needed for this workflow.

Install the SDK and its tools package:

```bash
pip install strands-agents strands-agents-tools
```

The packages separate the agent runtime from the ready-made capabilities you register with it. You can use those supplied tools first and introduce custom functions when the task needs them.

The recording then configures the model. Debnath identifies **Claude 3.7 Sonnet** through Amazon Bedrock as the demo-era default; this is historical behavior, not a guarantee about today’s SDK. An explicit model configuration can replace the default, including a different provider such as Ollama. The example also supplies a system prompt. Debnath suggests trying the application without it, but that variation is not demonstrated.

The essential Python construction is an `Agent` with a tool list and a task request. Using the documented tool identifiers `file_read` and `file_write`, the chapter-ten workflow can be expressed as:

```python
from strands import Agent
from strands_tools import file_read, file_write, speak

agent = Agent(tools=[file_read, file_write, speak])

agent(
    "Read chapter10.txt, summarize it, write the summary to "
    "chapter10-summary.md, and speak the summary aloud."
)
```

The recording’s configuration additionally passes the model and system prompt. The important boundary is the same: the application registers tools and requests an outcome instead of directly calling each tool in a fixed sequence.

During playback, the agent reads the file, produces a summary, writes it, and calls the speech tool. The terminal shows the three tool calls beside the agent code. Audible output then begins by explaining that the human eye functions like a camera, with light entering through the cornea: the result has reached the speech stage, not merely a text response describing what the agent intends to do.

![Code editor beside terminal output showing a file-reading step, a summary-writing step, and a speak tool call, highlighted by colored arrows.](https://ai.engineer/api/talk-essay-media/bfb5eb8e1e8448fb5415abe4dd07f46224eb5a2089109149ad2eb11366afacb7)

The file demo shows read, write, and speak tool calls beside the agent code.

### Give the agent a mathematical animation tool

[5:03](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=303s)

The second demonstration moves from local file operations to mathematical animation. Its inspiration is 3Blue1Brown and [Manim](https://docs.manim.community/en/stable/faq/installation.html), the programmatic animation family associated with that channel. Eigenvalues, eigenvectors, and singular value decomposition are natural candidates: a visual transformation can make their meaning easier to follow.

The setup assumes an existing **MCP server** that can execute Manim code and generate videos. Strands does not replace that implementation. The application imports `Agent` and `MCPClient`, then configures the client to connect to the server. The server is the capability provider; the client makes those capabilities available to the agent.

In the file example, the application explicitly supplied file and speech functions. Here it supplies the tools discovered through `manim_mcp_client.list_tools_sync()`. That call obtains the server’s tool definitions for the agent; it is not a broadcast of the agent to the server.

The core wiring, given a configured client, is:

```python
from strands import Agent
from strands.tools.mcp import MCPClient


def visualize(manim_mcp_client: MCPClient, prompt: str):
    with manim_mcp_client:
        agent = Agent(
            tools=manim_mcp_client.list_tools_sync()
        )
        return agent(prompt)
```

Discovery and invocation stay inside the client context so that the MCP connection remains available while the agent uses its tools.

The demonstrated prompt requests a visualization of a cubic equation over x from −3 to 3. The same interface could accept other educational requests: visualize byte-pair encoding, explain SVD, or show multiplication of two 2×2 matrices. These are suggested prompts, rather than additional outputs shown in the demonstration.

### Run the server, then request the video

[8:24](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=504s)

The demonstrated local setup runs in this order:

1. Start the MCP server and make it available on localhost.
2. Run `app.py`, which contains the Strands client application.
3. Submit the cubic-visualization prompt.

Starting the server first gives the application a live endpoint from which to discover and call tools.

The resulting animation is presented as generated without manual intervention. Debnath emphasizes that the abbreviated agent code does not prescribe the reasoning through a detailed system prompt: the model is expected to work out how to satisfy the request. He also notes that a prompt can specify a video duration, such as ten or thirty seconds. Those are requested output lengths, not measurements of generation latency. Compared with writing a Manim scene manually, the attraction is being able to describe the desired visualization and let the model produce the code through the tool workflow.

### What the short agent example leaves out

[9:59](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=599s)

The code walkthrough first opens the server. It uses **FastMCP** and exposes two functions as tools through the `mcp.tool` decorator. This is where the executable capabilities live; the compact Strands client relies on that server-side implementation.

The fuller client then qualifies the earlier minimal-scaffolding description. The presentation showed only a few lines from `main`; before the agent call, the application also supplies a Manim construction example. Debnath describes this as **one-shot prompting**. The visible example defines a scene that creates a circle, sets its blue fill and stroke, and uses animation and wait calls. The model therefore receives a concrete pattern to follow, even though the agent construction itself is short.

![Python editor showing an example-animation function with a scene class, circle creation, blue fill and stroke settings, and animation and wait calls.](https://ai.engineer/api/talk-essay-media/d8fb8c356fb18d825fa19fe5fb51e069eedf32ada02e5b9d466438c7446bd2e5)

A Manim example defines a scene that creates a blue circle.

Tool discovery and agent invocation remain compact, but they are not the whole application. A `while True` loop around the interaction supplies repeated requests and gives the program a chat-like experience. The distinction is useful: Strands handles the model-and-tool interaction, while the application still owns connection setup, example context, and its user-facing interaction loop.

### Mix custom functions with supplied tools

[12:00](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=720s)

A custom capability need not live behind MCP. To turn a Python function into a Strands tool, import the singular `tool` decorator from `strands` and apply `@tool` to the function. Debnath briefly shows a retrieval function as an example without walking through its retrieval implementation.

The decorated function goes into the same `tools` list as supplied functions. For example, a small text-counting capability can sit beside the file and speech tools:

```python
from strands import Agent, tool
from strands_tools import file_read, file_write, speak


@tool
def count_words(text: str) -> int:
    """Count whitespace-separated words in text."""
    return len(text.split())


agent = Agent(
    tools=[count_words, file_read, file_write, speak]
)
```

The agent now has both application-specific behavior and ready-made I/O capabilities available for selection. Adding the custom function does not require replacing the supplied tools or creating a separate agent.

### Build and contribute an example

[13:33](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=813s)

The closing points readers toward the [launch announcement](https://aws.amazon.com/blogs/opensource/introducing-strands-agents-an-open-source-ai-agents-sdk/), project documentation, and GitHub. Debnath also directs attendees to booth demonstrations involving Strands, Lambda, and MCP. Lambda appears here as a pointer to further examples; the recording does not walk through a deployment.

![How to get started slide with three QR codes labeled Blog, Docs, and GitHub, and a presenter inset at lower left.](https://ai.engineer/api/talk-essay-media/d46463bfd47ee5a36dfb84c2650b632d740a60d152c398748eba99f74660c0da)

Getting-started resources: Blog, Docs, and GitHub.

The invitation is to extend the open source project through working examples: share what you build, contribute a pull request to the [Strands samples repository](https://github.com/strands-agents/samples), and send feedback. The demonstrated progression supplies a practical starting point—use existing tools, connect a specialized server when needed, and expose your own functions as the application’s capabilities grow.

## Resources

- [Introducing Strands Agents](https://aws.amazon.com/blogs/opensource/introducing-strands-agents-an-open-source-ai-agents-sdk/) — The launch announcement explains the model-driven agent loop and includes a Python example combining MCP and supplied tools.
- [Strands Agents](https://strandsagents.com/) — Project documentation and getting-started examples for building agents with models and tools.
- [Strands supplied tools](https://github.com/strands-agents/tools) — Tool implementations and usage examples, including file reading, file writing, and speech output.
- [Strands agent samples](https://github.com/strands-agents/samples) — Official agent examples and a place to contribute additional samples.
- [Math animations with MCP and Strands](https://www.linkedin.com/posts/suman-d_how-about-building-animation-and-video-activity-7332471088448225280-x0Ts) — Suman Debnath describes his experiment generating mathematical animations from prompts with Strands and Manim.
- [Understanding Manim versions](https://docs.manim.community/en/stable/faq/installation.html) — Explains ManimCE, ManimGL, their shared origins, and how to identify which version a scene requires.

## Slides

### Innovation partner and platinum sponsors

[0:10](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=10s) [AWS is shown as innovation partner above six platinum sponsor logos.](https://assets.ai.engineer/sites/aiecode2025/sha256/9fb4b9bc2e5152b6c0093caa7ea733ca5c0b3517ccb21715e4b5f2e6a19ebebe.webp)

INNOVATION PARTNER
aws

PLATINUM SPONSORS
Graphite
Windsurf
MongoDB®
daily™
augment code
WorkOS

### Strands Agents overview

Strands Agents pairs models and tools to build agents with minimal scaffolding. It supports custom providers and tools, MCP, AWS services, and integrations such as Langfuse and LiteLLM.

[0:22](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=22s) [Slide describing the Strands Agents SDK, its tools, model support, and integrations.](https://assets.ai.engineer/sites/aiecode2025/sha256/3364cecc348e20b68e989322685d3cb799e60340d89f5b5d4ffedd381817621d.webp)

Strands Agents

• Simple, flexible, and lightweight open-source SDK for building agents
• Native tools, MCP servers, and natively integrated with AWS services
• Support for custom model providers, custom tools, and MCP
• Integration with:

ANTHROPIC
aws
mem0
tavily
Langfuse
LiteLLM
ragas

© 2025, Amazon Web Services, Inc. or its affiliates.
2

### Strands Agents agentic loop

An agent takes a prompt, invokes a model for reasoning and tool selection, and executes tools before returning a final response.

[1:05](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=65s) [Diagram connecting a prompt and result to an agent that exchanges requests and responses with a model and tools.](https://assets.ai.engineer/sites/aiecode2025/sha256/285f3a13d6e7c07fb1af159728067201b3e921f9c0c7c65c51e79217106f8594.webp)

Strands Agents

Agentic Loop

Prompt
Invoke agent
Agent
Invoke model
Model
Response, reasoning, tool selection
Execute tool
Tools
Result
Final response
Result

© 2025, Amazon Web Services, Inc. or its affiliates.
3

### Getting started with Strands Agents

The speaker introduces a recorded Strands Agents demo.

[2:49](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=169s) [Title slide reading Getting started with Strands Agents.](https://assets.ai.engineer/sites/aiecode2025/sha256/e96e6a97976ad46b9af5252c78312d8ada8282bed2f032246e8591cdc5eeb32a.webp)

Getting started with Strands Agents

© 2025, Amazon Web Services, Inc. or its affiliates.
5

### Installing Strands packages

The demo uses pip to install Strands Agents and its tools. The speaker notes that the tools package provides default tools.

[3:04](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=184s) [Editor terminal during installation of Strands packages, with an explanatory caption.](https://assets.ai.engineer/sites/aiecode2025/sha256/ee8af17af78025c5e6e66bb6ebc9561316dc327e31d4e6ade6c87d5ecbe8d6b8.webp)

Installing strands-agents and strands-agents-tools

pip install strands-agents-tools

Interface text:
STRANDS
 docs
strands
Problems  Output  Debug Console  Terminal  Ports
~/strands
my-env
package: Package to install
⌘K to generate a command
profile:default
Cursor Tab

[3:12](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=192s) [Terminal showing the command to install Strands Agents and its tools.](https://assets.ai.engineer/sites/aiecode2025/sha256/fde3ec5972e6cc81b680c6616fd7ebc5bf8fc8374984d05f4946e36905ad662a.webp)

Installing strands-agents and strands-agents-tools

pip install strands-agents strands-agents-tools

Interface text:
STRANDS
 docs
strands
Problems  Output  Debug Console  Terminal  Ports
~/strands
my-env
⌘K to generate a command
profile:default
Cursor Tab

### Agent workflow and built-in tools

The planned agent will read a file, summarize it in Markdown, speak the response, and save the audio using three Strands built-in tools: file_read, file_write, and speak.

[3:27](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=207s) [Slide outlining a file summarization and audio workflow using file_read, file_write, and speak.](https://assets.ai.engineer/sites/aiecode2025/sha256/6b6a32e9c707be59dab3da1517db910d446f4ef8a003df79b43ce6da4c8fc1f9.webp)

Now we are going to create an agent that will:
1. Read a file
2. Create a summary
3. Write the summary in Markdown format
4. Speak the response aloud
5. Also store the audio response in a file

To achieve all of this, we will leverage Strands Built-in Tools, namely:
📖 file_read
✍️ file_write
🗣️ speak

### Building the Strands file assistant

The demo configures a Bedrock Claude 3.7 model and writes a system prompt for file and speech tasks. The speaker says the model ID and system prompt can be omitted.

[4:07](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=247s) [Python editor showing Strands imports and a Bedrock model configuration.](https://assets.ai.engineer/sites/aiecode2025/sha256/043ad4c3aba90b4e71cc0e3c857b2d9968cf2b37f1c722e63c4d7ff1953e9ddd.webp)

from strands import Agent
from strands.models import BedrockModel
from strands_tools import file_read, file_write, speak

# Step 1: Define the model
model_id = BedrockModel(
    model_id="us.anthropic.claude-3-7-sonnet-20250219-v1:0",
    max_tokens=64000,
    additional_request_fields={
        "thinking": {
            "type":"disabled",
        }
    },
)

Interface text:
STRANDS
  docs
  app.py
app.py
Problems  Output  Debug Console  Terminal
~/strands
my-env
TAB to demo.py
Cursor Tab
Ln 16, Col 1  Spaces: 4  UTF-8  LF  Python 3.12.10 ('my-env': conda)  Prettier

[4:12](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=252s) [Code editor showing model configuration and a system prompt for a file assistant.](https://assets.ai.engineer/sites/aiecode2025/sha256/43e9300c608b333ba648d8b5468e67d69ae8817a38610ce792507e93822c5097.webp)

from strands import Agent
from strands.models import BedrockModel
from strands_tools import file_read, file_write, speak

# Step 1: Define the model
model_id = BedrockModel(
    model_id="us.anthropic.claude-3-7-sonnet-20250219-v1:0",
    max_tokens=64000,
    additional_request_fields={
        "thinking": {
            "type":"disabled",
        }
    },
)

# Step 2: Define the system prompt
system_prompt = """
You are a helpful personal assistant capable of performing local file actions and [illegible]

Your key capabilities:
1. Read, understand, and summarize files.
2. Create and write to files.
3. List directory contents and provide information on the files.
4. Summarize text content

You can use the following tools to perform these actions:
- file_read: Read a file and return the content.
- file_write: Write to a file.
- file_list: List the contents of a directory.
- 'speak': Speak a message to the user.
"""

Defining the system prompt

Interface text:
STRANDS
  docs
  app.py
app.py
Problems  Output  Debug Console  Terminal
~/strands
my-env
TAB to demo.py
Cursor Tab
Ln 31, Col 4  Spaces: 4  UTF-8  LF  Python 3.12.10 ('my-env': conda)  Prettier

### Running the agent

The demo configures an agent with a model, system prompt and tools, then asks it to summarize chapter 10, save the summary as Markdown and speak it aloud.

[4:31](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=271s) [Code editor showing the agent configuration and a partially visible request to summarize a file, save Markdown, and speak the summary.](https://assets.ai.engineer/sites/aiecode2025/sha256/ef7aff3c101f7445e7cfd8deecb0b39be73177eb9a4995ef66f2107a8af0623f.webp)

# Step 2: Define the system prompt
system_prompt = """
You are a helpful personal assistant capable of performing local file actions and [illegible]

Your key capabilities:
1. Read, understand, and summarize files.
2. Create and write to files.
3. List directory contents and provide information on the files.
4. Summarize text content

You can use the following tools to perform these actions:
- file_read: Read a file and return the content.
- file_write: Write to a file.
- file_list: List the contents of a directory.
- 'speak': Speak a message to the user.
"""

# Step 3: Define the agent
agent = Agent(model=model_id,
              system_prompt=system_prompt,
              tools=[
                  file_read,
                  file_write,
                  speak],
)

# Step 4: Run the agent
agent("What is the content of the file 'chapter10.txt' located in the 'docs' dire[illegible]
    And save the file in Markdown format in the 'results' directory, \
    If the folder 'results' does not exist, create it. \
    If the file 'chapter10.md' already exists, overwrite it. \
    And finally also speak out the summary you have created. Make sure the voice[illegible]

Interface text:
strands
STRANDS
docs
app.py
Problems
Output
Debug Console
Terminal
zsh
~/strands
my-env
⌘L to chat, ⌘K to generate
TAB to demo.py →
⌘K to generate a command
profile:default
Cursor Tab
Ln 48, Col 1
Spaces: 4
UTF-8
LF
Python 3.12.10 ('my-env': conda)
Prettier

### Manim Video Generation with Strands Agents

The next demo uses MCP with Strands to build animations and videos with the Manim library.

[5:08](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=308s) [Title slide introducing Manim video generation with Strands Agents.](https://assets.ai.engineer/sites/aiecode2025/sha256/5857ada9656776109742b32fd77babf9de64ebbcd05c0d2caaf4f185085a41fc.webp)

Manim Video Generation with Strands Agents

© 2025, Amazon Web Services, Inc. or its affiliates.
7

### Importing the agent and MCP client

The example imports the Strands Agent and MCP client to use an assumed existing Manim server for video generation.

[6:15](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=375s) [Code slide highlighting imports for the Strands Agent and MCP client; later code is dimmed.](https://assets.ai.engineer/sites/aiecode2025/sha256/7b533e52535536541678df8b6b93de5ac8ecd5a243f2bd7a8d5872ce029ee281.webp)

Manim Video Generation with Strands Agents

from strands import Agent
from strands.tools.mcp import MCPClient

# Connect to the Manim MCP server using stdio transport
manim_server_path = "src/manim_server.py"
manim_mcp_client = MCPClient(lambda: stdio_client(
                                    StdioServerParameters(command="uv", args=["run",
                                                                  manim_server_path])))

# [illegible]
with manim_mcp_client:
    # [illegible]
    tools = manim_mcp_client.list_tools_sync()
    agent = Agent(tools=tools)

    # The prompt
    agent("Create a Manim scene that draws the cubic function (2x^3 - 3x^2 + x - 1) from x = -3 to x = 3")

© 2025, Amazon Web Services, Inc. or its affiliates.
8

### Connecting to the Manim MCP server

The example configures an MCP client to run the Manim server at src/manim_server.py using stdio transport.

[6:45](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=405s) [Code slide highlighting the Manim server path and MCP client configuration.](https://assets.ai.engineer/sites/aiecode2025/sha256/e76d8262a799d58cd1c6163591527f0d6f866601a6ad8bb0dfd1efa23d0f2ed9.webp)

Manim Video Generation with Strands Agents

from strands import Agent
from strands.tools.mcp import MCPClient

# Connect to the Manim MCP server using stdio transport
manim_server_path = "src/manim_server.py"
manim_mcp_client = MCPClient(lambda: stdio_client(
                                    StdioServerParameters(command="uv", args=["run",
                                                                   manim_server_path])))

# Now open the context for the actual chat loop
with manim_mcp_client:
    # Creating an Agent
    tools = manim_mcp_client.list_tools_sync()
    agent = Agent(tools=tools)

    # The prompt
    agent("Create a Manim scene that draws the cubic function (2x^3 - 3x^2 + x - 1) from x = -3 to x = 3")

© 2025, Amazon Web Services, Inc. or its affiliates.
9

### Manim Video Generation with Strands Agents

The code connects to a Manim MCP server, retrieves its tools, and passes them to a Strands agent. A dimmed prompt asks the agent to draw a cubic function.

[7:17](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=437s) [Code slide highlighting retrieval of MCP tools and creation of a Strands agent; the prompt below remains dimmed.](https://assets.ai.engineer/sites/aiecode2025/sha256/76d0f6d12c57e50bb72e5d0a3b418cbbbf8e9b37a475bcedcd467a503f32b3fa.webp)

Manim Video Generation with Strands Agents

from strands import Agent
from strands.tools.mcp import MCPClient

# Connect to the Manim MCP server using stdio transport
manim_server_path = "src/manim_server.py"
manim_mcp_client = MCPClient(lambda: stdio_client(
                                     StdioServerParameters(command="uv", args=["run",
                                                                    manim_server_path])))

# Now open the context for the actual chat loop
with manim_mcp_client:
    # Creating an Agent
    tools = manim_mcp_client.list_tools_sync()
    agent = Agent(tools=tools)

    # The prompt
    agent("Create a Manim scene that draws the cubic function (2x^3 - 3x^2 + x - 1) from x = -3 to x = 3")

© 2025, Amazon Web Services, Inc. or its affiliates.
10

[7:21](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=441s) [Code connects a Strands agent to a Manim MCP server and loads its tools.](https://assets.ai.engineer/sites/aiecode2025/sha256/127bf5d093f99c4d18eab1751a2c700904c50e22938ee504b6b4a869eb155b96.webp)

Manim Video Generation with Strands Agents

from strands import Agent
from strands.tools.mcp import MCPClient

# Connect to the Manim MCP server using stdio transport
manim_server_path = "src/manim_server.py"
manim_mcp_client = MCPClient(lambda: stdio_client(
                                     StdioServerParameters(command="uv", args=["run",
                                                                    manim_server_path])))

# Now open the context for the actual chat loop
with manim_mcp_client:
    # Creating an Agent
    tools = manim_mcp_client.list_tools_sync()
    agent = Agent(tools=tools)

    # The prompt
    agent("Create a Manim scene that draws the cubic function (2x^3 - 3x^2 + x - 1) from x = -3 to x = 3")

© 2025, Amazon Web Services, Inc. or its affiliates.
10

### Manim Video Generation with Strands Agents

The Strands agent loads tools from a Manim MCP server, then receives a prompt to draw a cubic function from x = -3 to x = 3.

[7:48](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=468s) [The agent code includes a prompt to visualize a cubic function from x = −3 to x = 3.](https://assets.ai.engineer/sites/aiecode2025/sha256/4eae69d503bd53957bab12d583efe09e7235965d2c0e5707004a539c6c393b7d.webp)

Manim Video Generation with Strands Agents

from strands import Agent
from strands.tools.mcp import MCPClient

# Connect to the Manim MCP server using stdio transport
manim_server_path = "src/manim_server.py"
manim_mcp_client = MCPClient(lambda: stdio_client(
                                     StdioServerParameters(command="uv", args=["run",
                                                                    manim_server_path])))

# Now open the context for the actual chat loop
with manim_mcp_client:
    # Creating an Agent
    tools = manim_mcp_client.list_tools_sync()
    agent = Agent(tools=tools)

    # The prompt
    agent("Create a Manim scene that draws the cubic function (2x^3 - 3x^2 + x - 1) from x = -3 to x = 3")

© 2025, Amazon Web Services, Inc. or its affiliates.
11

### Manim chat interface

The presenter starts the Manim MCP server and runs app.py. The chat interface initializes, lists its commands and waits for a prompt.

[8:43](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=523s) [A terminal shows the Manim chat interface, available commands, and example questions.](https://assets.ai.engineer/sites/aiecode2025/sha256/6b035c5879039fe9ed9bc620c51e5aed878e6c046318266de99cccb441db07a1.webp)

Manim Video Generation Chat Interface

Available commands:
/help    - Show this help message
/example - Show an example Manim animation
/exit    - Exit the program
/install - Install required packages using uv
/status  - Check MCP server status

You can also:
- Ask questions about Manim
- Request specific animations
- Get help with Manim code
- Ask about the generated videos

Example questions:
- 'How do I create a circle animation?'
- 'Can you show me how to animate text?'
- 'What's the difference between Create and Show?'
- 'Where are the videos saved?'

You:

Terminal output:
> uv run app.py
Checking and installing required packages...
Package installation complete!
Checking MCP server status...
[05/19/25 16:44:35] INFO Processing request of type ListToolsRequest
Initializing Manim Video Generation Chat Interface...
[05/19/25 16:44:35] INFO Processing request of type ListToolsRequest
Initialization complete!

> uv run start_mcp_server.py
Starting Manim MCP Server...
Server path: /Users/debnsuma/strands_demo/demo-manim-video-gen/src/manim_server.py
Press Ctrl+C to stop the server

Visible app.py code:
#!/usr/bin/env python3
from mcp import stdio_client, StdioS[illegible]
from strands import Agent
from strands.tools.mcp import MCPClie[illegible]
import os
import sys
import subprocess
import json
from pathlib import Path
import time

def check_and_install_packages():
def print_help():
def get_example_animation():
def ensure_output_directory():

def main():
    try:
        # Check and install required [illegible]
        check_and_install_packages()

        # Ensure output directory ex[illegible]
        output_dir = ensure_output_d[illegible]

        # Get the path to the manim_[illegible]
        current_dir = os.path.dirname[illegible]
        manim_server_path = os.path.[illegible]
        os.chdir(current_dir)

        # Connect to the Manim MCP s[illegible]
        manim_mcp_client = MCPClient[illegible]
            StdioServerParameters(co[illegible]
        ))

        print("Checking MCP server s[illegible]
        # Try to open the context to [illegible]
        try:
            with manim_mcp_client:
                tools = manim_mcp_cl[illegible]
        except Exception as e:
            print("\nError: MCP serv[illegible]
            print("Please start the [illegible]
            print("uv run start_mcp_[illegible]
            sys.exit(1)

Interface text:
STRANDS_DEMO
.venv
demo-manim-vid...
output
src
app.py
README.md
start_mcp_serv...
demo-summary-...
.gitignore
.python-version
main.py
pyproject.toml
README.md
uv.lock
Problems  Output  Debug Console  Terminal  Ports  Code Reference Log  Spell Checker
server.py:551
AWS: profile:default
Cursor Tab  Ln 54, Col 29  Spaces: 4  UTF-8  LF  Python 3.12.10 ('myenv': conda)  Prettier

### Prompting a cubic animation

The presenter asks the Manim chat to draw 2x³ − 3x² + x − 1 from x = −3 to x = 3 in 9 seconds. The agent begins processing the request.

[8:48](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=528s) [The chat receives a request to draw a cubic function from −3 to 3 over nine seconds.](https://assets.ai.engineer/sites/aiecode2025/sha256/fbe75f66dbc7bdc7d9d5968814668f7eeb25f66968efd625d53b21e3b4dc5960.webp)

Create a Manim scene that draws the cubic function (2x^3 - 3x^2 + x - 1) from x = -3 to x = 3 in 9 seconds.

=== Manim Video Generation Chat Interface ===
Available commands:
/help     - Show this help message
/example  - Show an example Manim animation
/exit     - Exit the program
/install  - Install required packages using uv
/status   - Check MCP server status

You can also:
- Ask questions about Manim
- Request specific animations
- Get help with Manim code
- Ask about the generated videos

Example questions:
- 'How do I create a circle animation?'
- 'Can you show me how to animate text?'
- 'What's the difference between Create and Show?'
- 'Where are the videos saved?'

You: Create a Manim scene that draws the cubic function (2x^3 - 3x^2 + x - 1) from x = -3 to x = 3 in 9 seconds.

Agent: Processing your request...

Interface text:
uv run app.py
Checking and installing required packages...
Package installation complete!
Checking MCP server status...
[05/19/25 16:44:35] INFO Processing request of type ListToolsRequest
Initializing Manim Video Generation Chat Interface...
[05/19/25 16:44:35] INFO Processing request of type ListToolsRequest
Initialization complete!
server.py:551

uv run start_mcp_server.py
Starting Manim MCP Server...
Server path: /Users/debnsuma/strands_demo/demo-manim-video-gen/src/manim_server.py
Press Ctrl+C to stop the server

app.py:
#!/usr/bin/env python3
from mcp import stdio_client, StdioS[illegible]
from strands import Agent
from strands.tools.mcp import MCPCli[illegible]
import os
import sys
import subprocess
import json
from pathlib import Path
import time

def check_and_install_packages():
def print_help():
def get_example_animation():
def ensure_output_directory():
def main():
    try:
        # Check and install required [illegible]
        check_and_install_packages()
        # Ensure output directory [illegible]
        output_dir = ensure_output_d[illegible]
        # Get the path to the manim_[illegible]
        current_dir = os.path.dirnam[illegible]
        manim_server_path = os.path.[illegible]
        os.chdir(current_dir)
        # Connect to the Manim MCP [illegible]
        manim_mcp_client = MCPClient[illegible]
            StdioServerParameters(co[illegible]
        ))
        print("Checking MCP server s[illegible]
        # Try to open the context to [illegible]
        try:
            with manim_mcp_client:
                tools = manim_mcp_cl[illegible]
        except Exception as e:
            print("\nError: MCP serv[illegible]
            print("Please start the [illegible]
            print("uv run start_mcp_[illegible]
            sys.exit(1)

STRANDS_DEMO
.venv
demo-manim-vid...
output
src
app.py
README.md
start_mcp_serv...
demo-summary-...
.gitignore
.python-version
main.py
pyproject.toml
README.md
uv.lock

Problems  Output  Debug Console  Terminal  Ports  Code Reference Log  Spell Checker
zsh - demo-manim-video-gen
AWS: profile:default
Cursor Tab  Ln 54, Col 29  Spaces: 4  UTF-8  LF  Python 3.12.10 ('myenv': conda)  Prettier

## Full transcript

[0:00](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=0s) [upbeat music] All right. So what we are gonna do is I'll quickly go through, uh, couple of demos.

[0:19](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=19s) That's all. That's, that's, that's the plan. Uh, so Strands is an open source SDK, uh, which has only one motivation, is to make your agents as simple as possible without any scaffolding.

[0:34](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=34s) The only thing that is needed is tool and the model.

[0:41](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=41s) That's all. There is no scaffolding. You don't have to de- uh, dictate of what the agent should do. And the idea is

[0:49](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=49s) since the models are becoming more and more intelligent, we want the model to take, uh, the reasoning part of our agents. We don't want to scaffold with lot of prompts, lot of, uh, system prompts, uh, a lot of backgrounds and all that.

[1:05](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=65s) So that's, that's, that's all to it. And it is also integrated with, uh, various, uh,

[1:12](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=72s) third-party, uh, providers like, uh, Langfuse, uh, LiteLLM. You can use any model of your choice. You don't need to use Bedrock-hosted models, but, uh, you can go ahead with any of the model of your choice using LiteLLM.

[1:27](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=87s) And also, you can, uh, use Ollama if you want to test it out locally.

[1:34](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=94s) Now, this is the agentic loop that we have in Strands. As I mentioned, it's just the models and the tools. That's all. And that is actually the two strands in this, uh, logo of Strands denotes one is for model, one is for tool.

[1:49](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=109s) I just happened to know this yesterday, so yeah. Okay. So now let's see a demo, how, how you can create, uh, uh, a Strands agent. So the demo that we are gonna have now, it's very simple.

[2:04](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=124s) We are going to read one file from our disk, and then we will generate a summary of that. Then we will write that summary into our, uh, local drive.

[2:14](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=134s) And then we will also tell the agent to speak out the result. So basically, we are trying to add the voice aspect of this, okay? For now, there are three things we are doing: reading a file, writing a file, and generating a speak, uh, speech.

[2:30](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=150s) All of these three, we are doing it using the default tools from Strands. So you don't have to write any custom tool for this. You just have to install, uh, Strands tool, and boom, you can get started with this, okay?

[2:44](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=164s) So just remember this, uh, use case. Uh, I have recorded this because I heard that the Wi-Fi is pretty fantastic here, so. [laughs]

[2:53](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=173s) Uh, all right. So let's see how, how it goes.

[3:00](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=180s) So here, uh, the first thing we need, we need to do is we need to install Strands. So that is what we are doing here.

[3:09](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=189s) Uh, we are just installing the Strands agent, and then we are going to install Strands tools. So this is simple pip install. Nothing fancy here. And when you install the Strands tool, it gives you a lot of default tools.

[3:23](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=203s) You can always make your own custom tools, uh, but, uh, this is how you can create, uh, uh, use, uh, out-of-the-box tools. So these are the three tools that we are going to use.

[3:34](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=214s) Now, we are going to write the application.

[3:44](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=224s) So the first thing that we need to do is we need to import strands. And by default, it uses Bedrock model, which is, uh, Claude three point seven under the hood.

[3:54](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=234s) But if you don't want to use that, you can always use any model of your choice. But by default, it uses Bedrock. I'm trying to show you how you can define the model, but later on when we create agents, you will see that you don't have to give model ID.

[4:09](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=249s) By default only it should work. But I just wanted to show you, if you want to define your own model, how you can define, uh, the model. Uh, in, in case you want Ollama, you can use Ollama there.

[4:20](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=260s) And now this is a system prompt. When I share the GitHub repo, try to do this. Delete the system prompt. It should still work. But I just want to, wanted to give you an intuition of how things work under the hood.

[4:31](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=271s) And if you see here, all we are doing here, we are giving the model ID, system prompt, and the tools. That's all. And now we are asking the same question that read this, uh, chapter number ten, uh, summarize that, and, uh, write it in a markdown file and speak out.

[4:46](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=286s) Now, to listen to the speech, let me increase the volume. So now it is reading the file, then it is trying to write the file after creating the summary, and now it should s- speak out.

[4:59](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=299s) The human eye functions like a camera with light entering through the cornea.

[5:03](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=303s) Okay. So you get the idea, right? So how these things work. Now, there is one more, uh, demo I have, which is around MCP with Strands, because without MCP and agents, I was told that you cannot have any talk in this conference. [laughs]

[5:20](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=320s) So, all right. How many of you have heard of, um,

[5:26](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=326s) [REDACTED:username] YouTube channel? Oh, wow. So you know what we are talking about. So we are trying to build animations and videos like what we see in [REDACTED:username]. It is powered by one of the, uh, library called Manim.

[5:41](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=341s) So I've been working with this Manim for a couple of years, uh, uh, to, uh... If you are from, uh, science and, uh, mathematics background, eigenvalue, uh, uh, you know, eigenvectors, SVD, these are the concepts which are very easily we can explain, uh, using visualization.

[5:56](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=356s) So what we are going to do now is we are going to create a Strands agent

[6:03](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=363s) using

[6:05](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=365s) An MCP server which will help me to generate these videos using Manim.

[6:11](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=371s) With me so far? Yeah. So this is how we can do. Assume that we already have an MCP server which can generate this video, okay? Just assume that. It is not here, but it, it is, uh, uh, already there, okay?

[6:27](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=387s) So, so now what we are going to do is, using Strands, we are just going to

[6:35](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=395s) call the MCP client and make use of that server. So in this case, I'm importing the Strands Agent and the MCP client.

[6:45](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=405s) The next thing that we are going to do is we are going to create the MCP client. And if you see here,

[6:51](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=411s) the-- this is my MCP server path where I have written the code to execute that MC, uh, Manim, uh, code. So that-- this particular code I'm not showing, but after this I will show it to you what, uh, that code is doing.

[7:07](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=427s) But that's all. I don't have to do anything else. Now, when I create an agent... In the previous example, if you, if you remember, we mentioned that

[7:18](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=438s) agent, then tools equal to read file, write file, and speak. In this case, I'm not using any of the default tools. My tool is nothing but the MCP server.

[7:30](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=450s) And for that I'm just using tools equal to manim_mcp_client.list_tools_sync(). So this will, this will broadcast all the tools that the MCP server has to my client. So that is nothing but the Strands Agent.

[7:46](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=466s) With me so far? Yes? Perfect. And at the end, we are just going to give the prompt. So in this case, you can give any prompt of your choice.

[7:54](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=474s) Uh, but here we are just saying that create a, um, a visualization, uh, for this cubic equation within the range of x minus three to x equal to three.

[8:04](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=484s) If you want to try this with something else, you can always give like, um, "Explain me byte-pair encoding, uh, in a visual way." Or you can say, uh, "Explain SVD.

[8:13](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=493s) Explain how two, uh, two matrices of two by-- two cross two, um, uh, you know, perform a matrix multiplication," or whatever, right?

[8:24](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=504s) So now let's see this. So for this, before I start the MCP client or the Strands Agent, I have to make sure that server is up and running, right?

[8:33](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=513s) So in the-- here, I'm just making the MCP server up so, so that this is available in that, uh, localhost. And now I'm running this app.py, which contains the code which we have seen a while back.

[8:47](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=527s) So finally, we can just give the prompt. So this is the same prompt that we have seen in the previous slide, and let's see, uh, what it generates.

[8:58](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=538s) And if you notice, we have not mentioned any, um, uh, any scaffolding, kind of a like system prompt and all that. We want the model to reason about this and figure it out of its own.

[9:14](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=554s) So I have not done anything. This is-- and it is not photoshopped. It just came up like that.

[9:25](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=565s) And you can actually define the duration of the video, let's say thirty seconds, ten seconds, and all that.

[9:32](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=572s) And if you have worked in Manim to generate this code, it takes some time, right? So i-it's not that straightforward. Okay? So that's about the integration with, uh, MCP and Strands.

[9:47](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=587s) And before I show you a few of the resources, let me show you the code.

[9:55](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=595s) No one pings me while I am working, but everybody pings when... [laughing]

[9:59](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=599s) Okay. All right, so this is the... So this is the MCP server that I have. It just-- I have some, uh, I have imported, uh, FastMCP, and

[10:22](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=622s) this is the, this is couple of, couple of the, uh, um, tools that I have defined. And if you see this here, the way that you can create an MCP tool is just wrap it around with an mcp.tool, a decorator, right?

[10:35](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=635s) So this becomes-- these two are the tools for my MCP server. And when I come here...

[10:44](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=644s) Not this one. When I come here, and if you look at

[10:49](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=649s) the main function, so this is the function where I'm going to call that using Strands Agent and MCP client, right? Uh, so I-- what I've shown in the presentation is just few lines from this main function, but we are doing little bit more, uh, before ac- uh, before just calling, uh, the agent.

[11:08](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=668s) We are listing the tools. But before that, uh, we are also giving some examples. And if I show you this example...

[11:19](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=679s) I'm just giving one example of how to create, uh, you know, a, a, an, and a, and construct in-- using Manim. That's all. You can think of it like, uh, one-shot prompting.

[11:31](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=691s) Uh, it's like that. Uh, but my-- as far as the agent is concerned, it's just, uh, one line of code. Uh, you know, we just list the tools, and then here we are just calling the agents.

[11:45](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=705s) That's all. And then we have a while True loop so that we get an interactive, uh, chat kind of an experience. Okay? And in our first, uh, demo, um...

[12:00](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=720s) Uh, not first demo. I want to show you one quick thing, is, uh, how you can create-

[12:06](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=726s) A custom, uh, tool. Okay? This is, uh... I'm just jumping around a couple of things because we just have two, three minutes. It's, it, it's no less than a time bomb, trust me, when I see this.

[12:18](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=738s) Right. So, let's say you have any function. Okay. Uh, let me just quickly scroll down and show it to you.

[12:32](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=752s) Yeah. So if you have any function, and you want to c- uh, create that function, uh, you know, turn that function into a tool, all you have to do is this.

[12:43](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=763s) Uh, where is that? Yeah. All you... Let's say this is a function. Yeah, this is a different example. Uh, it's there in the GitHub, but I will not explain that.

[12:54](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=774s) But the idea is, let's say you have a function, you want to convert that into a tool. All you have to do is just import s- uh, tools from here and decorate it with tools.

[13:03](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=783s) Once that is done, this retrieve_from_quadrant will become

[13:08](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=788s) a, a tool for you. So next time when you create an agent, when you create an agent, we just give that as a tool. And now here, in this list of tools, you can give your custom tool as well as your default tools, whatever we have.

[13:23](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=803s) Read_file, write_file, speak, and so on and so forth. Okay? So that's, that's about it. Now, if you want to learn more about Strands,

[13:33](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=813s) uh, we have a GitHub repository. So this is the launch blog. Um, this is the documentation, which is nothing but strandsagents.com, and this is the GitHub link. Okay. And if you have any questions, uh, feel free to, uh, you, you know, ask me.

[13:52](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=832s) I, I'll be around. And we have a booth inside as well. Uh, there are plenty of demos, uh, with, uh, Strands, with Lambda, MCP and, uh, you know, to, do to get started.

[14:03](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=843s) This is an open source project. Feel free to raise a PR if you have something, if you have built something into the samples, uh, code repository within Strands, uh, GitHub.

[14:12](https://www.youtube.com/watch?v=Q3NreEAdKMc&t=852s) And, uh, yeah, uh, share what you built, and, uh, if you have any feedback, let us know. Thank you so much. [audience applauding] [upbeat music]
