smithery/aws-samples

modify-agent-prompts

Modify the review-item-processor agent's prompts, model configuration, confidence thresholds, JSON output schemas, and tool setup.

Installation

$ npx skills add smithery/aws-samples --skill modify-agent-prompts

Summary

  • Modify the review-item-processor agent's prompts, model configuration, confidence thresholds, JSON output schemas, and tool setup.
  • Use when changing document or image review prompts, adjusting model IDs, modifying output format, updating citation settings, or adding new tools to the agent.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/aws-samples · top by installs.

npx skills add smithery/aws-samples

Browse all from smithery/aws-samples

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,734 B
  • docs SUMMARY.md 102 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Modify Agent Prompts and Configuration

Agent Architecture

review-item-processor/
├── agent.py               # Prompt generators + agent execution
├── model_config.py        # Model registry with capabilities
├── tools/
│   ├── factory.py         # Dynamic tool creation
│   ├── knowledge_base.py  # Bedrock KB integration
│   ├── code_interpreter.py
│   └── mcp_tool.py        # MCP tool support
└── index.py               # Lambda handler entry point

Common Modifications

1. Modifying Document Review Prompts

File: agent.py

Key functions:

  • getdocumentreview_prompt() - Main entry point
  • getdocumentreviewpromptwithcitations() - With citations
  • getdocumentreviewprompt_legacy() - Without citations

JSON Schema:

{
  "result": "pass" | "fail",
  "confidence": <number 0-1>,
  "explanation": "<detailed reasoning>",
  "shortExplanation": "<max 80 chars>",
  "pageNumber": <integer from 1>,
  "citations": ["<quoted text>", ...]
}

2. Modifying Image Review Prompts

File: agent.py, function getimagereview_prompt()

JSON Schema (Nova models add boundingBoxes):

{
  "result": "pass" | "fail",
  "confidence": <number 0-1>,
  "explanation": "<detailed reasoning>",
  "shortExplanation": "<max 80 chars>",
  "usedImageIndexes": [<list of indexes>]
}

3. Model Configuration

Environment Variables (set in CDK):

  • DOCUMENTPROCESSINGMODELID, IMAGEREVIEWMODELID, BEDROCK_REGION
  • ENABLECITATIONS, ENABLECODE_INTERPRETER

Change models via CDK:

cdk deploy -c rapid.documentProcessingModelId="global.anthropic.claude-opus-4-6-v1"

Add new model to modelconfig.py in getmodelconfigs():

"model-id": ModelConfig(
    model_id="model-id",
    supports_document_block=True,
    supports_citation=True,
    supports_caching=True,
    input_per_1k=0.XXX,
    output_per_1k=0.XXX,
)

4. Adding New Environment Variables

  1. Define in cdk/lib/parameter-schema.ts
  2. Pass to Lambda in cdk/lib/constructs/agent.ts
  3. Read in agent.py with os.environ.get()

5. Adding New Tools

For detailed tool creation guide, see [references/TOOL-CREATION.md](references/TOOL-CREATION.md).

Quick Reference

Modification Location Search For
Document prompt schema agent.py getdocumentreviewprompt
Image prompt schema agent.py getimagereview_prompt
Confidence guidelines agent.py confidence_guidelines
Tool usage instructions agent.py buildtoolusagesection
Model capabilities model_config.py getmodel_configs
Environment variables CDK agent.ts environment:

Troubleshooting

Issue Check
Citations not working ENABLECITATIONS env var, model supports citations in modelconfig.py
Model not found Model ID format, available in BEDROCKREGION, added to modelconfig.py
Tool not available Tool configuration in event payload, registered in factory.py
Wrong output format JSON schema in prompt, {language_name} placeholders

After Modification

  1. Run /build-and-format if Python code changed
  2. Run /deploy-cdk-stack if CDK changes made
  3. Test with sample documents and monitor CloudWatch logs