Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

@surf/api

TypeScript/JavaScript SDK for the Surf API.

npm install @surf/api
import { SurfClient } from '@surf/api';

const client = new SurfClient({ apiKey: 'surf_sk_live_your_token_here' });
const posts = await client.feeds.getPosts('surf/topic/technology');

AI Agent

Build autonomous agents that interact with the social web. Requires @anthropic-ai/claude-agent-sdk:

npm install @anthropic-ai/claude-agent-sdk
import { 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.