Open-source OpenClaw template for running a 5-agent Farcaster content team with Telegram control.
- Opinionated multi-agent setup:
orchestrator(routes work, publishes after approval)strategist(content planning)drafter(draft variants)tone(tone bootstrap and adaptation)engager(reply opportunity scouting)
- Telegram inbound routing to orchestrator
- Neynar skill for Farcaster read/write workflows
- Web scraping skill with JS fallback
- Docker + Railway-friendly deployment
- Copy env file:
cp .env.example .env- Fill required env vars:
OPENROUTER_API_KEYTELEGRAM_BOT_TOKENNEYNAR_API_KEYNEYNAR_SIGNER_UUID
- Optional but recommended:
PROJECT_NAMEFARCASTER_HANDLEFARCASTER_FIDFARCASTER_CHANNEL_ID(optional default channel slug)TELEGRAM_ALLOWED_USER_ID(restrict who can DM the bot)
- Start:
docker compose up --build- Pair your Telegram user (if needed):
openclaw pairing list telegram
openclaw pairing approve telegram <CODE>See .env.example for full list. Key customization points:
PROJECT_NAME: shown in agent naming and scraper user-agentFARCASTER_FID: source account used for one-off tone bootstrapFARCASTER_CHANNEL_ID: default channel slug used for publish/reply when setPRIMARY_MODEL/FALLBACK_MODEL: OpenRouter model selectionRAILWAY_DOMAIN: optional control UI CORS origin (without scheme)
Edit workspaces/orchestrator/KNOWLEDGE.md with your domain facts and messaging.
At startup, this file is synced to all agent workspaces so every agent shares the same context.
Ask the orchestrator:
"Bootstrap tone profile from my cast history (FID )."
The tone agent should fetch historical casts once and write guidance to TONE_PROFILE.md.
- Click the deploy button above (or use the direct link) and create a new Railway project.
- Add a persistent volume and mount it at
/data. - Confirm service port is
8080and set:PORT=8080
- Fill required provider secrets:
OPENROUTER_API_KEYfrom OpenRouter Keys: https://openrouter.ai/keysTELEGRAM_BOT_TOKENfrom BotFather: https://t.me/BotFather- BotFather setup guide: https://core.telegram.org/bots#6-botfather
NEYNAR_API_KEYfrom Neynar dashboard: https://neynar.com/NEYNAR_SIGNER_UUID(create signer + approve once): https://docs.neynar.com/docs/write-to-farcaster-with-signer- Easy option in Neynar dashboard:
Apps->Your App->Agentstab ->Use existing account(copy signer UUID)
- Set optional but recommended Farcaster identity fields:
FARCASTER_HANDLE(without@)FARCASTER_FID(your numeric FID)FARCASTER_CHANNEL_ID(default channel slug)
- Set security/config variables:
SETUP_PASSWORD=${secret(32)}OPENCLAW_GATEWAY_TOKEN=${secret(64)}- These values are editable, but with
${secret(...)}they are auto-generated by Railway at deploy time, so you usually do not need to change them manually. TELEGRAM_ALLOWED_USER_ID=<your telegram numeric user id>(recommended)
- Add
RAILWAY_DOMAINto your generated Railway domain (nohttps://). - Deploy, then open logs and confirm boot finished without missing env errors.
- Pair Telegram only if you did not set
TELEGRAM_ALLOWED_USER_ID:
openclaw pairing list telegram
openclaw pairing approve telegram <CODE>- Send a DM to your bot and bootstrap tone profile first:
- ask:
Bootstrap tone profile from my cast history (FID <your fid>). - then test content planning
- then test draft generation
- then test publish approval flow
- Customize your project context before real usage:
- edit
workspaces/orchestrator/KNOWLEDGE.mdwith your product, audience, voice, and constraints - this file is synced to all agent workspaces at startup
- Orchestrator is the only agent with write actions.
- Publishing should happen only after explicit approval.
- Tone history fetch is one-off bootstrap, not per-request.