Back to projects

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.

PythonLangGraphClaudeTweepyPostgreSQLSQLiteLangSmith
  1. 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.

  2. 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).

  3. 03

    Generators

    The 2 selected strategies run in parallel (via LangGraph's Send), each producing one tweet candidate via Claude.

  4. 04

    Judge

    An LLM scores every candidate on novelty, hook strength, and predicted engagement, and picks a winner.

  5. 05

    Poster

    Posts the winning tweet/thread to X via Tweepy (or just prints it in --dry-run mode).

  6. 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.

  • 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

Designed to be run safely by default — --dry-run prints instead of posting — and supports LangSmith tracing for full observability of each run.