TypeScript/JavaScript SDK for the Surf API.
npm install @surf/apiimport { SurfClient } from '@surf/api';
const client = new SurfClient({ apiKey: 'surf_sk_live_your_token_here' });
const posts = await client.feeds.getPosts('surf/topic/technology');Build autonomous agents that interact with the social web. Requires @anthropic-ai/claude-agent-sdk:
npm install @anthropic-ai/claude-agent-sdkimport { SurfAgent } from '@surf/api';
const agent = new SurfAgent({ surfApiKey: 'surf_sk_live_your_token' });
const result = await agent.run(
'Find the top AI feeds on Surf and summarize the latest posts'
);
console.log(result.text);By default only read-only tools are enabled. To allow posting, favouriting, and feed creation:
const agent = new SurfAgent({ surfApiKey: '...', allowWrites: true });All Claude compute runs on your Agent SDK credit.