Skip to main content
Loading navigation
Back to prompt library

Build Claude Agent with Extended Thinking for Perinatal Review

Linked challenge: Claude Agents SDK Perinatal Psychiatry Safety Review

Prompt source

implementation12 lines4 sectionsNo variables0 checklist items
import anthropic

client = anthropic.Anthropic()

response = client.messages.create(
    model='claude-3-7-sonnet-20250219',
    max_tokens=4000,
    thinking={'type': 'enabled', 'budget_tokens': 2000},
    system='You are a clinical decision support agent for reproductive psychiatry. Evaluate postpartum clinical notes carefully.',
    messages=[
        {'role': 'user', 'content': 'Evaluate patient history: Severe insomnia and disorientation at 2 weeks postpartum.'}
    ]
)

# Extract thought process and structured risk review