X Bot: Controlled automation for social media
A Python system that generates content, processes the X timeline and notifications, and keeps every workflow controllable through state, limits, deduplication and a protected dashboard.
- LangGraph workflows
- 4
- scheduled job types
- 5
- separate Docker services
- 2
Problem
Autonomous social-media workflows are more than text generation. The system needs to read sources, assess relevance, prevent repetition, coordinate actions over time and remain observable and stoppable despite relying on external browser automation.
Goal and constraints
The goal was an operable MVP that orchestrates generation, timeline reading, interest scoring, notifications and replies as separate workflows—with persistent state, daily limits and an interface for observation and intervention.
My role and the solution
Independent project: designing and developing the Python architecture, LangGraph workflows, LLM and browser integration, state and storage layer, scheduler, dashboard, containerisation and technical documentation.
System and dependencies
- Four LangGraph workflows for generation, timeline evaluation, notifications and replies
- Five APScheduler jobs for posts, reading, notifications, replies and inspiration-based content
- ChromaDB for similarity search plus JSON and SQLite for runtime state and historical analytics
- Selenium as the encapsulated interface for reading, posting and replying on X
- FastAPI and HTMX dashboard for status, posts, analytics, logs, settings and scheduler control
Key decisions
- Multiple LLM providers sit behind one client while fallbacks remain configurable
- Generated posts pass through similarity detection and a second model-based evaluation gate before posting
- A global execution lock and deduplicated queue prevent scheduler jobs from running concurrently
- Configurable daily limits constrain posts and replies while counters persist across runs
- The authenticated dashboard exposes status and logs and can pause, resume or reconfigure all jobs
Evidenced interim status
The current repository implements the core architecture as one coherent MVP and can run locally or as separate bot and dashboard Docker services. The evidence covers system scope and technical decisions—not reach, business impact or sustained production stability.
Key takeaway: The robust part of an agent system is built outside the prompt: separate workflows, persistent state, bounded actions, observable operation and a concrete way to intervene.
Limits, data, safeguards and operation
- Selenium depends on a changing external interface; selectors, login and platform rules remain operational risks.
- Similarity detection and model evaluation are technical gates, not human approval before every post.
- Reproducible testing, security and long-running operational evidence are still missing from the current repository state.
- Credentials, cookies and dashboard configuration need a hardened secret and deployment strategy before public operation.
RELEVANT TECHNOLOGIES
Python / FastAPI / LangGraph / ChromaDB / Selenium / SQLite / HTMX / Docker