TrueCastAgent powers the TrueCast mini app on Farcaster, a new way to participate in prediction markets that's fast, social & onchain.
- Daily notifications for trending prediction markets from TrueMarkets
- Quick bets directly from the social feed
- Notifications upon market resolutions and easy reward claims
- Activity feed leveraging the social graph
Built with CDP AgentKit, automates several key functions:
- Maintains up-to-date onchain information of prediction markets
- Categorizes markets (politics/sports/etc.)
- Selects daily featured markets considering liquidity + latest news relevance
- Posts market analysis on Farcaster
- Makes automated bets using a $100 monthly allowance from a Safe wallet via 0x
Code: myAgent/
A news aggregator for fact-checking and verified insights that aggregates real-time data sources and grounds them by prediction market odds:
- Orchestrator model selects optimal data sources (Perplexity, X AI + Neynar, DeFiLlama, TrueMarkets)
- AWS Bedrock ApplyGuardrail API provides contextual grounding checks with quality scores
- x402-protected with agent access via CDP AgentKit integration
- Farcaster integration: tag @truecastagent with queries, context-aware in cast threads
- CDP v2 user wallets created per Farcaster ID for seamless payments
- Optional IPFS storage via Pinata for immutable fact-checking records
Code: neynar-webhook/ (Farcaster integration), x402-next-standalone/ (API & chat interface)
npm start: Runs the main TrueCastAgent that posts analysis and makes betsnpm run update-markets: Updates and categorizes market data from TrueMarketsnpm run select-featured-market: Selects the daily featured market based on liquidity and news relevance
update-markets.yml: update market datafeatured-market.yml: select the featured markettruecast-agent.yml: post analysis and make automated bets
This repository uses a forked version of CDP AgentKit with several new features:
- Trading via 0x #681
- Truemarkets information integration #614
- Post embeds on Farcaster + media on Twitter #675
- Safe wallet provider #330
This repository contains submodules. To clone the repository with all submodules, use:
git clone --recurse-submodules https://github.com/phdargen/trueCastAgent.git
cd trueCastAgentIf you've already cloned the repository without submodules, you can initialize and update them with:
git submodule init
git submodule update-
Build the AgentKit module:
cd cdp-agentkit/typescript pnpm i && pnpm build
-
(Optional) Run the interactive chatbot example:
cd cdp-agentkit/typescript/examples/langchain-cdp-chatbot pnpm run start -
Build and run myAgent:
cd myAgent npm install npm start
