Example code

Claude Agent SDK examples: typescript

Open a file to read it highlighted, with links to where the tutorial uses it.

Download all examples (zip)

NameWhat it showsUsed inSize
agent.tsTypeScript demo: a read-only query, then a custom tool defined with Zod.P2 2.8 KB · raw
package.jsonnpm dependencies for the TypeScript demo381 B · raw