Skip to main content

Quick Start

Automate lead generation and company research. Use AGI agents to gather company information, analyze competitors, and extract contact details.

Installation

npm install agi

Company Research

Gather comprehensive company information.
import { AGIClient } from 'agi';

const client = new AGIClient({ apiKey: 'your_api_key' });

const session = await client.createSession('agi-0');
try {
    const companyInfo = await session.runTask(`
        Research company: ${companyName}
        
        Find:
        - Industry and sector
        - Company size (employees)
        - Headquarters location
        - Products/services
        - Key competitors
        - Contact information (email, phone)
        - Key executives
        
        Return as JSON.
    `);
} finally {
    await session.delete();
}

Competitor Analysis

Compare competitors’ products and positioning.
const session = await client.createSession('agi-0');
try {
    const analysis = await session.runTask(`
        Competitive Analysis for: ${companyName}
        
        Competitors: ${competitors.join(', ')}
        
        For each competitor, gather:
        - Products/services
        - Pricing information
        - Target market
        - Key strengths and weaknesses
        
        Return as JSON comparison table.
    `);
} finally {
    await session.delete();
}

Contact Extraction

Extract contact information from websites.
const session = await client.createSession('agi-0-fast');
try {
    const contacts = await session.runTask(`
        Extract contact information from: ${companyUrl}
        
        Find:
        - Email addresses
        - Phone numbers
        - Physical addresses
        - Social media profiles
        
        Return as JSON array.
    `);
} finally {
    await session.delete();
}

Next Steps