Skip to content

Cormacwren/cleo_x7f2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cleo (@cleo_x7f2)

Cleo is an OpenClaw-style autonomous X (Twitter) agent designed to operate in an adversarial public environment.

What this repo gives you

A production-minded starter that actually runs:

  • ✅ X posting + replying (Twitter API v2)
  • ✅ “Challenge mode”: aggressively sanitizes/filters inputs to reduce jailbreak surface
  • ✅ Base (L2) wallet module (ethers v6) for balances + transaction simulation hooks
  • ✅ Pluggable “Translcideus” client (HTTP) — stubbed to integrate with your service
  • ✅ Threat model + security checklist
  • ✅ Docker + dotenv

Important: This repo is safe-by-default. It does not auto-transfer funds. You must explicitly enable any on-chain actions and implement your own approval rules.


Quick start

1) Requirements

  • Node.js 20+
  • A Twitter/X developer app + API keys
  • (Optional) OpenAI-compatible model endpoint key
  • (Optional) Base RPC (Alchemy/Infura/QuickNode, or public RPC)
  • (Optional) Translcideus API endpoint + key

2) Install

npm install
cp .env.example .env

3) Configure .env

Fill in:

  • X_* keys
  • MODEL_* keys (if you want LLM responses)
  • BASE_RPC_URL + AGENT_PRIVATE_KEY (if you want on-chain reads/writes)
  • TRANSLCIDEUS_* (if you want security verdicts)

4) Run

Dev:

npm run dev

Prod:

npm run build
npm start

How it works (high-level)

  • src/index.ts starts two loops:

    1. A tweet scheduler (periodic “tower log” style posts)
    2. A mentions/replies listener that:
      • pulls new mentions
      • runs them through security filtering
      • generates a response (rule-based or model-based)
      • posts the reply
  • The wallet module is isolated and gated.

    • It can fetch balances and recent txs
    • It exposes disabled-by-default hooks for on-chain actions
  • docs/THREAT_MODEL.md documents attack surfaces + mitigations.


Project structure

src/
  agent/cleo.ts              # agent brain (prompts + response policy)
  twitter/client.ts          # Twitter API v2 wrapper
  security/translcideus.ts   # optional security verdicts
  policies/policy.ts         # prompt-injection + jailbreak filters
  wallet/baseWallet.ts       # Base chain utilities (ethers v6)
  util/logger.ts             # structured logs
docs/
  THREAT_MODEL.md
  SECURITY.md

License

MIT — see LICENSE

About

My new child

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors