# SILENT-AI AUTOMATION SETUP GUIDE

**Full Automation: AI Creates Articles → Auto-Uploads to Hostinger → Goes Live!**

Last Updated: November 12, 2025

---

## WHAT WE BUILT

You now have a fully automated content creation system:

1. **Silent-AI Agent** - Uses your OpenAI credits ($25) to write articles
2. **Article Generator** - Creates complete, SEO-optimized HTML articles
3. **FTP Auto-Upload** - Automatically uploads to longevityfutures.online
4. **Full Integration** - Everything works together seamlessly

### How It Works:

```
You: "Create article about NAD+ supplements"
  ↓
Silent-AI: Uses OpenAI to write 2,500-word article
  ↓
Silent-AI: Converts to beautiful HTML with your site design
  ↓
Silent-AI: Uploads to Hostinger via FTP
  ↓
Result: Live article on longevityfutures.online! 🎉
```

---

## QUICK START

### Step 1: Start Silent-AI

```bash
cd C:\Users\Paul\Desktop\longevityfutures-website\silent-ai
python start_api.py
```

You should see:
```
SILENT AI - AGENT-TO-AGENT PRODUCT RESEARCH API
Version: 1.0.0
LLM Provider: openai
LLM Model: gpt-4o-mini
Starting server on http://0.0.0.0:8000
```

### Step 2: Generate Your First Article

Open a new terminal and run:

```bash
cd C:\Users\Paul\Desktop\longevityfutures-website\silent-ai
python test_article_gen.py
```

This will:
- Generate a test article about NAD+ supplements
- Save it to the articles/ folder
- Show you the results

### Step 3: Configure FTP for Auto-Upload

1. Log into your Hostinger control panel
2. Go to FTP Accounts
3. Get your FTP credentials (host, username, password)
4. Edit `silent-ai/.env` file:

```env
FTP_HOST=ftp.longevityfutures.online
FTP_USER=your_username_here
FTP_PASS=your_password_here
```

5. Now articles will auto-upload to your live website!

---

## HOW TO CREATE ARTICLES

### Method 1: Simple API Call

With Silent-AI running, use this URL in your browser:

```
http://localhost:8000/docs
```

This opens the **interactive API documentation** where you can:
- See all available endpoints
- Test article generation with a click
- Customize all parameters

### Method 2: Python Script

Create a file called `create_article.py`:

```python
import requests

response = requests.post(
    "http://localhost:8000/v1/generate-article",
    json={
        "topic": "Best Collagen Supplements for Skin",
        "product_name": "Bubs Naturals Collagen Peptides",
        "affiliate_url": "YOUR_CLICKBANK_LINK_HERE",
        "word_count": 2500,
        "auto_upload": True  # Uploads to Hostinger!
    }
)

print(response.json())
```

Run it: `python create_article.py`

### Method 3: Command Line (curl)

```bash
curl -X POST http://localhost:8000/v1/generate-article \
  -H "Content-Type: application/json" \
  -d '{
    "topic": "Best Sleep Supplements for Longevity",
    "product_name": "Renew Sleep Supplement",
    "word_count": 2500,
    "auto_upload": true
  }'
```

---

## ARTICLE GENERATION OPTIONS

| Parameter | Description | Example |
|-----------|-------------|---------|
| `topic` | Article topic (required) | "Best NAD+ Supplements" |
| `product_name` | Main product to feature | "Bubs Naturals Collagen" |
| `affiliate_url` | ClickBank/affiliate link | Your ClickBank hop link |
| `word_count` | Target length (1000-5000) | 2500 |
| `include_citations` | Add scientific references | true |
| `auto_upload` | Upload to Hostinger | true |

---

## FILE STRUCTURE

```
longevityfutures-website/
├── index.html              ← Homepage
├── css/
│   └── style.css          ← Site styles
├── articles/              ← Articles (generated here!)
│   ├── best-collagen-supplements-2025.html
│   └── [NEW ARTICLES AUTO-SAVED HERE]
├── silent-ai/             ← AI automation system
│   ├── start_api.py       ← Start the API
│   ├── test_article_gen.py ← Test article creation
│   ├── .env               ← Configuration (OpenAI key, FTP)
│   ├── agents/
│   │   └── article_generator.py ← Creates articles
│   ├── utils/
│   │   └── ftp_uploader.py ← Uploads to Hostinger
│   └── api/
│       └── main.py        ← API endpoints
└── AUTOMATION_SETUP_GUIDE.md ← This file!
```

---

## WHAT USES YOUR OPENAI CREDITS

Silent-AI is configured to use **your OpenAI account** (gpt-4o-mini):

- **Cost**: ~$0.50-$1.50 per 2,500-word article
- **Your $25 credit**: Can create 15-50 articles
- **Speed**: 30-60 seconds per article
- **Quality**: Professional, evidence-based health writing

You're using YOUR credits, not paying extra for hosting AI!

---

## NEXT STEPS

### Before Going Live:

1. **Fix Website Issues**
   - [ ] Fix CSS error (line 27)
   - [ ] Create articles.html index page
   - [ ] Create about.html
   - [ ] Create contact.html
   - [ ] Create disclaimer.html

2. **Configure FTP**
   - [ ] Get Hostinger FTP credentials
   - [ ] Add to .env file
   - [ ] Test upload with `auto_upload: true`

3. **Test Article Generation**
   - [ ] Run `python test_article_gen.py`
   - [ ] Check generated article looks good
   - [ ] Verify it matches your site design

4. **Add ClickBank Links**
   - [ ] Get ClickBank affiliate hop links
   - [ ] Use them in `affiliate_url` parameter
   - [ ] Articles will include your affiliate CTAs!

### Going Live - Two Options:

#### Option A: Run Locally (Easiest)

- Keep Silent-AI on your computer
- Generate articles whenever you want
- Articles auto-upload to Hostinger
- **Pros**: Simple, no extra hosting cost
- **Cons**: Need your computer on to create articles

#### Option B: Deploy to PythonAnywhere (Fully Automated)

- Upload Silent-AI to PythonAnywhere (free tier)
- Create articles from anywhere via web
- 100% hands-off automation
- **Pros**: Works 24/7, access from phone
- **Cons**: Slightly more technical setup

---

## CREATING YOUR FIRST 10 ARTICLES

Here are article ideas that match your ClickBank products:

### Articles 6-10 (Next batch):

1. **"NAD+ Supplements: The Anti-Aging Breakthrough Science Says Works"**
   - Product: Research-backed NAD+ supplement
   - ClickBank opportunity

2. **"Best Probiotics for Gut Health and Longevity"**
   - Product: High-quality probiotic
   - Great for Amazon + ClickBank

3. **"How to Reverse Aging: Evidence-Based Strategies That Work"**
   - Product: Joint Genesis or collagen
   - Overview article linking to others

4. **"Best Vitamin D Supplements for Immune Health"**
   - Product: Vitamin D3+K2
   - High search volume

5. **"Omega-3 Supplements: Which Form is Actually Absorbed?"**
   - Product: Quality fish oil
   - Technical, builds authority

### Generate them all:

```python
topics = [
    "NAD+ Supplements: The Anti-Aging Breakthrough",
    "Best Probiotics for Gut Health and Longevity",
    "How to Reverse Aging: Evidence-Based Strategies",
    "Best Vitamin D Supplements for Immune Health",
    "Omega-3 Supplements: Which Form is Absorbed"
]

for topic in topics:
    # Generate each article
    # Takes 2-3 minutes each
    # Uses ~$1 of OpenAI credits each
    # Saves to articles/ folder
```

---

## TROUBLESHOOTING

### "Could not connect to API"

Silent-AI isn't running. Start it:
```bash
cd silent-ai
python start_api.py
```

### "Article generation failed"

1. Check OpenAI credits haven't run out
2. Verify .env has correct API key
3. Check error message for details

### "FTP upload failed"

1. Check FTP credentials in .env
2. Verify Hostinger account is active
3. Try uploading manually first to test

### "Generated article looks wrong"

1. Check css/style.css is working
2. Open generated HTML in browser
3. Verify it matches existing articles

---

## COST BREAKDOWN

### Current Setup (Local):

- **Hosting**: Your existing Hostinger plan
- **AI**: Your $25 OpenAI credits (15-50 articles)
- **Total extra cost**: $0/month!

### With Auto-Upload:

- **Hosting**: Hostinger (you already have)
- **AI Generation**: Your OpenAI credits
- **FTP Upload**: Free (included in hosting)
- **Total extra cost**: $0/month!

### Scaling Up:

When you run out of OpenAI credits:
- **$10/month**: ~20 more articles
- **$20/month**: ~40 more articles
- Still cheaper than hiring writers!

---

## SUPPORT & NEXT STEPS

### Files to Reference:

- **This guide**: How the automation works
- **WHERE_WE_ARE_NOW.md**: Overall project status
- **silent-ai/.env**: Configuration settings
- **test_article_gen.py**: Test article creation

### When You're Ready:

1. Start Silent-AI: `python start_api.py`
2. Run test: `python test_article_gen.py`
3. Check the generated article
4. Configure FTP for auto-upload
5. Start creating content automatically!

---

**Remember: You're using YOUR OpenAI credits, not paying extra for hosting. This is a $0/month automation system!**

Need help? Check the error messages - they're designed to be clear and helpful.

Ready to create articles automatically? Start Silent-AI and run the test!
