"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
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.
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.
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
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) andCommercial(amber) β adapting to the active persona - Persona-Aware Volume: Pinterest mode shows
High Savabilityinstead of raw volume figures β reflecting the platform's different ranking signals
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
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
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
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 questionscalendarβ full monthly editorial plan with weekly breakdowns and platform-specific formatting notesoutlineβ full H1βH2βH3 SEO outline with meta description and word count guidancehello/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+Enterfor newlines, plainEntersubmits the message. Blocked during agent thinking state to prevent message collision.
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 β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
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 |
Navigation uses a dynamic view renderer β clicking a sidebar nav item calls renderView(viewId), which:
- Clears
#view-containerinnerHTML - Creates a new
<section>element - Switches on
viewIdto inject the correct HTML template string (with current persona interpolated) - Appends the section to the container
Views rendered dynamically (injected on nav click):
dashboardβ Re-renders with current persona in welcome banner and agent logconsultationβ Profile intake formkeywordsβ Search input + keyword results tablecalendarβ Monthly editorial calendar with day cardsoutlinesβ 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.
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 promptEach intent handler interpolates the current persona into the response β changing intent classification, content formats, volume metrics, and framing based on Blogger / Brand / Pinterest mode.
Built entirely in Vanilla CSS with a refined HSL color palette and glassmorphism design language:
var(--accent) /* Primary purple accent */
var(--glass) /* Glassmorphism background */
var(--glass-border) /* Subtle glass border */
var(--text-secondary) /* Muted text color */| 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 |
- Outfit (weights: 300, 400, 600, 700) β headings and UI labels
- Inter (weights: 300, 400, 500, 600) β body text and chat messages
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
# 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 # LinuxUsing 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 ServerThen navigate to http://localhost:3000 (or whatever port your server uses).
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.
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 |
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 |
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
The project is pre-configured for Netlify with netlify.toml. Since there's no build step, deployment is instant:
- Fork this repository to your GitHub account
- Go to Netlify β "Add new site" β "Import from GitHub"
- Select this repository
- Build settings:
- Build Command: (leave blank)
- Publish Directory:
.(root)
- Click Deploy β
Via Netlify CLI:
npm install -g netlify-cli
netlify login
netlify deploy --prod --dir=.# No build step needed β just enable GitHub Pages
# Go to: Settings β Pages β Source: Deploy from branch β Branch: main β / (root)# Vercel
npx vercel --prod
# Cloudflare Pages β connect GitHub repo, publish dir: .
# Surge.sh
npm install -g surge
surge . your-domain.surge.sh- Three-persona strategy engine with
localStoragepersistence - 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
-
adoptedStyleSheetsdynamic CSS injection - Netlify deployment with
netlify.toml
- 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
- 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
- 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
Contributions of all kinds are welcome:
- New AI response intents β add new
lowerInput.includes('...')branches togetAIResponse()inmain.js - New view panels β add a new
caseto therenderView()switch and a nav item inindex.html - Design improvements β extend the design system in
style.csswith new component tokens - New persona modes β add new
<option>values to#persona-selectand handle in response logic
To contribute:
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Commit with Conventional Commits:
git commit -m "feat: add Twitter/X persona mode" - Push and open a Pull Request against
main
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.
Built with β€οΈ by Ismail Sajid