Skip to main content
Writer’s models are available on AWS Strands Agents. Strands Agents SDK from AWS is an open-source framework that enables developers to build and deploy AI agents using a model-driven approach. This integration allows you to use Writer models within the Strands agent ecosystem, from local development to production deployment.

Available models

Writer offers several specialized Palmyra models: See the Writer models guide for more details and use cases.
Deprecation notice: The following models are deprecated and will be removed on July 13, 2026: palmyra-x-003-instruct, palmyra-vision, palmyra-med, palmyra-fin, and palmyra-creative.Migration path: Use palmyra-x5 as the replacement for all deprecated models. Palmyra X5 supports a 1M-token context window and covers general-purpose, financial, medical, and creative use cases. For vision workloads, use chat with images with Palmyra X5 instead of palmyra-vision. See the deprecation policy for more information.
The above Bedrock models IDs for Palmyra X5 and Palmyra X4 are using cross-region inference profiles. Check which AWS Regions support Writer models before selecting an inference profile.

Prerequisites

Before you begin, make sure you have:
  • Python 3.10 or higher installed
  • Basic familiarity with Python and AWS Strands

Writer API configuration

Prerequisites

Before you configure the WRITER API client for Strands Agent SDK, make sure you have:

Installation

To use Writer models with Strands Agents, install the optional Writer dependency:
To follow along with the examples in this guide, you’ll also need the Strands Agent Tools package. Install the package with pip install strands-agents-tools.

Client configuration

You can pass additional arguments to the Writer client via client_args:

Environment variables

You can set your Writer API key as an environment variable instead of passing it directly:
Then initialize the model without the client_args["api_key"] parameter:

Usage

After installing, you can import and initialize the Writer provider in Strands Agents:
By default, Strands Agents use a PrintingCallbackHandler that streams responses to stdout as they’re generated. When you call agent("What is 2+2"), you’ll see the response appear in real-time as it’s being generated. The print(response) above also shows the final collected result after the response is complete. See Callback Handlers in the Strands documentation for more details.

Amazon Bedrock configuration

You can also use Writer models through Amazon Bedrock, which provides a managed service for accessing foundation models.

Prerequisites

Before you configure the Amazon Bedrock client for Strands Agent SDK, follow the Bedrock integration guide to set up AWS credentials, enable Writer models in your region, and set up the required IAM permissions.

Installation

Install the base Strands Agents package:
Bedrock is the default model provider in Strands Agents, so no additional model provider installation is required. The BedrockModel class is available by default.
To follow along with the examples in this guide, you’ll also need the Strands Agent Tools package. Install the package with pip install strands-agent-tools. To follow along with the examples in this guide, you’ll also need the Strands Agent Tools package. Install the package with pip install strands-agents-tools.

Client configuration

The following client configuration uses the us.writer.palmyra-x5-v1:0 model ID, which is the ID for the cross-region inference profile for Palmyra X5. Check which AWS Regions support Writer models before selecting an inference profile.

Usage

After configuring the Bedrock model, you can use it with Strands Agents:

Model configuration

The WriterModel accepts configuration parameters as keyword arguments to the model constructor:

Examples

Writer API integration

Enterprise workflow automation

The web_search and email_sender tools in this example are custom tools that you would need to define. See Python Tools for guidance on creating custom tools, or use existing tools from the strands_tools package.

Financial analysis with Palmyra Fin

Long-context document processing

Vision and image analysis

Palmyra X5 supports vision capabilities, allowing you to analyze images and extract information from visual content.

Bedrock integration

Structured output generation

Palmyra X5 and X4 support structured output generation using Pydantic models through Bedrock. This is useful for ensuring consistent, validated responses.
Structured output disables streaming and returns the complete response at once, unlike regular chat completions, which stream by default. See Callback Handlers for more details.

Memory agent

This example demonstrates how to use Writer models through Bedrock with memory capabilities. The mem0_memory tool from strands_tools provides persistent, long-term memory that stores information using Mem0’s memory architecture, allowing the agent to remember user preferences, facts, and context across multiple sessions. The memory system uses semantic search to retrieve relevant information and can store, list, and retrieve memories based on user queries.

Additional resources

See more information and examples below: