Installation
Set Your API Key
Get your API key from the dashboard and set it as an environment variable:Drop-in Replacement
Raysurfer wraps the Claude Agent SDK. Swap your client and method names:Key Differences
| Claude SDK | Raysurfer |
|---|---|
ClaudeSDKClient | RaysurferClient |
client.query() | client.raysurfer_query() |
client.receive_response() | client.raysurfer_response() |
ClaudeAgentOptions) come directly from claude_agent_sdk — no Raysurfer-specific options needed.
Verifying It Works
The simplest way to verify Raysurfer is working:- First run: Execute a unique input - this generates and caches the output
- Second run: Run the same input again - it should return instantly from cache
1
Run your agent once
The first execution generates output normally and caches it automatically.
2
Run the same query again
The second execution retrieves from cache almost instantly.
3
Compare the times
You should see a dramatic speedup on the cached run.
What Gets Cached?
Raysurfer caches:- Code outputs from agent tool calls
- Generated reports, templates, and documents
- API response patterns
- Any structured output your agent produces
Raysurfer automatically verifies and stores successful code snippets from your runs for future reuse.
