Spaces:
Running
Running
RemanenetSpy commited on
Commit ·
d29e85f
1
Parent(s): dafb8ed
feat: add pSEO generator, data and template
Browse files- pseo/data.json +34 -0
- pseo/generate_pages.py +142 -0
- pseo/template.html +222 -0
pseo/data.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"frameworks": [
|
| 3 |
+
"LangChain", "LlamaIndex", "AutoGPT", "CrewAI", "AutoGen",
|
| 4 |
+
"ChatGPT Plugins", "Claude API", "Gemini API", "Mistral AI",
|
| 5 |
+
"OpenAI Assistants", "Haystack", "Semantic Kernel", "Flowise",
|
| 6 |
+
"Dify", "AgentGPT", "BabyAGI", "SuperAGI", "Dust", "Vertex AI",
|
| 7 |
+
"AWS Bedrock", "Cohere API", "Ollama", "LM Studio", "PrivateGPT"
|
| 8 |
+
],
|
| 9 |
+
"use_cases": [
|
| 10 |
+
"Customer Support Bot", "Coding Assistant", "Medical Diagnosis AI",
|
| 11 |
+
"Legal Research AI", "Financial Advisor AI", "HR Onboarding Bot",
|
| 12 |
+
"Sales CRM AI", "Educational Tutor AI", "Mental Health Chatbot",
|
| 13 |
+
"Personal AI Assistant", "Research Summarizer", "Document Q&A Bot",
|
| 14 |
+
"Call Center AI", "E-commerce Recommendation AI", "Security Analyst AI",
|
| 15 |
+
"DevOps Incident Response AI", "Content Writing Assistant",
|
| 16 |
+
"Meeting Notes AI", "Email Drafting AI", "Contract Review AI"
|
| 17 |
+
],
|
| 18 |
+
"problems": [
|
| 19 |
+
"AI forgets context between sessions",
|
| 20 |
+
"chatbot loses memory after restart",
|
| 21 |
+
"LLM cannot remember past conversations",
|
| 22 |
+
"AI agent has no long-term memory",
|
| 23 |
+
"vector database not preserving conversation history",
|
| 24 |
+
"RAG system missing temporal context",
|
| 25 |
+
"AI cannot recall user preferences",
|
| 26 |
+
"GPT loses thread after token limit",
|
| 27 |
+
"agent memory resets every session",
|
| 28 |
+
"AI cannot trace cause and effect in conversations"
|
| 29 |
+
],
|
| 30 |
+
"comparisons": [
|
| 31 |
+
"Redis", "Pinecone", "Weaviate", "Chroma", "Qdrant",
|
| 32 |
+
"PostgreSQL", "MongoDB", "Zep", "Mem0", "MemGPT"
|
| 33 |
+
]
|
| 34 |
+
}
|
pseo/generate_pages.py
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Smriti pSEO Page Generator
|
| 3 |
+
Generates hundreds of targeted landing pages from data.json + template.html
|
| 4 |
+
|
| 5 |
+
Usage:
|
| 6 |
+
python generate_pages.py # generates all pages
|
| 7 |
+
python generate_pages.py --batch 50 # generates first 50 (for staged publishing)
|
| 8 |
+
python generate_pages.py --type framework # only framework pages
|
| 9 |
+
"""
|
| 10 |
+
import json, os, re, sys, argparse
|
| 11 |
+
from pathlib import Path
|
| 12 |
+
|
| 13 |
+
BASE = Path(__file__).parent
|
| 14 |
+
DATA = json.loads((BASE / "data.json").read_text())
|
| 15 |
+
TMPL = (BASE / "template.html").read_text()
|
| 16 |
+
OUT = BASE / "pages"
|
| 17 |
+
OUT.mkdir(exist_ok=True)
|
| 18 |
+
|
| 19 |
+
def slug(text):
|
| 20 |
+
return re.sub(r'[^a-z0-9]+', '-', text.lower()).strip('-')
|
| 21 |
+
|
| 22 |
+
def fill(template, tokens):
|
| 23 |
+
for k, v in tokens.items():
|
| 24 |
+
template = template.replace("{{" + k + "}}", v)
|
| 25 |
+
return template
|
| 26 |
+
|
| 27 |
+
# ── PAGE TYPES ────────────────────────────────────────────────────────────────
|
| 28 |
+
|
| 29 |
+
def framework_page(name):
|
| 30 |
+
s = slug(name)
|
| 31 |
+
t = {
|
| 32 |
+
"PAGE_TITLE": f"{name} Persistent Memory — Smriti",
|
| 33 |
+
"META_DESCRIPTION": f"Add long-term, causal memory to {name} using Smriti's dual pgvector architecture. S-V-O extraction. Cross-session retention. O(1) recall.",
|
| 34 |
+
"SLUG": f"memory/{s}",
|
| 35 |
+
"H1_HEADLINE": f"Add Persistent Memory to <span>{name}</span>",
|
| 36 |
+
"HERO_SUBTEXT": f"Give your {name} agent a brain. Smriti adds long-term, causal memory — retaining context across every session, understanding why events happened, not just what happened.",
|
| 37 |
+
"PROBLEM_TEXT": f"{name} agents lose all context when a session ends. Every conversation starts from zero. Users repeat themselves, agents forget preferences, and causal connections between events disappear entirely.",
|
| 38 |
+
"SOLUTION_TEXT": f"Smriti integrates directly with {name} as a drop-in memory layer. It extracts Subject-Verb-Object triples from every interaction, stores them in a dual semantic and episodic pgvector space, and retrieves causal context in O(1) time — across any number of sessions.",
|
| 39 |
+
"HOW_IT_WORKS": f"{name} calls Smriti's memory API before generating any response. Smriti checks its timeline, retrieves relevant causal context, and passes it as structured memory to the {name} prompt. The agent responds with full awareness of past events — not just the last message.",
|
| 40 |
+
"TARGET_NAME": name,
|
| 41 |
+
"TARGET_SLUG": s,
|
| 42 |
+
"COMPARISON_NAME": "Standard Vector DB",
|
| 43 |
+
"SEO_H2_1": f"Why {name} needs long-term memory",
|
| 44 |
+
"SEO_PARA_1": f"{name} is a powerful AI framework but lacks persistent, cross-session memory by default. Each agent run begins with no knowledge of previous interactions. For production applications — customer support, personal assistants, research tools — this is a critical limitation. Smriti solves this by maintaining a chronological memory timeline that persists indefinitely.",
|
| 45 |
+
"SEO_H2_2": f"How Smriti's S-V-O architecture improves {name} agents",
|
| 46 |
+
"SEO_PARA_2": f"Unlike simple vector search that retrieves semantically similar text, Smriti extracts the Subject-Verb-Object structure from every stored memory. This means a {name} agent can answer causal questions: not just 'what happened?' but 'why did it happen?' and 'what was the consequence?' This is the difference between a database and a timeline.",
|
| 47 |
+
"SEO_H2_3": f"Getting started with Smriti and {name}",
|
| 48 |
+
"SEO_PARA_3": f"Smriti installs as a Python package and integrates with {name} in under 10 lines of code. It requires a PostgreSQL instance with pgvector enabled. Memory is stored in two parallel vector spaces — one for semantic meaning, one for episodic cause-and-effect — giving {name} agents both broad recall and precise causal reasoning.",
|
| 49 |
+
}
|
| 50 |
+
return s, t
|
| 51 |
+
|
| 52 |
+
def usecase_page(name):
|
| 53 |
+
s = slug(name)
|
| 54 |
+
t = {
|
| 55 |
+
"PAGE_TITLE": f"{name} with Long-Term Memory — Smriti",
|
| 56 |
+
"META_DESCRIPTION": f"Build a {name} that actually remembers. Smriti adds persistent, causal memory to any AI system — cross-session, encrypted, O(1) retrieval.",
|
| 57 |
+
"SLUG": f"use-case/{s}",
|
| 58 |
+
"H1_HEADLINE": f"Build a <span>{name}</span> That Actually Remembers",
|
| 59 |
+
"HERO_SUBTEXT": f"Most AI-powered {name.lower()} systems forget everything when the session ends. Smriti gives your {name.lower()} a persistent timeline — so it understands context, cause, and consequence.",
|
| 60 |
+
"PROBLEM_TEXT": f"A {name.lower()} that forgets its users is not intelligent — it is a search engine with a chat interface. Every session reset destroys trust, increases user friction, and makes the system feel broken.",
|
| 61 |
+
"SOLUTION_TEXT": f"Smriti gives your {name.lower()} a persistent causal memory. Every interaction is stored as a Subject-Verb-Object triple on a chronological timeline. When a user returns after days or weeks, the system remembers not just what happened — but why.",
|
| 62 |
+
"HOW_IT_WORKS": f"For a {name.lower()}, Smriti stores the full history of every user interaction in a dual pgvector space. When the user asks a question, Smriti retrieves the most causally relevant memories — not just the most recent ones — and passes them to your language model as structured context.",
|
| 63 |
+
"TARGET_NAME": name,
|
| 64 |
+
"TARGET_SLUG": s,
|
| 65 |
+
"COMPARISON_NAME": "Session-Only Memory",
|
| 66 |
+
"SEO_H2_1": f"Why {name.lower()} AI systems fail without long-term memory",
|
| 67 |
+
"SEO_PARA_1": f"The majority of {name.lower()} AI systems today rely on in-session context windows. Once the session ends, all memory is lost. Users are forced to repeat their preferences, history, and background every time they interact. This creates frustration and destroys the value of AI personalization.",
|
| 68 |
+
"SEO_H2_2": f"Smriti's causal memory model for {name.lower()} applications",
|
| 69 |
+
"SEO_PARA_2": f"Smriti does not simply store and retrieve text. It extracts the causal structure of every interaction — who did what, when, and why — and organises these events on a chronological timeline. For a {name.lower()}, this means the AI can answer questions like 'why did this user's situation change?' with real contextual evidence.",
|
| 70 |
+
"SEO_H2_3": f"Technical architecture for {name.lower()} memory with Smriti",
|
| 71 |
+
"SEO_PARA_3": f"Smriti uses a dual pgvector architecture. The semantic space captures meaning and similarity. The episodic space captures temporal ordering and causal relationships. For a {name.lower()}, this means both fuzzy recall ('something about pricing') and precise recall ('the user asked about pricing after their contract expired') are supported simultaneously.",
|
| 72 |
+
}
|
| 73 |
+
return s, t
|
| 74 |
+
|
| 75 |
+
def problem_page(problem):
|
| 76 |
+
s = slug(problem)
|
| 77 |
+
t = {
|
| 78 |
+
"PAGE_TITLE": f"Fix: {problem.capitalize()} — Smriti Memory",
|
| 79 |
+
"META_DESCRIPTION": f"Solving the problem: {problem}. Smriti's S-V-O timeline architecture gives AI systems persistent causal memory across sessions.",
|
| 80 |
+
"SLUG": f"problem/{s}",
|
| 81 |
+
"H1_HEADLINE": f"Why <span>{problem.capitalize()}</span> — And How to Fix It",
|
| 82 |
+
"HERO_SUBTEXT": f"This is not a bug in your AI. It is a fundamental architectural gap. Smriti fills it with a persistent causal memory layer built on dual pgvector and S-V-O extraction.",
|
| 83 |
+
"PROBLEM_TEXT": f"The root cause of '{problem}' is that most AI systems store context in a session-scoped token window — not in a persistent, structured timeline. When the session ends, the context is gone. There is no mechanism for causal recall across time.",
|
| 84 |
+
"SOLUTION_TEXT": f"Smriti replaces the ephemeral context window with a persistent S-V-O timeline. Every interaction is extracted into a Subject-Verb-Object triple and stored in a dual semantic/episodic pgvector space. Sessions end — memory does not.",
|
| 85 |
+
"HOW_IT_WORKS": f"When your AI encounters the situation '{problem}', Smriti's memory layer already has the relevant context indexed. It retrieves it in O(1) time and injects it into the prompt as structured causal memory — no session required.",
|
| 86 |
+
"TARGET_NAME": problem.capitalize(),
|
| 87 |
+
"TARGET_SLUG": s,
|
| 88 |
+
"COMPARISON_NAME": "Session Context Window",
|
| 89 |
+
"SEO_H2_1": f"Root cause: why '{problem}' happens in AI systems",
|
| 90 |
+
"SEO_PARA_1": f"The problem of '{problem}' is endemic to LLM-based systems that store state in the prompt context window rather than in a persistent external memory store. Context windows have hard token limits, are session-scoped, and provide no mechanism for causal reasoning across time. The result is an AI that cannot remember, cannot reason about the past, and cannot maintain continuity.",
|
| 91 |
+
"SEO_H2_2": "The S-V-O timeline: a structural solution",
|
| 92 |
+
"SEO_PARA_2": f"Smriti addresses '{problem}' at the architectural level by replacing the context window as the primary memory store. Instead, every interaction is parsed into a Subject-Verb-Object triple — capturing who did what to whom — and placed on a persistent chronological timeline stored in PostgreSQL with pgvector indexing. This structure enables causal queries that a flat vector store cannot answer.",
|
| 93 |
+
"SEO_H2_3": "Implementation: integrating Smriti to solve this problem",
|
| 94 |
+
"SEO_PARA_3": f"Integrating Smriti to fix '{problem}' requires three steps. First, install the Smriti Python package and configure a pgvector-enabled PostgreSQL database. Second, replace your in-session context injection with Smriti's memory.recall() call, which returns causally-relevant context from the full timeline. Third, use memory.store() after every interaction to keep the timeline current. The fix is additive — no existing code needs to be removed.",
|
| 95 |
+
}
|
| 96 |
+
return s, t
|
| 97 |
+
|
| 98 |
+
# ── GENERATE ─��────────────────────────────────────────────────────────────────
|
| 99 |
+
|
| 100 |
+
def generate_all(page_type=None, batch=None):
|
| 101 |
+
pages = []
|
| 102 |
+
|
| 103 |
+
if page_type in (None, 'framework'):
|
| 104 |
+
for name in DATA['frameworks']:
|
| 105 |
+
s, t = framework_page(name)
|
| 106 |
+
pages.append(('framework', s, t))
|
| 107 |
+
|
| 108 |
+
if page_type in (None, 'usecase'):
|
| 109 |
+
for name in DATA['use_cases']:
|
| 110 |
+
s, t = usecase_page(name)
|
| 111 |
+
pages.append(('usecase', s, t))
|
| 112 |
+
|
| 113 |
+
if page_type in (None, 'problem'):
|
| 114 |
+
for prob in DATA['problems']:
|
| 115 |
+
s, t = problem_page(prob)
|
| 116 |
+
pages.append(('problem', s, t))
|
| 117 |
+
|
| 118 |
+
if batch:
|
| 119 |
+
pages = pages[:batch]
|
| 120 |
+
|
| 121 |
+
total = 0
|
| 122 |
+
for ptype, s, tokens in pages:
|
| 123 |
+
folder = OUT / ptype
|
| 124 |
+
folder.mkdir(exist_ok=True)
|
| 125 |
+
html = fill(TMPL, tokens)
|
| 126 |
+
path = folder / f"{s}.html"
|
| 127 |
+
path.write_text(html, encoding='utf-8')
|
| 128 |
+
print(f"[OK] {ptype}/{s}.html")
|
| 129 |
+
total += 1
|
| 130 |
+
|
| 131 |
+
print(f"\n[DONE] Generated {total} pages -> {OUT}")
|
| 132 |
+
print(f" Frameworks : {len(DATA['frameworks'])}")
|
| 133 |
+
print(f" Use cases : {len(DATA['use_cases'])}")
|
| 134 |
+
print(f" Problems : {len(DATA['problems'])}")
|
| 135 |
+
print(f" TOTAL POSSIBLE : {len(DATA['frameworks'])+len(DATA['use_cases'])+len(DATA['problems'])}")
|
| 136 |
+
|
| 137 |
+
if __name__ == "__main__":
|
| 138 |
+
ap = argparse.ArgumentParser()
|
| 139 |
+
ap.add_argument('--batch', type=int, default=None, help='Only generate first N pages')
|
| 140 |
+
ap.add_argument('--type', choices=['framework','usecase','problem'], default=None)
|
| 141 |
+
args = ap.parse_args()
|
| 142 |
+
generate_all(page_type=args.type, batch=args.batch)
|
pseo/template.html
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8"/>
|
| 5 |
+
<meta name="viewport" content="width=device-width,initial-scale=1.0"/>
|
| 6 |
+
<title>{{PAGE_TITLE}} | Smriti Memory Architecture</title>
|
| 7 |
+
<meta name="description" content="{{META_DESCRIPTION}}"/>
|
| 8 |
+
<meta property="og:title" content="{{PAGE_TITLE}}"/>
|
| 9 |
+
<meta property="og:description" content="{{META_DESCRIPTION}}"/>
|
| 10 |
+
<meta property="og:type" content="article"/>
|
| 11 |
+
<link rel="canonical" href="https://smriti.dev/{{SLUG}}"/>
|
| 12 |
+
<link rel="preconnect" href="https://fonts.googleapis.com"/>
|
| 13 |
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&family=JetBrains+Mono:wght@400;700&display=swap" rel="stylesheet"/>
|
| 14 |
+
<style>
|
| 15 |
+
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
|
| 16 |
+
body{background:#050509;color:#fff;font-family:'Inter',sans-serif;line-height:1.6}
|
| 17 |
+
|
| 18 |
+
/* Nav */
|
| 19 |
+
nav{padding:20px 40px;display:flex;align-items:center;justify-content:space-between;
|
| 20 |
+
border-bottom:1px solid rgba(255,255,255,.06)}
|
| 21 |
+
.logo{font-weight:800;font-size:20px;color:#00f5d4;letter-spacing:-.02em}
|
| 22 |
+
.nav-link{color:rgba(255,255,255,.5);text-decoration:none;font-size:14px;
|
| 23 |
+
transition:color .2s}
|
| 24 |
+
.nav-link:hover{color:#fff}
|
| 25 |
+
|
| 26 |
+
/* Hero */
|
| 27 |
+
.hero{max-width:860px;margin:80px auto 60px;padding:0 40px;text-align:center}
|
| 28 |
+
.badge{display:inline-block;padding:6px 16px;border-radius:20px;font-size:12px;
|
| 29 |
+
font-weight:600;letter-spacing:.1em;text-transform:uppercase;
|
| 30 |
+
background:rgba(0,245,212,.1);color:#00f5d4;border:1px solid rgba(0,245,212,.2);
|
| 31 |
+
margin-bottom:28px}
|
| 32 |
+
h1{font-size:clamp(32px,5vw,56px);font-weight:800;line-height:1.15;
|
| 33 |
+
letter-spacing:-.03em;margin-bottom:24px}
|
| 34 |
+
h1 span{color:#00f5d4}
|
| 35 |
+
.hero-sub{font-size:20px;font-weight:300;color:rgba(255,255,255,.65);
|
| 36 |
+
max-width:620px;margin:0 auto 40px}
|
| 37 |
+
.cta-row{display:flex;gap:16px;justify-content:center;flex-wrap:wrap}
|
| 38 |
+
.btn-primary{padding:14px 32px;border-radius:10px;font-size:16px;font-weight:600;
|
| 39 |
+
background:#00f5d4;color:#050509;text-decoration:none;transition:.2s}
|
| 40 |
+
.btn-primary:hover{background:#00d4b8}
|
| 41 |
+
.btn-ghost{padding:14px 32px;border-radius:10px;font-size:16px;font-weight:600;
|
| 42 |
+
border:1px solid rgba(255,255,255,.15);color:#fff;text-decoration:none;
|
| 43 |
+
transition:.2s}
|
| 44 |
+
.btn-ghost:hover{border-color:rgba(255,255,255,.4)}
|
| 45 |
+
|
| 46 |
+
/* Stats */
|
| 47 |
+
.stats{display:flex;gap:40px;justify-content:center;padding:40px;flex-wrap:wrap;
|
| 48 |
+
border-top:1px solid rgba(255,255,255,.06);border-bottom:1px solid rgba(255,255,255,.06)}
|
| 49 |
+
.stat{text-align:center}
|
| 50 |
+
.stat-num{font-size:36px;font-weight:800;color:#00f5d4}
|
| 51 |
+
.stat-label{font-size:13px;color:rgba(255,255,255,.45);margin-top:4px}
|
| 52 |
+
|
| 53 |
+
/* Content */
|
| 54 |
+
.content{max-width:860px;margin:0 auto;padding:60px 40px}
|
| 55 |
+
h2{font-size:28px;font-weight:800;margin:48px 0 16px;letter-spacing:-.02em}
|
| 56 |
+
h2:first-child{margin-top:0}
|
| 57 |
+
p{color:rgba(255,255,255,.72);margin-bottom:16px;font-size:17px}
|
| 58 |
+
.highlight{color:#fff;font-weight:600}
|
| 59 |
+
|
| 60 |
+
/* Problem / Solution boxes */
|
| 61 |
+
.card{background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.07);
|
| 62 |
+
border-radius:14px;padding:28px;margin:24px 0}
|
| 63 |
+
.card.problem{border-color:rgba(255,48,120,.2);background:rgba(255,48,120,.04)}
|
| 64 |
+
.card.solution{border-color:rgba(0,245,212,.2);background:rgba(0,245,212,.04)}
|
| 65 |
+
.card-label{font-size:12px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;
|
| 66 |
+
margin-bottom:12px}
|
| 67 |
+
.card.problem .card-label{color:#ff3066}
|
| 68 |
+
.card.solution .card-label{color:#00f5d4}
|
| 69 |
+
.card p{margin:0;color:rgba(255,255,255,.8)}
|
| 70 |
+
|
| 71 |
+
/* Code block */
|
| 72 |
+
.code-block{background:#0a0a12;border:1px solid rgba(255,255,255,.08);border-radius:10px;
|
| 73 |
+
padding:24px;margin:24px 0;overflow-x:auto}
|
| 74 |
+
.code-block code{font-family:'JetBrains Mono',monospace;font-size:14px;
|
| 75 |
+
color:#00f5d4;line-height:1.7}
|
| 76 |
+
.code-comment{color:rgba(255,255,255,.3)}
|
| 77 |
+
|
| 78 |
+
/* Comparison table */
|
| 79 |
+
.compare-table{width:100%;border-collapse:collapse;margin:24px 0;font-size:15px}
|
| 80 |
+
.compare-table th{padding:14px 20px;text-align:left;font-weight:600;font-size:12px;
|
| 81 |
+
text-transform:uppercase;letter-spacing:.1em;
|
| 82 |
+
color:rgba(255,255,255,.4);border-bottom:1px solid rgba(255,255,255,.08)}
|
| 83 |
+
.compare-table td{padding:14px 20px;border-bottom:1px solid rgba(255,255,255,.04)}
|
| 84 |
+
.compare-table tr:last-child td{border-bottom:none}
|
| 85 |
+
.tick{color:#00f5d4;font-weight:700}
|
| 86 |
+
.cross{color:#ff3066}
|
| 87 |
+
.col-smriti{background:rgba(0,245,212,.04)}
|
| 88 |
+
|
| 89 |
+
/* Footer */
|
| 90 |
+
footer{padding:40px;text-align:center;border-top:1px solid rgba(255,255,255,.06);
|
| 91 |
+
color:rgba(255,255,255,.3);font-size:14px;margin-top:80px}
|
| 92 |
+
footer a{color:#00f5d4;text-decoration:none}
|
| 93 |
+
|
| 94 |
+
/* SEO article (visible to Google, subtle to users) */
|
| 95 |
+
.seo-article{max-width:860px;margin:0 auto;padding:0 40px 60px;
|
| 96 |
+
color:rgba(255,255,255,.45);font-size:15px}
|
| 97 |
+
.seo-article h3{font-size:18px;font-weight:600;color:rgba(255,255,255,.6);
|
| 98 |
+
margin:32px 0 12px}
|
| 99 |
+
</style>
|
| 100 |
+
</head>
|
| 101 |
+
<body>
|
| 102 |
+
|
| 103 |
+
<!-- Navigation -->
|
| 104 |
+
<nav>
|
| 105 |
+
<span class="logo">smriti</span>
|
| 106 |
+
<a href="/docs" class="nav-link">Docs</a>
|
| 107 |
+
</nav>
|
| 108 |
+
|
| 109 |
+
<!-- Hero -->
|
| 110 |
+
<section class="hero">
|
| 111 |
+
<div class="badge">Memory Architecture</div>
|
| 112 |
+
<h1>{{H1_HEADLINE}}</h1>
|
| 113 |
+
<p class="hero-sub">{{HERO_SUBTEXT}}</p>
|
| 114 |
+
<div class="cta-row">
|
| 115 |
+
<a href="/docs/quickstart" class="btn-primary">Read the Docs</a>
|
| 116 |
+
<a href="/node97" class="btn-ghost">Watch Explainer</a>
|
| 117 |
+
</div>
|
| 118 |
+
</section>
|
| 119 |
+
|
| 120 |
+
<!-- Stats -->
|
| 121 |
+
<div class="stats">
|
| 122 |
+
<div class="stat"><div class="stat-num">O(1)</div><div class="stat-label">Connection Retrieval</div></div>
|
| 123 |
+
<div class="stat"><div class="stat-num">S-V-O</div><div class="stat-label">Extraction Engine</div></div>
|
| 124 |
+
<div class="stat"><div class="stat-num">Dual</div><div class="stat-label">pgvector Architecture</div></div>
|
| 125 |
+
<div class="stat"><div class="stat-num">∞</div><div class="stat-label">Context Retention</div></div>
|
| 126 |
+
</div>
|
| 127 |
+
|
| 128 |
+
<!-- Main Content -->
|
| 129 |
+
<div class="content">
|
| 130 |
+
|
| 131 |
+
<div class="card problem">
|
| 132 |
+
<div class="card-label">The Problem</div>
|
| 133 |
+
<p>{{PROBLEM_TEXT}}</p>
|
| 134 |
+
</div>
|
| 135 |
+
|
| 136 |
+
<div class="card solution">
|
| 137 |
+
<div class="card-label">The Smriti Solution</div>
|
| 138 |
+
<p>{{SOLUTION_TEXT}}</p>
|
| 139 |
+
</div>
|
| 140 |
+
|
| 141 |
+
<h2>How It Works with {{TARGET_NAME}}</h2>
|
| 142 |
+
<p>{{HOW_IT_WORKS}}</p>
|
| 143 |
+
|
| 144 |
+
<div class="code-block">
|
| 145 |
+
<code>
|
| 146 |
+
<span class="code-comment"># Install Smriti</span>
|
| 147 |
+
pip install smriti
|
| 148 |
+
|
| 149 |
+
<span class="code-comment"># Initialize with {{TARGET_SLUG}}</span>
|
| 150 |
+
from smriti import SmritiMemory
|
| 151 |
+
|
| 152 |
+
memory = SmritiMemory(
|
| 153 |
+
backend="pgvector",
|
| 154 |
+
mode="dual", <span class="code-comment"># semantic + episodic</span>
|
| 155 |
+
svo_extraction=True <span class="code-comment"># auto S-V-O tagging</span>
|
| 156 |
+
)
|
| 157 |
+
|
| 158 |
+
<span class="code-comment"># Store any interaction</span>
|
| 159 |
+
memory.store("User bought flowers on Tuesday")
|
| 160 |
+
|
| 161 |
+
<span class="code-comment"># Retrieve with causal context</span>
|
| 162 |
+
result = memory.recall("why did we argue on Friday?")
|
| 163 |
+
<span class="code-comment"># Returns: Tuesday → flowers → context → Friday</span>
|
| 164 |
+
</code>
|
| 165 |
+
</div>
|
| 166 |
+
|
| 167 |
+
<h2>Smriti vs {{COMPARISON_NAME}}</h2>
|
| 168 |
+
<table class="compare-table">
|
| 169 |
+
<thead>
|
| 170 |
+
<tr>
|
| 171 |
+
<th>Feature</th>
|
| 172 |
+
<th>{{COMPARISON_NAME}}</th>
|
| 173 |
+
<th class="col-smriti">Smriti</th>
|
| 174 |
+
</tr>
|
| 175 |
+
</thead>
|
| 176 |
+
<tbody>
|
| 177 |
+
<tr>
|
| 178 |
+
<td>Long-term memory</td>
|
| 179 |
+
<td><span class="cross">Partial</span></td>
|
| 180 |
+
<td class="col-smriti"><span class="tick">Full timeline</span></td>
|
| 181 |
+
</tr>
|
| 182 |
+
<tr>
|
| 183 |
+
<td>Causal context (A caused B)</td>
|
| 184 |
+
<td><span class="cross">No</span></td>
|
| 185 |
+
<td class="col-smriti"><span class="tick">S-V-O graph</span></td>
|
| 186 |
+
</tr>
|
| 187 |
+
<tr>
|
| 188 |
+
<td>Cross-session retention</td>
|
| 189 |
+
<td><span class="cross">Session only</span></td>
|
| 190 |
+
<td class="col-smriti"><span class="tick">Persistent</span></td>
|
| 191 |
+
</tr>
|
| 192 |
+
<tr>
|
| 193 |
+
<td>Encrypted memory blocks</td>
|
| 194 |
+
<td><span class="cross">No</span></td>
|
| 195 |
+
<td class="col-smriti"><span class="tick">Block-level</span></td>
|
| 196 |
+
</tr>
|
| 197 |
+
<tr>
|
| 198 |
+
<td>Query speed</td>
|
| 199 |
+
<td>O(n) scan</td>
|
| 200 |
+
<td class="col-smriti"><span class="tick">O(1) via index</span></td>
|
| 201 |
+
</tr>
|
| 202 |
+
</tbody>
|
| 203 |
+
</table>
|
| 204 |
+
|
| 205 |
+
</div>
|
| 206 |
+
|
| 207 |
+
<!-- SEO Article (crawlable text) -->
|
| 208 |
+
<article class="seo-article">
|
| 209 |
+
<h3>{{SEO_H2_1}}</h3>
|
| 210 |
+
<p>{{SEO_PARA_1}}</p>
|
| 211 |
+
<h3>{{SEO_H2_2}}</h3>
|
| 212 |
+
<p>{{SEO_PARA_2}}</p>
|
| 213 |
+
<h3>{{SEO_H2_3}}</h3>
|
| 214 |
+
<p>{{SEO_PARA_3}}</p>
|
| 215 |
+
</article>
|
| 216 |
+
|
| 217 |
+
<footer>
|
| 218 |
+
Built by <a href="/">Chronos OS</a> · Smriti Memory Architecture · Node 97
|
| 219 |
+
</footer>
|
| 220 |
+
|
| 221 |
+
</body>
|
| 222 |
+
</html>
|