Mission: To autonomously execute personalized B2B sales outreach campaigns, leveraging AI for research, personalization, and execution. Project Hyperion serves as the foundational MVP for the AI agency "Get AI Simplified".
Status: MVP Complete. Ready for initial live campaign execution ("Operation: First Wave").
Hyperion operates through a sequence of stages, orchestrated by a persistent scheduler and powered by AI agents:
-
Sourcing & Enrichment (Milestone 1 - Mocked):
- Prospect data is currently sourced manually (e.g., via CSV export from Apollo.io).
- A utility script (
populate_db.py) loads this data into the local SQLite database. - Future Enhancement: Integrate live Apollo.io API calls for automated sourcing and enrichment.
-
Research & Personalization (Milestone 2 - Complete):
- Employs the "Ultimate Website-First" architecture for generating personalized hooks.
- Agent Workflow:
- (Node 1)
scrape_website: Uses Firecrawl to scrape raw markdown content from the prospect's company website (primary domain). - (Node 2)
synthesize_hook_from_website: Uses Gemini 2.5 Pro and an advanced "v6" prompt template (synthesize_hook_v6.md) to filter the raw website content and generate a single, compelling, verifiable hook. Includes a "fail-safe" mechanism to return "No compelling hook found." if quality criteria aren't met.
- (Node 1)
- Future Enhancement: Implement the "Dual-Pronged" architecture using Tavily for person-centric research alongside the website scrape for maximum relevance and fallback capability.
-
Email Generation (Milestone 2 - Complete):
- Uses Gemini 2.5 Pro and a sophisticated, externalized prompt template (
generate_email.md) incorporating "Anti-Rules" to craft a professional, non-salesy, personalized email based on the generated hook. - Configuration (Agency Name, Value Prop) is loaded from the environment (
.env).
- Uses Gemini 2.5 Pro and a sophisticated, externalized prompt template (
-
Sequencing (Milestone 3 - Stage 5 Complete):
- Database: Uses SQLite (
hyperion.db) to manage prospect data (prospectstable) and sequence state (prospect_sequencestable). The database auto-initializes if the file or tables are missing. - Scheduler (
scheduler.py): A persistent background process that runs continuously.- Wakes up periodically (currently 60 seconds).
- Queries the database for prospects due for an action (
get_due_actions). - For Step 1 actions, invokes the full AI Research Agent.
- Sends emails via Gmail SMTP (
email_sender.py) using secure App Passwords. - Includes a 5-minute pacing delay between sends (
time.sleep(300)). - Updates the prospect's state in the database upon successful send (
update_sequence_after_send).
- Future Enhancement: Implement logic to handle multi-step sequences based on templates stored in the database.
- Database: Uses SQLite (
-
Triage (Milestone 3 - Stage 6 Complete):
- Ingestor (
reply_parser.py): Uses IMAP to connect to the sender's inbox and fetch the 10 most recent unread emails. - Filter: Intelligently filters emails, processing only replies from known prospects present in the
prospectsdatabase table. - Classifier: Uses Gemini 2.5 Pro and a few-shot prompt to classify the intent of qualified replies (
POSITIVE_INTEREST,OBJECTION,QUESTION,NEGATIVE,OUT_OF_OFFICE,UNCATEGORIZED). - Dispatcher:
- Updates the prospect's status to
repliedin the database (stopping further sequences). - If intent is
POSITIVE_INTEREST, sends a notification email to the configuredSENDER_EMAIL.
- Updates the prospect's status to
- Future Enhancement: Build out dispatcher actions for other intents (e.g., adding to a CRM, alerting specific team members).
- Ingestor (
-
Clone the Repository:
git clone <your-repo-url> cd project-hyperion
-
Create Virtual Environment:
python -m venv venv # Activate the environment (macOS/Linux): source venv/bin/activate # Or (Windows): venv\Scripts\activate
-
Install Dependencies:
pip install -r requirements.txt
-
Configure Environment Variables:
- Copy
template.envto a new file named.env. - Fill in the required API keys and configuration values in the
.envfile:GOOGLE_API_KEY: For Gemini models.FIRECRAWL_API_KEY: For website scraping.TAVILY_API_KEY: (Required for future "Dual-Pronged" agent).SERPER_API_KEY: (Used in earlier agent versions, potentially for future tools).SENDER_EMAIL: Your Gmail/Google Workspace email address for sending/receiving.SENDER_APP_PASSWORD: The 16-digit Google App Password forSENDER_EMAIL.AGENCY_NAME: Your agency's name (e.g., "Get AI Simplified").AGENCY_VALUE_PROP: Your agency's value proposition.APOLLO_API_KEY: (Currently unused due to mock data).
- Copy
This procedure executes a live outreach campaign.
-
Prepare Prospect Data:
- Create a
prospects.csvfile in the project root directory. - Ensure it has the necessary columns (see
populate_db.py):First Name,Last Name,Email,Person Linkedin Url,Title,Company Name,Website.
- Create a
-
Populate the Database:
- Run the population script. This reads
prospects.csvand adds the prospects to theprospectstable inhyperion.db.
python populate_db.py
- Run the population script. This reads
-
Clean the Action Queue:
- Run the cleanup script to remove any old test actions.
python clear_sequences.py
-
Start the Scheduler (Terminal 1):
- This process runs continuously. Keep this terminal open.
python scheduler.py
-
Enroll Prospects & Launch (Terminal 2):
- Run the enrollment script. This finds all prospects in the database who aren't yet in a sequence and adds them to the scheduler's queue.
python enroll_all.py
-
Monitor:
- Observe the output in Terminal 1 to see the agent processing prospects.
- Monitor the
SENDER_EMAILaccount's "Sent" folder. - Monitor the
SENDER_EMAILaccount's inbox for replies and triage notifications.
The main.py script is configured for testing the Triage engine:
- Ensure the prospect who will "reply" exists in the database (use
populate_db.pyor manually add). - Manually send a test email from the prospect's address to your
SENDER_EMAIL. - Ensure the test email is unread in the
SENDER_EMAILinbox. - Run the test script:
(Note: The current
python main.py
main.pymay be configured differently based on the last test run. Update as needed.)
- Implement live Apollo.io integration.
- Build out multi-step sequence logic.
- Implement full Action Dispatcher logic for all reply intents.
- Add structured logging and observability (database logging).
- Migrate database to PostgreSQL for production.
- Develop a web UI (Streamlit/Flask).
- Implement AI Guardrails (human approval step).
- Integrate the "Dual-Pronged" research architecture using Tavily.