New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

rodger

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rodger

CLI tool for Rodger.ai - Build and manage AI agents

latest
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

rodger

Official CLI tool for Rodger.ai - Build and manage AI agents.

Installation

npm install -g rodger

Or use directly with npx:

npx rodger <command>

Quick Start

Create a new agent project:

npx rodger init my-agent
cd my-agent
npm install

Add your API keys to .env:

OPENAI_API_KEY=sk-...

Start development server:

rodger dev

Commands

Core Commands

init [name]

Scaffold a new Rodger agent project.

rodger init my-support-bot

# With template
rodger init my-agent --template knowledge-agent

Available Templates:

  • basic-chat - Simple Q&A chatbot
  • knowledge-agent - Agent with RAG knowledge base
  • tool-agent - Agent with custom tools
  • loan-assistant - Full-featured example

dev

Start the local development server.

rodger dev

# Custom port
rodger dev --port 3001

test <message>

Test your agent with a message.

rodger test "Hello, what can you help with?"

# Stream response
rodger test "Tell me a story" --stream

# With session ID
rodger test "Continue our conversation" --session-id abc123

Knowledge Commands

Manage your agent's knowledge base (Ragie or Zep).

knowledge upload <file>

Upload a document to the knowledge base.

rodger knowledge upload ./docs/faq.pdf

# With metadata
rodger knowledge upload ./docs/guide.txt --metadata '{"category": "support"}'

Supported formats: PDF, TXT, MD, DOCX, and more.

knowledge search <query>

Search the knowledge base.

rodger knowledge search "password reset"

# Limit results
rodger knowledge search "billing" --limit 10

knowledge status <documentId>

Check document processing status.

rodger knowledge status doc_abc123

Guardrails Commands

Test and validate guardrail rules.

guardrails test

Run the guardrail test suite.

rodger guardrails test

# Verbose output
rodger guardrails test --verbose

Tests common violations:

  • PII detection (emails, SSNs, phone numbers)
  • Toxic content
  • Off-topic queries
  • Custom rules

guardrails validate <text>

Validate text against guardrail rules.

rodger guardrails validate "My email is test@example.com"

Environment Variables

Required (at least one)

  • OPENAI_API_KEY - OpenAI API key
  • ANTHROPIC_API_KEY - Anthropic API key

Optional (for knowledge base)

  • RAGIE_API_KEY - Ragie API key
  • ZEP_API_KEY - Zep Cloud API key
  • ZEP_COLLECTION - Zep collection name (default: "default")

Project Structure

After running rodger init, you'll have:

my-agent/
├── agent.config.ts       # Agent configuration
├── app/
│   └── api/
│       └── chat/
│           └── route.ts  # Chat API endpoint
├── package.json
├── .env                  # Environment variables
└── tsconfig.json

Configuration

Edit agent.config.ts to customize your agent:

import { createAgent } from '@rodger/core';

export const agent = createAgent({
  name: 'My Agent',

  llm: {
    provider: 'openai',
    model: 'gpt-4o-mini',
    apiKey: process.env.OPENAI_API_KEY!,
  },

  systemPrompt: 'You are a helpful assistant...',

  // Add knowledge base
  knowledge: {
    provider: 'ragie',
    apiKey: process.env.RAGIE_API_KEY!,
  },

  // Add guardrails
  guardrails: [
    {
      name: 'pii-detection',
      type: 'input',
      // ... config
    },
  ],
});

Examples

Test agent locally

# Quick test
rodger test "Hello!"

# Stream response
rodger test "Write a poem" --stream

# Test with session
rodger test "What's my name?" --session-id user_123

Upload documentation

# Upload support docs
rodger knowledge upload ./docs/faq.pdf

# Upload with metadata
rodger knowledge upload ./docs/v2-guide.md --metadata '{"version": "2.0"}'

Validate guardrails

# Test all guardrails
rodger guardrails test

# Validate specific text
rodger guardrails validate "My SSN is 123-45-6789"

Troubleshooting

Missing API keys

If you see API key errors:

  • Check .env file exists
  • Verify API keys are set correctly
  • Restart dev server after changing .env

TypeScript errors

Make sure you're running from the project root directory where agent.config.ts exists.

Knowledge upload fails

Verify your knowledge provider API key:

# For Ragie
echo $RAGIE_API_KEY

# For Zep
echo $ZEP_API_KEY

Learn More

  • Documentation
  • Examples
  • GitHub

License

MIT

Keywords

rodger

FAQs

Package last updated on 23 Oct 2025

Did you know?

Socket

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.

Install

Related posts