agency-x
Version:
This project is a Claude-compatible, LLM-agnostic sub-agent framework that simulates a complete SaaS product team. It is delivered as a reusable, developer-ready NPM package.
22 lines (18 loc) • 508 B
text/typescript
import Anthropic from '@anthropic-ai/sdk';
import * as dotenv from 'dotenv';
dotenv.config();
const anthropic = new Anthropic({
apiKey: process.env.CLAUDE_API_KEY,
});
export const getClaudeClient = () => {
return {
generate: async (prompt: string) => {
const response = await anthropic.messages.create({
model: 'claude-3-opus-20240229',
max_tokens: 2048,
messages: [{ role: 'user', content: prompt }],
});
return response.content[0].text;
},
};
};