
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@krosai/voice-sdk
Advanced tools
Connect any WebRTC voice agent to phone numbers in minutes. Turn your AI voice agent into a phone agent with just 10 lines of code.
npm install @krosai/voice-sdk
import { KrosAI } from '@krosai/voice-sdk';
// Initialize with your API key from https://app.krosai.com/developers
const krosai = new KrosAI({ apiKey: 'kros_live_...' });
// Connect your agent's audio to a phone number
const call = await krosai.call({
phoneNumber: '+14155551234',
audio: myAgentMediaStream, // Your agent's audio output
});
// Handle events
call.on('connected', () => {
console.log('Call connected!');
});
call.on('remoteAudio', (stream) => {
// Feed phone audio to your agent
myAgent.setInputAudio(stream);
});
call.on('ended', (reason) => {
console.log('Call ended:', reason);
});
// Control the call
call.mute(); // Mute your agent
call.unmute(); // Unmute your agent
call.hangup(); // End the call
import { KrosAI } from '@krosai/voice-sdk';
import { useConversation } from '@elevenlabs/react';
function PhoneAgent() {
const krosai = new KrosAI({ apiKey: 'kros_live_...' });
const conversation = useConversation({ agentId: 'your-agent-id' });
async function connectToPhone(phoneNumber: string) {
// Start ElevenLabs conversation
await conversation.startSession();
// Connect to phone
const call = await krosai.call({
phoneNumber,
audio: conversation.getAudioStream(),
});
// Feed phone audio back to ElevenLabs
conversation.setInputAudio(call.getRemoteStream());
call.on('ended', () => conversation.endSession());
}
return (
<button onClick={() => connectToPhone('+14155551234')}>
Connect Agent to Phone
</button>
);
}
import { KrosAI } from '@krosai/voice-sdk';
const krosai = new KrosAI({ apiKey: 'kros_live_...' });
// Get audio from any source
const audioContext = new AudioContext();
const destination = audioContext.createMediaStreamDestination();
const agentStream = destination.stream;
// Connect to phone
const call = await krosai.call({
phoneNumber: '+14155551234',
audio: agentStream,
});
// Get phone audio for your agent
const phoneAudio = call.getRemoteStream();
KrosAIMain SDK client.
const krosai = new KrosAI({
apiKey: string, // Required: Your KrosAI API key
baseUrl?: string, // Optional: API base URL
debug?: boolean, // Optional: Enable debug logging
});
krosai.call(options)Initiate an outbound call.
const call = await krosai.call({
phoneNumber: string, // E.164 format (+14155551234)
audio: MediaStream | AudioSource, // Your agent's audio
metadata?: Record<string, string>, // Optional: Custom metadata
});
CallSessionReturned by call(). Provides call control and events.
Properties:
id: string - Unique call IDphoneNumber: string - Phone number being calledstatus: CallStatus - Current call statusduration: number - Call duration in secondsinputLevel: number - Your agent's audio level (0-1)outputLevel: number - Phone audio level (0-1)isMuted: boolean - Whether your agent is mutedMethods:
mute() - Mute your agent's audiounmute() - Unmute your agent's audiohangup() - End the callgetRemoteStream() - Get phone audio MediaStreamEvents:
statusChange(status) - Call status changedaudioLevel(input, output) - Audio levels updatedremoteAudio(stream) - Phone audio stream availabletranscript(text, isFinal) - Transcript receivederror(error) - Error occurredended(reason) - Call endedinitializing → connecting → ringing → connected → ended
↓ ↓ ↓
failed failed failed
import { KrosAIError } from '@krosai/voice-sdk';
try {
const call = await krosai.call({ ... });
} catch (error) {
if (error instanceof KrosAIError) {
switch (error.code) {
case 'INVALID_API_KEY':
// Handle invalid API key
break;
case 'RATE_LIMIT_EXCEEDED':
// Handle rate limit
break;
case 'INSUFFICIENT_BALANCE':
// Handle low balance
break;
// ... other error codes
}
}
}
kros_live_ or kros_test_)voice:connect scopeMIT
FAQs
Connect any WebRTC voice agent to phone numbers in minutes
We found that @krosai/voice-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.