Skip to content

writer/aws-examples

Repository files navigation

AWS Examples

This repository contains sample code demonstrating how to use AWS Bedrock and Strands with WRITER's Palmyra family of models.

Table of contents

Overview

  • Bedrock examples: Examples of using WRITER's Palmyra X4 and X5 models with AWS Bedrock.
  • WRITER Strands examples: Examples of using WRITER's family of Palmyra models via direct integration.
  • Bedrock Strands examples: Examples showcasing how to use WRITER’s Palmyra X4 and X5 models on Amazon Bedrock through the Strands Agents SDK.

Prerequisites

Before you begin, ensure you have the following:

  • Python 3.10 or higher installed.

Installation

  1. Clone the repository

    git clone https://github.com/writer/aws-examples.git
    cd aws-examples
  2. Create and activate a virtual environment:

    python -m venv my_env
    source my_env/bin/activate  # On Windows, use `my_env\Scripts\activate`
    
  3. Set up environment variables

    Copy the .env.template file to a .env file in the project root with your credentials:

    cp .env.template .env
    

    WRITER credentials

    Only fill this out if you're testing WRITER Strands examples.

    WRITER_API_KEY=your WRITER API key
    

    AWS credentials

    Only fill this out if you're testing Bedrock-powered examples.

    AWS_REGION_NAME=your AWS region
    AWS_BEDROCK_MODEL_ID=Bedrock model ID you want to use
    AWS_ACCESS_KEY_ID=your AWS access key
    AWS_SECRET_ACCESS_KEY=your AWS secret key
    AWS_SESSION_TOKEN=your AWS session token
    

    Note: You can find more information on how to set up these credentials in the Bedrock or Strands examples README.

Examples

Examples demonstrating how to use WRITER's Palmyra models with AWS Bedrock:

  • Transcript analyzer: Analyze meeting transcripts and extract summaries and action items.
  • Web search agent: Intelligent agent that can search the web and process information.

Examples demonstrating how to use WRITER's models with AWS Strands via direct integration:

Examples demonstrating how to use WRITER's models with AWS Strands via Bedrock integration:

  • Agents workflow: Multi-agent workflow orchestration and coordination.
  • File operations: File system operations and document processing.
  • Knowledge base agent: Intelligent knowledge base querying and retrieval.
  • MCP calculator: Mathematical computation and calculation tools.
  • Memory agent: Agent with persistent memory capabilities.
  • Meta tooling: Advanced tool management and orchestration.
  • Structured output: Generate structured data from unstructured text.
  • Weather forecaster: Weather data analysis and forecasting.
  • Multi-agent examples: Educational multi-agent system with specialized assistants for computer science, english, language learning, and mathematics, coordinated by a teacher's assistant orchestrator that routes student queries to the most appropriate subject-matter expert.
  • Hybrid multi-agent example: Advanced multi-agent system with a central orchestrator using AWS Bedrock for routing queries to specialized sub-agents that use direct WRITER API integration for domain-specific expertise in creative, financial, and medical domains.

Resources

The resources/ directory contains sample data and files used by the examples:

  • Meeting transcript: Sample meeting transcript for testing the transcript analyzer.
  • The Ninth Wave: Sample image for testing vision analysis capabilities.
  • Financial data: Sample enterprise financial dataset for testing database querying capabilities.

About WRITER

WRITER is the full-stack generative AI platform for enterprises. Quickly and easily build and deploy AI apps with a suite of developer tools fully integrated with our LLMs, graph-based RAG, AI guardrails, and more. To learn more, visit our website.

Support

If you encounter any issues or have questions, please file an issue on this repository.

About

Examples for using Palmyra with AWS, such as on Bedrock or with Strands Agents.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages