# AI Ish
- [Eliza](https://ai16z.github.io/eliza/)
- [Create Farcaster bot](https://docs.neynar.com/docs/how-to-create-a-farcaster-bot)
- [feat: working farcaster client with neynar #570](https://github.com/ai16z/eliza/pull/570/files)
- [Set Up your own AI Agent purpose built for Farcaster.](https://warpcast.com/koda/0x24739d2b) with Cloudflare Workers
[We want ai16z to be a place where you can just come and build and know that you'll be taken care of.](https://x.com/shawmakesmagic/status/1864594413193973866)
## ToDo
- What is the best way to keep agents from repeating something from a previous cast?
- Figure at how to write casts from console
- Post to channels
- [x] Update model to Claude
- [x] Use large model
- Fix two statements issue
- Use /channel-name for channels
- @ reply with usernames [Example](https://warpcast.com/baalhorn/0x7ddead1b)
- Import knowledge
- Get Eliza working with a RAG pipeline
- Stop repeating words and phrases from previous casts
- Maybe "probably not feeding the last x casts to the prompt to generate casts would fix"
- "yeah. i edited the prompt template by removing recentPosts" @sayangel
- change model from SMALL to LARGE
- Handle Neynar errors gracefully
- Get agents to reply with links to the docs
- Get agent to calculate points and be able to reply with a users point total and ways to earn
- Base the number of souls on the count of channel followers
When I tried to run two characters
```json
pnpm start --characters="characters/stonekeepers.character.json,characters/baalhorn.character.json"
```
Stonekeepers was maaaing like Baalhorn
ERRORS
Neynar error:
{"code":"NotFound","message":"parent hash not found","property":"parent"}
ERRORS
No action found for
responding critically to shallow popularity
ERRORS
No action found for
responds with dark wisdom about spirit strengthening rituals
ERRORS
No action found for
speaks with ominous authority, stone walls seeming to resonate with each word
## Baalhorn
```
https://discord.com/oauth2/authorize?client_id=1301951358605463592&permissions=8&integration_type=0&scope=bot
```
```bash
pnpm start --character="characters/baalhorn.character.json"
```
## Stonekeepers
```bash
pnpm start --characters="characters/stonekeepers.character.json"
```
### Issues
#### has anyone figured out how to not have Eliza v1 reply twice when replying from an action?
- add a k/v store like redis before replying
- check cast hash id, ignore if already replied
- websockets can fire many times (thus the duplicates)
#### Post to Channels
[you can modify the sendCast action to accept a channel id and then pass that id to the @neynar client publishCast call](https://warpcast.com/sayangel/0xbba91fff)
#### Two Statements in Same Cast
From sayangel
- model.small creates shitty responses (theres an upcomign Eliza PR that fixes this I think)
- claude is better than openai for characters
- temperature 0.7
- i've been experimenting with the prompts because i've found the current ones can get it stuck posting very similar things. i've been trying not feeding it recent casts so it's not biased that. the bias is especially noticable with the SMALL models
- sayangel uses a large model
- "@oexcess I solved the double response on my side. I had a continue action in my agent/actions folder, but my agent/index.ts was also importing the bootstrap plugin which has continue in there as well. was just the action getting hit twice." @caps
#### Responds Too Much
From sayangel
try the medium or large models? also tweak the shouldRespond prompt to be very specific about what actions/topics you do want it to respond to. i found the default prompts do an ok job at leaving a convo once it gets "boring" but they're still pretty trigger happy for initial reply
## Knowledge
- [folder2knowledge](https://github.com/ai16z/characterfile/blob/main/README.md#folder2knowledge)
- [folder2knowledge.js](https://github.com/ai16z/characterfile/blob/main/scripts/folder2knowledge.js)
- "https://ollama.com/blog/structured-outputs json outputs are very useful for calling skills/api's etc" bleu.eth
How might we feed an agent knowledge from messages? This could be just general conversation in the channel. It could be a group message dedicated to a topic. Or it could be comments on a specific proposal.
## Resources
- [LinaBytes](https://x.com/LinaBytes)
- [Based Agent](https://x.com/murrlincoln/status/1850226148594082120?s=12)
- [eliza](https://github.com/ai16z/eliza)
- [Eliza Wakes Up](https://elizawakesup.ai/)
- [world-interface](https://github.com/virtuous-cycles/world-interface/tree/main)
- [TW's AI Tools Research](https://hackmd.io/@TravisWyche/AI-tools-research)
- [Sonnet and Cursor Workflow Guide](https://hackmd.io/@KyleStargarden/r1IxeQPjR)
- [How to Build a Social AI Agent in 15 minutes with X, Telegram, Onchain Capabilities | Full Tutorial](https://www.youtube.com/watch?v=6PZVwNTl5hI)
- [Gaia x RAG API Pipeline](https://github.com/raid-guild/gaianet-rag-api-pipeline)
- [Hats Protocol Presentation @ ai16z 11-24-24](https://www.youtube.com/watch?v=B5zJxUez2AM)
- [bolt](https://bolt.new/)
- [FortyTwo](https://www.fortytwo.money/)
- [Hyperbolic](https://hyperbolic.xyz/) The Open Access AI Cloud
## [Programming Capitalism](https://www.youtube.com/watch?v=xwP0ACc0fWg)
- Bots need bank accounts too
- Crypto is the substrate
- Fractional ownership of bots
- Hand over capital allocation to AI
- Social media hellscape
- Using captcha and signatures to prove humanity and reduce manipulation and sybil attacks
- What products can blockchains offer AIs ad people interacting with AIs?
- Bots becoming DAOs (9:50)
- How do we make money?
- What is unique and enables new behaviors?
- Abstracting UX of complex transactions with text
## Jam on November 22, 2024
- Meta: Agent Memecoin Launchpads
- [DAO AI Agents Setup Instructions](https://hackmd.io/VC-0zcJCTW-cwNUWwh4s8Q)
- [fork of 🔵 Based Agent for DAOs](https://github.com/dekanbro/based-agent-exp)
- [farcaster airdrops 101:](https://warpcast.com/woj.eth/0x3135e528)
- [$VVAIFU](https://vvaifu.fun/)
- [Virtuals](https://app.virtuals.io/)
- [@iron-blacksmith can you launch me a crowdfund about lizard wizards](https://warpcast.com/dekanbro/0x1fe9d46d)
- [MYSTICAL GATHERING OF LIZARD WIZARDS](https://app.yeet.haus/#/molochv3/0x2105/0x9a7ec34c772762bc2f9b05bd674a5da1261112cf)
## Agents
"The biggest challenge with getting the agents on Warpcast is that there's no service provider for it built into Eliza Framework."
## Setup
Node ^20.0.0
### Keys
- OpenAI
- Anthropic
- Discord bot
- Telegram bot
## Anthropic
[Using the API](https://docs.anthropic.com/en/api/getting-started)
## Discord
[API Reference](https://discord.com/developers/docs/reference)
## Casts
[In the future, many crypto communities will have their own AI agent w/ a directive of growing the ecosystem.](https://warpcast.com/linda/0x0d8581e5)
[It's a api message wrapper that lets AI agents make API calls and pay for each call.](https://warpcast.com/1dolinski/0x17ddd842)
[Is there a generative AI art tool (or technique) that makes it easy to create consistent characters from scene to scene?](https://warpcast.com/dwr.eth/0x4f1a4007)
## Calls
### ai16z <> RG <> DaoHaus
November 1, 2024
[eliza](https://github.com/ai16z/eliza) demo by Shaw at ai16z
"OMG we can automate DAOs"
AIs should listen to the chat and absorb the will of the DAO.
Next up is building multi-agent simulations.
He has a local server he is using to run the agents.
[Key Concepts in Eliza](https://github.com/ai16z/eliza/blob/main/docs/api/concepts.md)
The bots repeat themselves when there is entropy in their context. That is why there are all these values to inject randomly. They have a big impact on diversifying the context with returned elements to keep it fresh.
The "system" directive is always added to the context. You can also add these custom directives to ChatGPT to make an agent.
Can also give ChatGPT "Task:"
Knowledge gets vectorized into embeddings. This would be a good way to integrate a RAG pipeline. Keep them short (2-3 paragraphs). You can also import text files. RAG and contect is best for knowledge.
Message examples set the tone for how the character speaks. Think this is related to tuning with [Few-Shot Prompting](https://www.promptingguide.ai/techniques/fewshot).
Adjectives and topics are kinda like Mad Libs.
Style is how the bot should respond. We have a lot of control over how the bot speaks. This is where most of the tuning efforts should be applied. Use [Togther](https://www.together.ai/) for fine tuning the tone. It is best to use small models for fine tuning.
### Community Camp with st4rgard3n
October 29, 2024
Marketing is the achilles heel of our projects and teams. AI agents give you distribution. They will market for you 24 hours a day.
We have an advantage right now with our technical skills. And this is the convergence of the two most hyped technologies.
A friend of st4rgard3n and Penguin spent the last two years building large language models for video game agents. It was difficult to get the agents to behave how they wanted.
He know has a framework for producing these agents. He was able to onboard and get an agenty deployed in less than 24 hours.
The agents require constantly adjusting the character prompting to addjust their personality.
But the prompting is the secret sauce. It is how we add value. Can also have the characters input files will various knowledge to educate them on different subjects and topics.
The magic with the framework is that each time a response is generated the context window is randomized. So it is going through different emotions and seems more real.
Character developmeent is about refining the prompts and character files to craft the knowledge and personality.
The system uses a RAG pipeline to remember previous conversations.
He as been talking to Matthew Graham the Managing Partner and Founder at Ryze Labs. He speaks at a lot of crypto conferences. They were a pre-seed or seed round investor in Solana and want to write him a blank check.
#### What does Kyle want?
- Sponsoring and helping builders in an incubator
- Scooping the Virtuals platform and delivering AI agents attached to their own tokens
#### What does Kyle need?
- Commitment from raiders with skills
- ai16z was to be advisors