Soldeed X Bot
Autonomous LangGraph agent for Web3 content
An autonomous Twitter/X bot for Soldeed, a Web3 job board, built with LangGraph. It runs a scheduled pipeline that discovers new companies, writes tweets about them with Claude, picks the best one, posts it, and learns from engagement over time.
Pipeline: discover → decide → generate → judge → post → learn
- 01
Discover
Pulls new companies (last 24h) and recent companies (last 7d) from Soldeed's Postgres DB, checks X for trending Web3 topics, and loads history from local SQLite memory.
- 02
Strategy selector
Picks 2 of 4 content strategies to try this run, based on what data is available and what hasn't been used recently: spotlight (1–2 new companies), roundup (3+ new companies), trend_hook (a trending topic), or salary_story (fallback, data-driven tweet).
- 03
Generators
The 2 selected strategies run in parallel (via LangGraph's Send), each producing one tweet candidate via Claude.
- 04
Judge
An LLM scores every candidate on novelty, hook strength, and predicted engagement, and picks a winner.
- 05
Poster
Posts the winning tweet/thread to X via Tweepy (or just prints it in --dry-run mode).
- 06
Learner
Polls engagement stats on recent posts and reweights strategies (new_weight = 0.7×computed + 0.3×old), so better-performing strategies get picked more often over time.
Key files
- main.py — CLI entry (--dry-run, --live, --strategy X)
- src/graph.py — wires the LangGraph nodes together
- src/state.py — shared AgentState TypedDict passed between nodes
- src/nodes/*.py — one file per pipeline stage
- src/tools/ — Soldeed DB client, X/Tweepy client, Claude LLM factory
- memory.db (SQLite) — 3 tables: posted_log, engagement_memory, strategy_weights
Safety & observability
Designed to be run safely by default — --dry-run prints instead of posting — and supports LangSmith tracing for full observability of each run.