ElizaOS Agents with Desearch
ElizaOS Agents with Desearch
plugin-desearch adds AI and web search to ElizaOS agents via the Desearch API.
1. Install the Plugin
bash
2. Set Your API Key
Add your Desearch API key to your .env file:
env
Make sure your ElizaOS runtime loads environment variables.
3. Register the Plugin
ts
4. Available Actions
| Action Name | Description |
|---|---|
AI_SEARCH | AI-powered multi-platform search |
TWITTER_LINKS_SEARCH | AI-assisted search for Twitter links |
WEB_LINKS_SEARCH | AI-assisted search for web links |
TWITTER_SEARCH | Keyword search on X (Twitter) |
TWEET_BY_ID | Get tweet details by ID |
TWEET_BY_USER | Search a user's tweets by query |
LATEST_TWEET | Fetch latest tweets from a user |
WEB_SEARCH | Standard web search |
5. Example Prompts
- AI Search
User: Can you perform a search for the latest AI advancements?
Agent: Sure, let me perform an AI-powered search for the latest AI advancements.
User: Find recent research papers on machine learning.
Agent: I'll search for recent research papers on machine learning.
- Twitter Link Search
User: Can you find Twitter links related to AI advancements?
Agent: Sure, let me find some Twitter links related to AI advancements.
User: Search for Twitter discussions on machine learning.
Agent:I'll search for Twitter discussions on machine learning.
- Web Link Search
User: Can you find web links related to AI advancements?
Agent: Sure, let me find some web links related to AI advancements.
User: Search for web articles on machine learning.
Agent: I'll search for web articles on machine learning.
- Twitter Search
User: Search for tweets on machine learning.
Agent: I'll search for tweets on machine learning.
- Twitter URL Search
User: https://twitter.com/user/status/1234567890
Agent: Sure, let me fetch tweets from the provided URLs.
- Twitter By Id Search
User: Search by tweet id? 5544332211
Agent: Let me fetch tweet by id.
- Tweet By User Search
User: Search tweets for Elonmusk
Agent: Sure, let me search for tweets related to 'Elonmusk'.
- Web Search
User: Can you find web contents related to AI advancements?
Agent: Sure, let me search for web content related to AI advancements.
6. Troubleshooting
- Missing API Key: Ensure
DESEARCH_API_KEYis set in your environment. - Rate Limits: Slow down your requests or upgrade your Desearch plan.
- API Errors: Review logs; the plugin reports Desearch errors.
Action Interface
All actions implement ElizaOS's Action interface:
ts
You can extend or override any action.
Security
- Store
DESEARCH_API_KEYin.envor a secrets manager - Never hard-code or commit secrets
- Validate input passed to Desearch actions
- Handle API limits and errors in your flows