Skip to main content

Natural language workflows that enable AI agents to perform complex, multi-step tasks with consistency and reliability

Project description

Strands Agents SOP

Agent Standard Operating Procedures Python Package

Agent SOPs GitHub Repository

A comprehensive Python package that provides Agent Standard Operating Procedures (SOPs) as importable strings, structured prompts for AI agents via Model Context Protocol (MCP), and Anthropic Skills generation capabilities.

🚀 Quick Start

Strands Agents SDK Usage

# Install the package
pip install strands-agents strands-agents-tools strands-agents-sops
from strands import Agent
from strands_tools import shell, editor
import strands_agents_sops as sops

# Create an agent with the Prompt-Driven Development SOP
agent = Agent(
    system_prompt=sops.pdd,
    tools=[shell, editor]
)

# Use SOPs with custom input
agent = Agent(
    system_prompt=sops.pdd_with_input("Help me design a REST API"),
    tools=[shell, editor]
)

MCP Server Usage

Most MCP clients start the server command from their own config. For example, in Kiro CLI you typically add strands-agents-sops mcp to ~/.kiro/settings/mcp.json and let Kiro launch it automatically.

The underlying server command is:

# Install and run MCP server
pip install strands-agents-sops

# Start with built-in SOPs only
strands-agents-sops mcp

# Load external SOPs from custom directories (sops in path must have `.sop.md` postfix)
strands-agents-sops mcp --sop-paths ~/my-sops:/path/to/other-sops

# External SOPs override built-in SOPs with same name
strands-agents-sops mcp --sop-paths ~/custom-sops

For Kiro CLI, add this to ~/.kiro/settings/mcp.json:

{
  "mcpServers": {
    "agent-sops": {
      "command": "strands-agents-sops",
      "args": ["mcp", "--sop-paths", "~/my-sops"],
      "env": {}
    }
  }
}

The agent-sops key is only a label for the MCP server, so you can rename it if you want.

Remove --sop-paths if you only want the built-in SOPs.

After updating the config, restart Kiro CLI or reload MCP servers. You do not need to run strands-agents-sops mcp in a separate terminal once Kiro is configured.

Anthropic Skills Generation

# Generate skills for Claude
strands-agents-sops skills

# Custom output directory
strands-agents-sops skills --output-dir my-skills

# Include external SOPs in skills generation (sops in path must have `.sop.md` postfix)
strands-agents-sops skills --sop-paths ~/my-sops --output-dir ./skills

External SOP Loading

Both MCP and Skills commands support loading custom SOPs:

  • File format: Only files with .sop.md postfix are recognized as SOPs
  • Colon-separated paths: ~/sops1:/absolute/path:relative/path
  • Path expansion: Supports ~ (home directory) and relative paths
  • First-wins precedence: External SOPs override built-in SOPs with same name
  • Graceful error handling: Invalid paths or malformed SOPs are skipped with warnings
# Create custom SOP
mkdir ~/my-sops
cat > ~/my-sops/custom-workflow.sop.md << 'EOF'
# Custom Workflow
## Overview
My custom workflow for specific tasks.
## Steps
### 1. Custom Step
Do something custom.
EOF

# Use with MCP server
strands-agents-sops mcp --sop-paths ~/my-sops

🧪 Development & Testing

Setup Development Environment

# Navigate to python directory
cd python

# Install development dependencies
pip install hatch

Running Tests

# Run all tests with coverage
hatch test

Code Formatting & Linting

# Format code with Ruff
hatch run format

# Check linting issues
hatch run lint

# Auto-fix linting issues
hatch run lint-fix

# Clean build artifacts and cache
hatch run clean

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

strands_agents_sops-1.1.2.tar.gz (45.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

strands_agents_sops-1.1.2-py3-none-any.whl (49.5 kB view details)

Uploaded Python 3

File details

Details for the file strands_agents_sops-1.1.2.tar.gz.

File metadata

  • Download URL: strands_agents_sops-1.1.2.tar.gz
  • Upload date:
  • Size: 45.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for strands_agents_sops-1.1.2.tar.gz
Algorithm Hash digest
SHA256 bfe0a906a0f5dd596abfe9ff4fda8958ad17f217a24aa6ae956023e6c06c8cbe
MD5 ab85232662c91fcb8816ebb3685b01a7
BLAKE2b-256 6ce759ac10769f9e691587d77305d57fc7907ccdd2d84b3108963de7b1c71d70

See more details on using hashes here.

Provenance

The following attestation bundles were made for strands_agents_sops-1.1.2.tar.gz:

Publisher: pypi-publish-on-release.yml on strands-agents/agent-sop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file strands_agents_sops-1.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for strands_agents_sops-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4851cfa7228b3272f63e9839346d86aa849d37d1610b982a2e2fff6e764d0c5f
MD5 c8c533023f5a83d0d8741c047b6e240e
BLAKE2b-256 addbe339541810f24fe420c0f5da4227371fd83de055f2db0b277fe8ba51d5af

See more details on using hashes here.

Provenance

The following attestation bundles were made for strands_agents_sops-1.1.2-py3-none-any.whl:

Publisher: pypi-publish-on-release.yml on strands-agents/agent-sop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page