Skip to content

Alkiviades

Agentic AI consultant for strategic communications, political campaigns, and marketing. RAG over political documents and strategy theory. Three-axis modulation.

Deployed at alkiviades.cc — backend on Render, frontend on Cloudflare Pages.


What It Is

A chat interface backed by a RAG pipeline over 2,461 chunks of political and strategic communications knowledge. The agent retrieves context, calls web search for current events, and modulates responses along three axes — ethical, economic alignment, and social freedom.

Built to test whether AI can reason within ideological constraints without fabricating facts.

Architecture

User → FastAPI (SSE) → Agent → RAG (TF-IDF) → DeepSeek API → Response
                              → Tavily Search (web)
                              → Three-Axis Modulation

Axes

Axis -1 1
Ethical No restraint Absolute adherence
Alignment (economic) Right / capitalist Left / socialist
Social freedom Authoritarian Libertarian

Configurable per session. Default: Ethical -1, Alignment +1, Social +1.

Stack

Layer Choice
AI DeepSeek API (deepseek-chat)
Embeddings TF-IDF (numpy, float16/mmap, local, language-agnostic)
RAG 2,461 chunks, cosine similarity, pickle cache
Search Tavily API (agentic function calling)
Backend Python · FastAPI · SQLite · JWT auth · SSE streaming
Frontend Next.js 15 · React 19 · Tailwind · Zustand
Deployment Render (Docker) + Cloudflare Pages (static export)
Knowledge Political party docs (Greek) + strategic comms theory (English)

Run

cd backend
pip install -r requirements.txt
cp secrets.txt.template secrets.txt   # add your DeepSeek + Tavily keys
python run.py                         # CLI

Web UI:

cd frontend && npm install && npm run dev
cd backend && uvicorn app.main:app --reload

Deploy

Backend: Dockerfile builds on Render — pre-builds KB, serves on $PORT. Frontend: Next.js static export (output: "export") deployed to Cloudflare Pages. Domain: alkiviades.cc (Cloudflare DNS) — backend at api.alkiviades.cc, frontend at apex.

Docs

Document Content
AGENTS.md Full system reference — architecture, modules, commands
add.md Architecture decision log — stack rationale, preprocessing pipeline, all decisions
GRAPH_REPORT.md Knowledge graph — 286 nodes, 353 edges, 27 communities

Quality

Prompt injection hardened · source-grounded (RAG + web search) · session persistence · axis-bound output

License

MIT