Daily scraping of company databases, enrichment via APIs.
Custom scoring algorithm ranks leads by fit criteria.
Qualified leads pushed to CRM, sales alerted via Slack/Telegram.
Lead Generation Agent Template
This template describes the architecture for a lead generation agent on osModa. The agent scrapes company databases on a daily schedule, enriches profiles with additional data from external APIs, scores each lead against your fit criteria, pushes qualified leads to your CRM, and alerts your sales team via Slack or Telegram when high-priority leads are identified.
This is an architecture pattern, not a downloadable tool. It describes the osModa daemons your lead gen agent would use — osmoda-routines for daily scheduling, osmoda-egress for controlling which APIs the agent can access, osModa memory tools for lead storage, and osmoda-watch for process reliability. You write the scraping, enrichment, and scoring logic; the osModa platform handles scheduling, access control, and crash recovery.
TL;DR
- • Daily scraping of company databases via osmoda-routines cron scheduling
- • Profile enrichment via external APIs, access-controlled by osmoda-egress
- • Custom lead scoring with storage in osModa memory tools
- • Automatic CRM push for qualified leads (HubSpot, Salesforce, Pipedrive, etc.)
- • Sales team alerts via Slack or Telegram when high-priority leads are found
- • Recommended plan: Pro ($34.99/mo)
Architecture Diagram
The data flow for a lead generation agent on osModa.
┌──────────────────────────────────────────┐
│ osmoda-routines (DAILY CRON) │
│ triggers lead gen pipeline │
└──────────────────┬───────────────────────┘
▼
┌──────────────────────────────────────────┐
│ COMPANY SCRAPER │
│ scrape company databases / directories │
│ via osmoda-egress allowlisted domains │
└──────────────────┬───────────────────────┘
▼
┌──────────────────────────────────────────┐
│ PROFILE ENRICHER │
│ call enrichment APIs (Clearbit, etc.) │
│ via osmoda-egress allowlisted endpoints │
└──────────────────┬───────────────────────┘
▼
┌──────────────────────────────────────────┐
│ LEAD SCORER │
│ score leads by fit criteria │
│ (company size, industry, tech stack) │
└──────────┬───────────────┬───────────────┘
│ │
▼ ▼
┌────────────────┐ ┌─────────────────────┐
│ HIGH SCORE │ │ LOW SCORE │
│ push to CRM │ │ store in memory │
│ alert sales │ │ for nurture seq. │
└────────┬───────┘ └─────────────────────┘
│
┌────┴────┐
▼ ▼
┌────────┐ ┌───────────────┐
│ CRM │ │ SALES ALERT │
│ API │ │ Slack/Telegram │
└────────┘ └───────────────┘
┌──────────────────────────────────────────┐
│ MEMORY TOOLS (osModa) │
│ store all leads + scores + metadata │
└──────────────────────────────────────────┘
┌──────────────────────────────────────────┐
│ AUDIT LEDGER (agentd) │
│ logs every scrape, enrichment, push │
└──────────────────────────────────────────┘Components
The building blocks of this lead generation architecture.
Company Scraper
Scrapes company directories, LinkedIn company pages, product listings, or any public data source. Runs through osmoda-egress to ensure only allowlisted domains are accessed.
Profile Enricher
Calls external enrichment APIs to add company size, revenue, tech stack, funding history, and employee count to each lead profile. API access controlled by osmoda-egress domain allowlisting.
Lead Scorer
Your custom scoring algorithm that evaluates each lead against your ideal customer profile criteria. Assigns a numeric score and categorizes leads as high-priority, medium, or nurture.
CRM Pusher
Pushes qualified leads to your CRM (HubSpot, Salesforce, Pipedrive, Close.io) via their APIs. Creates contacts, adds enrichment data, and assigns to the right sales rep based on territory or vertical.
Sales Alert System
Sends formatted notifications to a Slack channel or Telegram group when high-priority leads are identified. Includes key details: company name, score, enrichment summary, and CRM link.
Lead Memory Store
All leads (scored and unscored) are stored using osModa memory tools. Supports both vector search (find similar companies) and keyword search (filter by industry, size, location). Persists across restarts.
osModa Features Used
The specific daemons and platform capabilities this template relies on.
osmoda-routines
Schedules the daily lead gen pipeline. Triggers scraping, enrichment, scoring, and CRM push in sequence. Logs each run to the audit ledger.
osmoda-egress
Controls which external APIs the agent can access. Allowlists company databases, enrichment APIs, and CRM endpoints. Blocks everything else.
Memory tools (vector + keyword)
Stores all lead profiles with enrichment data and scores. Vector search finds similar companies. Keyword search filters by attributes. Persists across process restarts and server reboots.
Multi-channel alerts
Sends lead notifications via Slack, Telegram, or any configured channel. Your sales team gets real-time alerts when high-priority leads are identified.
Step-by-Step Setup
How to implement this architecture pattern on your osModa server.
- 1
Spawn a Pro server and SSH in
Go to spawn.os.moda and create a Pro server ($34.99/mo). SSH in with your key. All 9 daemons are already running.
- 2
Configure osmoda-egress allowlist
Add the domains your agent needs: company database URLs, enrichment API endpoints (Clearbit, Apollo, etc.), and your CRM API endpoint (api.hubspot.com, etc.).
- 3
Build the scraping and enrichment pipeline
Write your scraper for the target company databases. Build the enrichment stage that calls external APIs to fill in additional profile data. Store API credentials using osModa secrets management.
- 4
Implement lead scoring logic
Define your ideal customer profile criteria and build the scoring algorithm. Common signals: company size, industry vertical, tech stack, funding stage, geographic location, and growth indicators.
- 5
Connect CRM and alert channels
Configure CRM API integration for pushing qualified leads. Set up Slack webhook or Telegram bot for sales notifications. Test the full pipeline end-to-end before scheduling.
- 6
Schedule the daily run
Set up an osmoda-routines cron job for your preferred schedule (e.g., daily at 6 AM). Register the pipeline process with osmoda-watch for crash recovery.
Recommended Plan
Lead gen agents maintain growing databases, run concurrent API calls for enrichment, and need memory for scoring and deduplication.
Pro — $34.99/mo
4 CPU · 8 GB RAM · 80 GB disk
Recommended for lead gen agents that scrape multiple sources, run enrichment APIs, and maintain a growing lead database. The 8 GB RAM handles concurrent API calls and in-memory scoring. 80 GB disk stores your lead history.
Frequently Asked Questions
Is this a downloadable lead generation tool?
No. This is an architecture pattern that describes how to design a lead generation agent on osModa. It maps the data flow from company databases through enrichment, scoring, and CRM push stages, and identifies which osModa daemons handle each phase. You build the agent yourself on your osModa server following this blueprint.
How does the lead scoring work?
Lead scoring is implemented in your agent code. The architecture pattern uses osModa memory tools to store lead profiles with metadata (company size, industry, tech stack, funding stage). Your scoring algorithm assigns a numeric score based on fit criteria you define. High-scoring leads get pushed to CRM immediately; lower-scoring leads are stored for nurturing sequences. The scoring logic is entirely yours to customize.
Which CRM systems can the agent integrate with?
Any CRM with an API. Your osModa server has full root SSH access and can run any software. Common integrations include HubSpot, Salesforce, Pipedrive, and Close.io. The agent calls the CRM API through osmoda-egress (which allowlists the CRM domain) to push qualified leads. You configure the API credentials using the secrets management tools.
How does osmoda-egress control API access?
osmoda-egress is a domain allowlisting proxy. You define which external domains the agent can reach — the company databases it scrapes, the enrichment APIs it calls, and the CRM endpoint it pushes to. Any request to a domain not on the allowlist is blocked. This prevents the agent from accessing unauthorized resources or leaking data to unapproved endpoints.
How frequently does the agent scrape for new leads?
You define the schedule using osmoda-routines. A daily morning scrape is common for lead gen agents, but you can configure any cron expression: hourly, twice daily, weekly, or event-triggered. osmoda-routines handles the scheduling, and osmoda-watch ensures the scraper process recovers if it crashes mid-run.
What plan is recommended for lead generation agents?
Pro ($34.99/mo, 4 CPU, 8 GB RAM, 80 GB disk) is recommended because lead gen agents typically run enrichment processing, maintain a growing database of leads, and make multiple concurrent API calls. If your lead database is small and you are scraping a single source, Solo ($14.99/mo) may be sufficient.
Build Your Lead Gen Agent on osModa
Spawn a dedicated server with osmoda-routines for scheduling, osmoda-egress for API access control, and memory tools for lead storage. From $34.99/month.
Last updated: March 2026