This project generates articles based on Farcaster interactions and registers them with Story Protocol. It uses AI to analyze your Farcaster activity and create personalized articles.
The system:
- Fetches your Farcaster casts and reactions
- Processes them as "memories" (short-term and long-term)
- Generates an article using Gaia's LLM
- Registers the article with Story Protocol
- Clone the repository
git clone [your-repo-url]
cd storyprompts§- Install dependencies
npm install- Configure environment variables:
- Copy
.env.exampleto.env - Fill in your credentials:
# Neynar API Configuration NEYNAR_API_KEY=your_neynar_api_key # Story Protocol Wallet Configuration WALLET_ADDRESS=your_wallet_address WALLET_PRIVATE_KEY=your_wallet_private_key # Pinata Configuration PINATA_JWT=your_pinata_jwt # RPC Configuration RPC_PROVIDER_URL=your_rpc_provider_url
- Copy
Run docker for chromadb database.
docker run -p 8000:8000 chromadb/chroma npm run start "Your Article Title"# Test article generation only
npm run test:generatearticle
# Test memory processing
npm run test:memory
# Test full flow (generation + registration)
npm run test:main "Test Article Title"- Neynar API:
https://api.neynar.com/v2 - Gaia Node:
https://llama8b.gaia.domains/v1
-
Farcaster Data:
- Limited to 100 reactions
- Hardcoded to user ID 12021
- Only processes parent URLs (not channel IDs)
-
Article Generation:
- Token limit: 81,920 tokens
- Currently limited to:
- 3 long-term memory posts
- 5 core interest casts
- 3 related topic casts
- 2 outer space casts
src/
├── services/
│ ├── article.ts # Article generation logic
│ ├── feed.ts # Farcaster feed fetching
│ ├── memory.ts # Memory processing
│ └── reactions.ts # Farcaster reactions handling
├── test/
│ ├── test-article.ts
│ ├── test-main.ts
│ └── test-memory.ts
└── utils/ # Utility functions
- Channel ID handling needs improvement
- URL metadata is not currently processed
- Improve error handling for API responses
- Add time range filtering (30 days limit)
- dynamic limit for number of casts to fetch: First time fetch all, second time only new casts
- Improve channel handling (from parent_channel field to channel-id field)
- Add URL metadata processing
- Add image description capabilities
- reaction fetching is still limited to first 100 reactions.
- Add more memories
- Add more casts
- Include source URLs of casts in article sections
- Uses Gaia's LLM for article generation
- Implements Story Protocol for IP registration
- Uses Pinata for IPFS storage
- Processes Farcaster data through Neynar API
ISC
- Cast 0: Create a webhook that listens to mentions of the bot
- Cast 1: Default bot reply 1: we'll start with a topic. My human team member strongly believes that human's unconsciousness is embedded in their writing. I'll analyze 100 of your casts and reply with a couple of themes for you to pick from. If you have time (and not the attention span of a gold fish), wait. If not, no hard feelings, I'll tag you.
- Cast 2 (reply to cast 1): Pick a theme for the story: list of themes (limit to 5)