Skip to navigation

AskClaudeSkill

View as MarkdownOpen in Claude

Send prompts to Anthropic’s Claude AI for complex reasoning, analysis, or sub-tasks that benefit from a dedicated AI query.

Class: AskClaudeSkill

Tools: ask_claude

Env vars: ANTHROPIC_API_KEY

api_key
stringRequired

Anthropic API key. Falls back to the ANTHROPIC_API_KEY environment variable when the config value is not supplied. setup() fails when neither is set.

model
stringDefaults to claude-sonnet-4-5-20250929

The Claude model to use.

max_tokens
numberDefaults to 1024

Maximum tokens in the response.

import { AgentBase, AskClaudeSkill } from '@signalwire/sdk';
const agent = new AgentBase({ name: 'assistant', route: '/assistant' });
agent.setPromptText('You are a helpful assistant.');
await agent.addSkill(new AskClaudeSkill({
model: 'claude-sonnet-4-5-20250929',
max_tokens: 2048,
}));
agent.run();