Claude Agent SDK Integration
Claude SDK logo

Claude Agent SDK

Anthropic's official agent framework with native MCP support, in-process tool servers, and Claude's advanced reasoning capabilities.

Native MCP Support
In-Process Tool Servers
GEPA Optimizable

✨ Key Features

🔌

Native MCP

First-class Model Context Protocol support — connect to any MCP server directly

🧠

Advanced Reasoning

Powered by Claude's state-of-the-art reasoning and analysis capabilities

🔌

A2A Adapt

Generate an A2A 1.0 Agent Card and server from an existing Claude SDK agent

🧬

GEPA Optimization

Optimize system prompts and tool descriptions with SuperOptiX GEPA

🔍

Discovery Mode

Dynamic tool discovery for large tool catalogs (100+ tools)

Streaming

Async streaming responses for real-time agent interactions

📦 Installation

Install SuperOptiX with Claude SDK

uv tool install superoptix

Set Anthropic API Key

export ANTHROPIC_API_KEY="sk-ant-..."

Recommended Models:

  • claude-sonnet-4-5 — Balanced performance (recommended)
  • claude-opus-4-5 — Maximum capability
  • claude-haiku-4-5 — Fastest, cost-effective

🚀 Quick Start

Get started with Claude Agent SDK in minutes

1

Pull Demo Agent

super agent pull assistant_claude
2

Compile

super agent compile assistant_claude --framework claude-sdk
3

Evaluate

super agent evaluate assistant_claude
4

Optimize

super agent compile assistant_claude --framework claude-sdk --optimize
super agent optimize assistant_claude --auto light --framework claude-sdk
5

Run

super agent run assistant_claude --framework claude-sdk --goal "What is AI?"

⚙️ Model Configuration

⭐ Recommended

Claude Sonnet 4.5

Balanced performance and cost

language_model:
  location: cloud
  provider: anthropic
  model: claude-sonnet-4-5
  temperature: 0.2
Maximum Capability

Claude Opus 4.5

Most capable, complex reasoning

language_model:
  location: cloud
  provider: anthropic
  model: claude-opus-4-5
  temperature: 0.2
Cost-Effective

Claude Haiku 4.5

Fastest, ideal for simple tasks

language_model:
  location: cloud
  provider: anthropic
  model: claude-haiku-4-5
  temperature: 0.2

🎯 What GEPA Optimizes

Primary Target: System Prompt

GEPA optimizes the system_prompt field — the core instruction guiding agent behavior with Claude.

Note: Claude Agent SDK has 1 optimizable variable. GEPA generates variations, tests each, and selects the best performer.

Expected Improvement

Baseline 70-80%→ 85-92% (+15-20%)
Baseline 80-90%→ 90-95% (+10-15%)
Baseline 90-95%→ 93-98% (+3-8%)

Example Optimization Transformation

Before Optimization:

You are a helpful assistant.

After GEPA:

You are an expert AI assistant specialized in providing accurate, well-structured responses.
When answering:
1. Analyze the question carefully
2. Provide factual, sourced information
3. Use clear formatting with examples
4. Acknowledge uncertainty when appropriate

📋 SuperSpec Playbook

apiVersion: agent/v1
kind: AgentSpec
metadata:
  name: assistant_claude
  id: assistant_claude
  namespace: demo
  version: 1.0.0

spec:
  target_framework: claude-sdk

  language_model:
    location: cloud
    provider: anthropic
    model: claude-sonnet-4-5
    temperature: 0.2

  persona:
    role: AI Assistant
    goal: Provide helpful, accurate responses
    instructions: |
      You are a knowledgeable AI assistant powered by Claude.
      Provide clear, well-structured answers.

  tasks:
    - name: answer_question
      instruction: "Answer the user's question accurately."
      inputs:
        - name: question
          type: str
          required: true
      outputs:
        - name: answer
          type: str

  feature_specifications:
    scenarios:
      - name: Basic question
        input:
          question: "What is machine learning?"
        expected_output:
          expected_keywords:
            - machine
            - learning
            - algorithm

Claude SDK vs Other Frameworks

FeatureClaude SDKOpenAI SDKDSPy
Native MCPNative❌ No❌ No
ReasoningClaude 4.5GPT-4oAny LLM
Ollama Support❌ Cloud onlyYesYes
StreamingAsyncYesLimited
GEPA Optimizationsystem_promptinstructions10+ variables

Best for:

  • MCP-powered tool integrations
  • Claude's advanced reasoning tasks
  • A2A 1.0 endpoints for existing agents
  • Streaming agent interactions
  • Production cloud-based deployments

Consider Other Frameworks:

DSPy

If you need maximum optimization (10+ variables) or local Ollama models

OpenAI SDK

If you want Ollama support and simple handoffs

CrewAI

If you need multi-agent team collaboration

Ready to Build with Claude?

Start building production agents with Claude's advanced reasoning and native MCP support.