Getting Started with Rodger AI

Build your first AI agent in under 10 minutes with our step-by-step guide.

10 min tutorial
Beginner friendly

What You'll Build

A customer support AI agent that can answer questions about your product using your documentation as a knowledge base.

Create AI persona
Add knowledge sources
Test and deploy
1

Create Account & Get API Key

Sign Up

Create your free Rodger AI account to access the platform and dashboard.

Create Free Account

Generate API Key

Once signed in, navigate to your dashboard to generate your first API key.

  1. Go to API Keys in your dashboard
  2. Click "Generate New API Key"
  3. Give it a descriptive name (e.g., "Development Key")
  4. Copy and save the key securely
2

Create Your First AI Agent

Let's create a customer support agent with a helpful personality and specific instructions.

Create Agent with SDK
import { createClient } from '@rodger-ai/sdk';

const client = createClient({
  apiKey: 'your-api-key-here',
  apiUrl: 'https://api.rodger.ai'
});

// Create your first AI agent
const supportAgent = await client.personas.create({
  name: 'Customer Support Agent',
  systemInstructions: `You are a helpful customer support representative. 
    Always be polite, professional, and provide accurate information.
    If you don't know something, admit it and offer to connect the user with a human.`,
  traits: ['helpful', 'professional', 'empathetic'],
  guardrails: {
    blockPii: true,
    maxResponseTokens: 300,
    requireSources: true,
    contentFiltering: 'moderate'
  }
});

console.log('Agent created:', supportAgent.id);

💡 Pro Tip

Start with simple, clear instructions. You can always refine your agent's personality and behavior later as you test it.

3

Add Knowledge Sources

Give your agent access to your documentation, FAQs, or other knowledge sources.

Add Knowledge from URL
// Add your documentation as a knowledge source
const knowledgeSource = await client.knowledge.addSource(supportAgent.id, {
  type: 'url',
  url: 'https://docs.yourcompany.com',
  metadata: {
    title: 'Product Documentation',
    category: 'documentation',
    priority: 'high'
  },
  processingOptions: {
    strategy: 'sentence_window',  // Advanced RAG for better context
    chunkSize: 3,                 // 3 sentences per chunk
    windowSize: 7,                // ±3 sentences context
    refreshInterval: 'daily'      // Auto-update daily
  }
});

// Or add text content directly
const faqSource = await client.knowledge.addSource(supportAgent.id, {
  type: 'text',
  content: `
    Q: How do I reset my password?
    A: Click the "Forgot Password" link on the login page and follow the email instructions.
    
    Q: What payment methods do you accept?
    A: We accept all major credit cards, PayPal, and bank transfers.
  `,
  metadata: {
    title: 'Customer FAQs',
    category: 'faq'
  }
});

Supported Knowledge Types

  • • URLs (documentation, websites)
  • • Text and Markdown content
  • • PDF documents
  • • JSON structured data

Best Practices

  • • Start with your most important docs
  • • Use clear, descriptive titles
  • • Organize by category
  • • Keep content up-to-date
4

Test Your Agent

Now let's test your agent to see how it responds to customer questions.

Query Your Agent
// Test your agent with a customer question
const response = await client.query.send(supportAgent.id, {
  message: 'How do I reset my password?',
  context: {
    userPlan: 'pro',
    previousInteractions: 0
  }
});

console.log('Agent response:', response.answer);
console.log('Sources used:', response.sources);
console.log('Confidence:', response.confidence);

// Example response:
// {
//   answer: "To reset your password, click the 'Forgot Password' link on our login page...",
//   sources: [
//     { title: "Customer FAQs", similarity: 0.95 }
//   ],
//   confidence: 0.92,
//   tokensUsed: 245
// }

✅ What to Look For

  • • Response is relevant and accurate
  • • Agent cites sources from your knowledge base
  • • Tone matches your brand voice
  • • Agent stays within its instructions
5

Deploy & Monitor

Your agent is ready! Now you can integrate it into your applications or deploy it to communication channels.

Monitor Performance

  • • View usage statistics in your dashboard
  • • Monitor response quality and user satisfaction
  • • Track knowledge source effectiveness
  • • Optimize based on real usage patterns