Skip to content

Conversation

mkmeral
Copy link
Contributor

@mkmeral mkmeral commented Sep 17, 2025

🎯 Overview

This PR introduces a comprehensive prompt generation system for the Strands MCP Server, enabling intelligent context-aware prompts for tool development, agent creation, session management, model configuration, and multi-agent orchestration. Additionally, it establishes a robust testing infrastructure and CI/CD pipeline to ensure code quality and maintainability.

The goal of these prompts is to give necessary context and guidelines to LLMs, to make getting started much easier. The prompts are dynamically generated using up to date documentation.

🎯 User Experience

What Are MCP Prompts?

MCP Prompts are specialized templates that enhance AI coding assistants (Cursor, Q CLI, Cline) with comprehensive Strands context. When developers invoke a prompt, their AI assistant receives up-to-date documentation, best practices, and structured guidance for building with Strands Agents.

How Developers Use Them

  • Q CLI: @strands_agent_development "Create a document analyzer"
  • Cursor: /strands_agent_development in Composer/Agent mode
  • Result: AI guides through design → approval → implementation with proper Strands patterns

This brings the agent-builder experience directly into developers' preferred tools, eliminating context switching and making Strands development faster and more intuitive.

✨ Key Features

1. Prompt Generation System

  • Modular Architecture: Organized prompt generation functions in prompts.py with Jinja2 templates
  • Six Specialized MCP Prompts:
    • 🔧 Tool Development: Generate prompts for creating Strands tools with best practices
    • 🤖 Agent Development: Create agent configuration prompts with system prompts and tools
    • 📊 Session Management: Manage Strands sessions with proper state handling
    • 🧠 Model Development: Configure and optimize model settings for different providers
    • 👥 Multi-Agent Development: Orchestrate complex multi-agent systems and swarms
    • 🎯 Base Template: Shared context and best practices across all prompts

2. Testing Infrastructure

  • 35 comprehensive unit tests with 67% code coverage
  • Test coverage for all prompt generation functions
  • Async support for MCP server testing
  • Parallel test execution with pytest-xdist
  • Coverage reporting in HTML and XML formats

3. CI/CD Pipeline

  • Multi-platform testing: Linux, Windows, macOS
  • Python version matrix: 3.10, 3.11, 3.12, 3.13
  • Automated workflows:
    • PR validation with test and lint checks
    • Main branch protection
    • Automated PyPI publishing on release
  • Code quality tools: ruff for linting, mypy for type checking

🧪 Testing

  • All tests pass locally
  • Tested with MCP inspector

✅ Checklist

  • All tests pass locally
  • Code follows project style guidelines (ruff)
  • Documentation updated where necessary
  • No breaking changes to existing functionality
  • PR template filled out completely
  • Commits are logical and well-organized

Murat Kaan Meral added 3 commits September 17, 2025 15:48
- Add prompts.py module with generation functions for tools, agents, sessions, models, and multi-agent patterns
- Create Jinja2 templates for all development scenarios
- Add extensive test coverage for prompt generation
- Integrate new prompt endpoints into MCP server
- Include regex filtering and content fetching utilities
- Update dev dependencies to latest versions (pytest 8.0+, pytest-asyncio 0.23+)
- Add pytest-xdist for parallel test execution
- Add pytest-mock and mypy for better testing and type checking
- Configure hatch-test environment with Python 3.10-3.13 matrix
- Add comprehensive test, lint, and prepare scripts
- Configure coverage reporting (HTML and XML output)
- Add pytest configuration with test paths
- Add mypy type checking configuration
- Include tests directory in ruff linting
- Add test-lint.yml workflow for unit tests and linting
  - Test matrix: Python 3.10-3.13 on Linux, Windows, macOS
  - Comprehensive linting with ruff
- Add pr-and-push.yml for automated PR and main branch checks
  - Concurrency control to prevent duplicate runs
  - Automatic test and lint on PR events
- Add pypi-publish-on-release.yml for automated PyPI deployment
  - Uses PyPI Trusted Publisher for secure release
  - Validates version format before publishing
- Add PULL_REQUEST_TEMPLATE.md for standardized PR submissions
- Update dependabot.yml with pip and GitHub Actions monitoring
@mkmeral mkmeral requested a review from a team as a code owner September 17, 2025 14:51
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the the PR description, can you expand on what the user-experience/job-to-be-done is?

Coming into this, I'm not sure I understand what we're doing and what benefit this is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea is to empower coding assistants to develop with Strands Agents. Essentially the prompts should provide the necessary up to date template info for developing with Strands.

It should make development easier, so I can just start prototyping with a couple lines.

We have agent-builder for a similar reason, but people tend to stick to their tools (Cursor, Cline, Q CLI, etc.). So this is an easy way to improve the DevX

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you document the experience? My understanding is that coding assistants typically have MCP prompts show up as explicit commands you can invoke. Does that match how you're thinking about this feature?

For example, in Q CLI:

@strands_agent_development "my use case" "my examples" "my agent guidelines" "my tools_required" "my model preferences"

In Cursor: /strands_agent_development and then an input box is supposed to pop up, I think?

dbschmigelski
dbschmigelski previously approved these changes Sep 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants