Skip to content

Ismail-2001/AI-Content-Strategy-Agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⚑ StratAI Agent

AI Content Strategy Platform for Bloggers, Brands & Pinterest Marketers


JavaScript HTML5 CSS3 Fonts Netlify License: MIT


"Your SEO strategist, keyword researcher, and editorial director β€” in one agentic system."

StratAI Agent is a premium, agentic content strategy platform built for bloggers, brand managers, and Pinterest marketers. It transforms your niche information into actionable keyword reports, SEO-optimized content outlines, and strategic content calendars β€” through a real-time AI consultation interface with persona-driven intelligence.

No build step. No dependencies. Pure ES6+ in the browser.

🌐 Live Demo Β· ✨ Features Β· πŸ—οΈ Architecture Β· πŸš€ Setup


πŸ“Œ The Content Strategy Problem

Content creators and brand managers face a relentless set of compounding challenges:

  • Keyword research is manually intensive β€” the right tools are expensive and the output requires expert interpretation
  • Content calendars go stale β€” generic planning templates don't adapt to your niche, season, or persona
  • SEO outlines take hours β€” researching H1–H3 hierarchies, meta descriptions, and semantic clusters is a specialist skill
  • Strategy advice is one-size-fits-all β€” a blogger's content strategy is fundamentally different from a brand's or a Pinterest marketer's

StratAI Agent eliminates all four pain points with a persona-aware, agentic AI system that adapts its logic and output to your specific mode of operation.


✨ Key Features

🧠 Three-Persona Strategy Engine

The core differentiator of the system. Toggle between three distinct operational modes in the sidebar β€” the entire AI reasoning logic, response tone, and strategic focus adapts instantly:

Persona Mode Name Strategic Focus
Blogger Niche Alpha Informational intent, topical authority clusters, long-tail keyword targeting
Brand Authority Transactional/commercial intent, thought leadership, brand positioning
Pinterest Marketer Pinterest Mode Visual savability, "Before vs After" formats, board-level audience targeting

The selected persona is persisted to localStorage β€” so your mode is remembered across sessions. Switching persona mid-chat triggers a system message confirming the logic has updated.

πŸ“Š Live Intelligence Dashboard

A real-time strategy overview surfaced on load:

  • Stat Cards: Tracked Keywords (1,248), Organic Reach (42.5K), Content Velocity (12/mo), Domain Authority (48) β€” all with up/down trend indicators
  • SVG Sparkline: Animated market trend curve rendered in pure inline SVG with var(--accent) theming
  • Trending in Your Niche: Live trend classification panel (Exploding / High / Steady)
  • Agent Activity Log: Simulated agent terminal output β€” "> Initializing Blogger heuristic...", "> Scanning SERP landscape...", "> 5 new content gaps identified."
  • Quick Actions: One-click shortcuts to Generate SEO Outline, Find Long-tail KWs, Audit Pinterest Board
  • Campaign Progress Bar: Sidebar progress tracker with percentage display

πŸ” Keyword Research Tool

A full-featured keyword analysis interface:

  • Seed Keyword Input: Enter any seed term and trigger analysis
  • Results Table: Multi-metric keyword report with columns for Keyword, Search Volume, Difficulty Score, Search Intent Badge, and Add Action
  • Intent Classification: Color-coded badges β€” Informational (purple) and Commercial (amber) β€” adapting to the active persona
  • Persona-Aware Volume: Pinterest mode shows High Savability instead of raw volume figures β€” reflecting the platform's different ranking signals

🀝 Agent Consultation Profile

A structured profile intake form that gives the agent the context it needs to personalize its analysis:

  • Primary Niche / Industry β€” free text
  • Target Audience β€” textarea for pain points and demographics
  • Business Objectives β€” select from Attract Traffic, Generate Leads, Direct Sales, Brand Awareness
  • Top Competitors β€” comma-separated URL input for competitive analysis framing

πŸ“… Content Calendar View

Strategic monthly editorial planning:

  • Monthly Theme: Persona-appropriate seasonal theme (e.g., "Sustainable Kickstart")
  • Weekly Content Slots: Day cards with scheduled post titles and contextual metadata
  • Pinterest Integration Notes: When in Pinterest mode, the AI overlays pin creation strategies and board recommendations on top of the standard calendar output

πŸ“ SEO Outline Generator

Full article skeleton generation:

  • Editable Title Field: Enter or modify the target H1
  • Metadata Block: Target keyword, secondary keywords, recommended word count (1500–2000 words), and search intent classification
  • Full Heading Hierarchy: H1 β†’ H2 β†’ H3 structure generated per persona
    • Blogger: Educational / informational hierarchy
    • Brand: Authority-positioning hierarchy with thought leadership framing
    • Pinterest: Visual-first structure with strong visual hooks in each H2
  • Meta Description Template: Pre-formatted with keyword placement and CTA
  • Regenerate: Re-run generation with the same or updated title

πŸ’¬ Persistent AI Strategy Chat

A full conversational interface β€” always visible in the right sidebar panel across all views:

  • Persona-Prefixed Responses: Every AI response begins with [MODE: Blogger] / [MODE: Brand] / [MODE: Pinterest] to make strategic framing explicit
  • Cognitive Thinking Simulation: A three-dot animated thinking bubble appears during the 1.5–2.5s analysis delay β€” creating a genuine agentic feel
  • Typewriter Output: Responses render character-by-character at 15ms/char for immersive read-along effect
  • Intent-Based Routing: The getAIResponse() engine routes queries to specialized handlers:
    • keyword β†’ detailed keyword report with volume, difficulty, CPC, intent, secondary KWs, long-tails, and PAA questions
    • calendar β†’ full monthly editorial plan with weekly breakdowns and platform-specific formatting notes
    • outline β†’ full H1–H2–H3 SEO outline with meta description and word count guidance
    • hello / hi β†’ persona-aware greeting
    • anything else β†’ strategic redirect suggesting keyword reports or outlines
  • Chat History Persistence: Last 50 messages stored in localStorage β€” conversation survives page refresh
  • Input Sanitization: All user input passes through a sanitize() function (DOM-based XSS prevention) before rendering or processing
  • Enter-to-Send: Shift+Enter for newlines, plain Enter submits the message. Blocked during agent thinking state to prevent message collision.

πŸ—οΈ Architecture

Application Structure

StratAI Agent is a single-page application with zero framework dependencies. The entire app renders from three files:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         Browser Runtime                             β”‚
β”‚                                                                     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚   index.html     β”‚  β”‚    style.css     β”‚  β”‚    main.js      β”‚   β”‚
β”‚  β”‚                  β”‚  β”‚                  β”‚  β”‚                 β”‚   β”‚
β”‚  β”‚  β€’ App shell     β”‚  β”‚  β€’ Design system β”‚  β”‚  β€’ Agent state  β”‚   β”‚
β”‚  β”‚  β€’ Sidebar nav   β”‚  β”‚  β€’ CSS variables β”‚  β”‚  β€’ Persona logicβ”‚   β”‚
β”‚  β”‚  β€’ AI chat panel β”‚  β”‚  β€’ Glassmorphism β”‚  β”‚  β€’ View rendererβ”‚   β”‚
β”‚  β”‚  β€’ View containerβ”‚  β”‚  β€’ Animations    β”‚  β”‚  β€’ AI response  β”‚   β”‚
β”‚  β”‚  β€’ Persona selectβ”‚  β”‚  β€’ Typography    β”‚  β”‚  β€’ localStorage β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                                                                     β”‚
β”‚  Static assets: CSS adoptedStyleSheets, inline SVG, Google Fonts   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

State Management

All state lives in main.js β€” no external state management library. Session state is managed through:

State Variable Type Storage Purpose
currentPersona string localStorage Active strategy mode (Blogger, Brand, Pinterest)
chatHistory Array localStorage Last 50 messages β€” persisted across page refreshes
agentThinking boolean In-memory Guard against concurrent message submission

View Rendering Engine

Navigation uses a dynamic view renderer β€” clicking a sidebar nav item calls renderView(viewId), which:

  1. Clears #view-container innerHTML
  2. Creates a new <section> element
  3. Switches on viewId to inject the correct HTML template string (with current persona interpolated)
  4. Appends the section to the container

Views rendered dynamically (injected on nav click):

  • dashboard β€” Re-renders with current persona in welcome banner and agent log
  • consultation β€” Profile intake form
  • keywords β€” Search input + keyword results table
  • calendar β€” Monthly editorial calendar with day cards
  • outlines β€” SEO outline generator with editable H1

Dynamic Styles: View-specific CSS is injected at runtime via document.adoptedStyleSheets β€” keeping style.css clean and view styles co-located with their logic.

AI Response Engine

The getAIResponse(input) function powers all chat responses. It uses keyword-based intent detection on the lowercased user input:

// Intent routing tree (from main.js)
lowerInput.includes('keyword')  β†’ Keyword Analysis Report (persona-aware volume/intent)
lowerInput.includes('calendar') β†’ Strategic Content Calendar (persona-aware formats)
lowerInput.includes('outline')  β†’ SEO Optimized Outline (persona-aware H1 + intent)
lowerInput.includes('hello/hi') β†’ Persona-aware greeting
default                         β†’ Strategic redirect prompt

Each intent handler interpolates the current persona into the response β€” changing intent classification, content formats, volume metrics, and framing based on Blogger / Brand / Pinterest mode.


🎨 Design System

Built entirely in Vanilla CSS with a refined HSL color palette and glassmorphism design language:

Core CSS Variables

var(--accent)          /* Primary purple accent */
var(--glass)           /* Glassmorphism background */
var(--glass-border)    /* Subtle glass border */
var(--text-secondary)  /* Muted text color */

Component Classes

Class Description
.glass Glassmorphism card background β€” backdrop blur + semi-transparent
.text-gradient HSL gradient text for headings
.btn-primary Primary CTA button with accent fill
.btn-secondary Ghost / outline variant
.badge.info Purple intent badge (Informational)
.badge.commercial Amber intent badge (Commercial)
.stat-trend.up Green trending indicator
.stat-trend.neutral Muted neutral indicator
.thinking-bubble Three animated dots for agent thinking state

Typography

  • Outfit (weights: 300, 400, 600, 700) β€” headings and UI labels
  • Inter (weights: 300, 400, 500, 600) β€” body text and chat messages

πŸš€ Getting Started

Prerequisites

This project has zero dependencies and requires no build step. All you need is:

  • A modern web browser (Chrome, Firefox, Safari, Edge)
  • Optionally: a local file server for the best development experience

Option A β€” Open Directly

# Clone the repository
git clone https://github.com/Ismail-2001/AI-Content-Strategy-Agent.git
cd AI-Content-Strategy-Agent

# Open in browser
open index.html           # macOS
start index.html          # Windows
xdg-open index.html       # Linux

Option B β€” Local Server (Recommended)

Using any local server avoids potential CORS quirks with adoptedStyleSheets:

# Using npx serve
npx serve .

# Using Python
python -m http.server 8080

# Using VS Code Live Server extension
# Right-click index.html β†’ Open with Live Server

Then navigate to http://localhost:3000 (or whatever port your server uses).


πŸ’‘ Usage Guide

Switching Persona Mode

Use the "Strategy Mode" dropdown in the left sidebar. Options:

  • Blogger (Niche Alpha) β€” Best for individual bloggers targeting informational long-tail keywords
  • Brand (Authority) β€” Best for companies targeting commercial/transactional terms and thought leadership
  • Pinterest Marketer β€” Best for creators optimizing for saves, boards, and visual content

Persona is saved automatically. Every AI response and tool output will adapt to the selected mode.

Using the AI Chat

The AI Strategy Agent is always visible in the right sidebar. Type any of these to trigger a specific output:

What to type What you get
"keyword research for sustainable living" Full keyword report with volume, difficulty, CPC, intent, secondary KWs, long-tails, PAA
"create a content calendar for February" Monthly calendar with weekly content slots, themes, and Pinterest pin strategy
"generate an outline for zero waste kitchen" Full H1–H2–H3 SEO outline with meta description and word count
"hi" / "hello" Persona-aware greeting with available commands

Navigating Views

Use the left nav to switch between the five strategy tools:

Nav Item View Key Action
πŸ“Š Dashboard Overview Trend monitoring, quick actions, agent log
🀝 Consultation Profile intake Save niche, audience, goals, competitors
πŸ” Keyword Research KW table Enter a seed keyword, analyze results
πŸ“… Content Calendar Editorial plan Browse monthly schedule and week themes
πŸ“ SEO Outlines Article structure Edit the H1 and regenerate the full outline

πŸ“‚ Project Structure

AI-Content-Strategy-Agent/
β”‚
β”œβ”€β”€ index.html          # Application shell β€” sidebar, nav, chat panel, view container
β”œβ”€β”€ main.js             # Core agent logic:
β”‚                       #   β€’ Persona state management + localStorage persistence
β”‚                       #   β€’ Dynamic view rendering engine (renderView)
β”‚                       #   β€’ AI response router (getAIResponse)
β”‚                       #   β€’ Agentic thinking simulation + typewriter output
β”‚                       #   β€’ Input sanitization (XSS protection)
β”‚                       #   β€’ adoptedStyleSheets for dynamic view CSS
β”‚
β”œβ”€β”€ style.css           # Complete design system:
β”‚                       #   β€’ HSL CSS custom properties (color palette)
β”‚                       #   β€’ Glassmorphism component styles
β”‚                       #   β€’ 60fps micro-animations and transitions
β”‚                       #   β€’ Typography (Outfit + Inter)
β”‚                       #   β€’ Responsive layout (sidebar + main + chat panel)
β”‚                       #   β€’ Chat message styles (user / system / thinking-bubble)
β”‚
β”œβ”€β”€ assets/
β”‚   └── hero.png        # AI-generated hero/dashboard imagery
β”‚
└── netlify.toml        # Netlify deployment configuration

🌍 Deployment

Netlify (Recommended β€” One-Click)

The project is pre-configured for Netlify with netlify.toml. Since there's no build step, deployment is instant:

  1. Fork this repository to your GitHub account
  2. Go to Netlify β†’ "Add new site" β†’ "Import from GitHub"
  3. Select this repository
  4. Build settings:
    • Build Command: (leave blank)
    • Publish Directory: . (root)
  5. Click Deploy βœ…

Via Netlify CLI:

npm install -g netlify-cli
netlify login
netlify deploy --prod --dir=.

GitHub Pages

# No build step needed β€” just enable GitHub Pages
# Go to: Settings β†’ Pages β†’ Source: Deploy from branch β†’ Branch: main β†’ / (root)

Any Static Host (Vercel, Cloudflare Pages, Surge.sh)

# Vercel
npx vercel --prod

# Cloudflare Pages β€” connect GitHub repo, publish dir: .

# Surge.sh
npm install -g surge
surge . your-domain.surge.sh

πŸ—ΊοΈ Roadmap

βœ… Phase 1 β€” Core Platform (Complete)

  • Three-persona strategy engine with localStorage persistence
  • Dynamic single-page view rendering (no router library)
  • Live intelligence dashboard with SVG sparklines and stat cards
  • Keyword research table with intent classification badges
  • Agent Consultation profile intake form
  • Content Calendar with monthly theme and weekly day cards
  • SEO outline generator with H1–H2–H3 hierarchy
  • Persistent AI Strategy Chat (last 50 messages in localStorage)
  • Cognitive thinking simulation (animated dots + delay)
  • Typewriter response output at 15ms/char
  • Client-side XSS sanitization on all user inputs
  • adoptedStyleSheets dynamic CSS injection
  • Netlify deployment with netlify.toml

πŸ”¨ Phase 2 β€” Real LLM Integration (Next)

  • Node.js Backend / Netlify Functions: Replace heuristic responses with real LLM tool-calling (OpenAI / DeepSeek / Gemini)
  • Structured Tool Calls: keyword_research(), generate_outline(), build_calendar() as formal LLM tools
  • Dynamic Keyword Data: Real search volume and difficulty data via DataForSEO or Semrush API
  • Export to CSV/PDF: Download keyword reports and content calendars

πŸ“‹ Phase 3 β€” Retrieval & Memory (Planned)

  • RAG for Brand Voice: Upload past articles or brand guidelines β€” the AI learns and mirrors your unique voice
  • Semantic Memory: Long-term user context (niche, audience, competitors) persisted across sessions beyond current session snapshot
  • Competitor Gap Analysis: Scrape and analyze competitor content to find untapped keyword opportunities

πŸ”­ Phase 4 β€” Multi-Agent & Migration (Vision)

  • Multi-Agent Workflows: Keyword Agent β†’ Writer Agent β†’ Editor Agent pipeline for full article production
  • Pinterest API Integration: Real board analytics, pin performance tracking, and trend data
  • Component Architecture Migration: Vite + React for better state management and code splitting as the app scales
  • Team Workspaces: Multi-user access with persona and strategy configuration per team member

🀝 Contributing

Contributions of all kinds are welcome:

  • New AI response intents β€” add new lowerInput.includes('...') branches to getAIResponse() in main.js
  • New view panels β€” add a new case to the renderView() switch and a nav item in index.html
  • Design improvements β€” extend the design system in style.css with new component tokens
  • New persona modes β€” add new <option> values to #persona-select and handle in response logic

To contribute:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature
  3. Commit with Conventional Commits: git commit -m "feat: add Twitter/X persona mode"
  4. Push and open a Pull Request against main

πŸ“„ License

Distributed under the MIT License. See LICENSE for details.


Built for content creators who refuse to guess at strategy.

If StratAI Agent changed how you think about SEO and content planning, star ⭐ the repo.

GitHub Stars

Built with ❀️ by Ismail Sajid

About

An autonomous Agentic AI platform engineered for high-authority content orchestration. Features persona-driven heuristics, cognitive thinking loops, and real-time strategic reasoning for elite SEO growth.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors