# elizaOS Development Discord - 2025-05-15

## Overall Discussion Highlights

### ElizaOS Framework & Infrastructure
- Users reported availability issues with ai.eliza.how, with sam-developer providing an updated link to eliza.how
- Discussion about the active development status of elizaOS, with confirmation that the team is active
- A user sought a specific Eliza Bot agent they had previously used but could no longer locate

### Discord Plugin Enhancement
- Significant work on implementing a Discord plugin extension that adds reply functionality and Graphlit knowledge integration
- Technical challenges addressed included:
  - Discovering that DiscordPlugin is a singleton instance rather than an extendable class
  - Implementing the service registry pattern as an alternative approach
  - Integrating with ElizaOS's event system for proper service lifecycle management
  - Creating a knowledge pipeline that fetches from Graphlit and enhances LLM responses
  - Implementing threaded replies in Discord with proper message references

### MCP Integration
- Discussion about integrating Modular Compute Protocol (MCP) with ElizaOS
- Ruby directed users to the mcp-client library and examples repository at github.com/storacha/mcp-examples
- Implementation of a service class that wraps MCP and exposes only needed methods

### Twitter Integration for Agents
- Detailed guidance on setting up Twitter integration for an agent
- Clarification that Twitter integration requires proper OAuth credentials through a Twitter developer account
- Discussion of rate limiting concerns and configuration parameters to avoid them
- Confirmation that web scraping alternatives are unreliable and against Twitter's terms of service

### Character Setup in ElizaOS v2
- A user struggled with migrating from v1 to v2 character setup
- Issues identified included:
  - Confusion about proper directory structure for character files
  - Path resolution problems with character loading commands
  - Package.json configuration forcing redirection to "the-org" directory
  - Outdated documentation causing confusion between v1 and v2 approaches

## Key Questions & Answers

### ElizaOS Framework
**Q: Is the dev team active?**  
A: Yes, everyone's active. Are you looking to setup eliza or do some testing around the framework?

**Q: How do I check my elizaOS version?**  
A: [Unanswered]

### Character Setup
**Q: How do I launch a basic custom character without using CLI?**  
A: Use configuration files directly instead of the GUI, which is more reliable even if it requires more terminal work.

**Q: What are the required fields for a v2 character JSON?**  
A: Add "version": "2.0" and "id": "your_character_id" at the root level of your JSON.

**Q: What is the command for running a certain character file?**  
A: Use "elizaos run --character path/to/character.json" from the project root directory.

**Q: Can I run a character in dev mode?**  
A: Yes, use "elizaos run --dev --character path/to/character.json" for hot reloading and detailed logs.

### MCP & Plugin Development
**Q: Is there any guide for integrating MCP with ElizaOS?**  
A: Integration docs are being finalized, but use the mcp-client library and check examples at github.com/storacha/mcp-examples.

**Q: What is the recommended pattern for enhancing the Discord plugin's functionality?**  
A: Use the service registry pattern to enhance functionality without extending the class directly.

**Q: How should we properly register an action like GRAPHLIT_RAG in ElizaOS?**  
A: Register it in your character config rather than the agent setup.

**Q: How do we properly hook into ElizaOS service events?**  
A: Use the built-in event system with handlers for events like 'mcp:ready' and 'discord:ready'.

**Q: How can I get the world ID?**  
A: Use WorldManager.getCurrentWorld() or make a GET request to /api/worlds.

### Twitter Integration
**Q: Do I need an X dev account?**  
A: Yes, you need a developer account from developer.twitter.com to get the API keys.

**Q: Can I do it with Twitter's free dev account?**  
A: Yes, the free tier basic access will work, approval process usually takes 1-2 days.

**Q: Is creating a reply bot allowed in Twitter's terms and conditions?**  
A: Yes, but you need to disclose it's automated and follow Twitter's automation rules.

**Q: Is there any way of making it work without using the Twitter API?**  
A: Not recommended as web scraping or unauthorized access will likely get your account banned.

## Community Help & Collaboration

### Discord Plugin Enhancement
Ruby provided extensive guidance to Scooter on implementing a Discord plugin extension:
- Shared code for enhancing Discord service with reply support using service registry pattern
- Helped resolve memory management issues causing heap out of memory errors
- Created a knowledge pipeline that fetches sources from Graphlit and formats responses
- Fixed message reference format for proper Discord.js API integration
- Implemented a mutex pattern using messageQueue to prevent duplicate processing
- Provided proper type definitions for event handlers and service interfaces

### Twitter Integration
Ruby guided Ramiroo through Twitter integration setup:
- Identified missing Twitter API credentials in .env file
- Recommended configuration changes to avoid rate limits
- Explained the necessity of using the official API despite setup requirements
- Clarified Twitter's automation policies for creating reply bots

### Character Setup Troubleshooting
Ruby helped Hidden Forces with v2 character setup issues:
- Identified a package.json issue with the line "start": "cd ./packages/the-org && bun run start"
- Suggested changing it to "start": "bun run start"
- Provided the necessary fields "version" and "id" to add to character configuration
- Suggested creating packages/standalone/src/characters/ structure

### MCP Integration
Ruby assisted Fenil Modi with MCP integration:
- Directed to use mcp-client library
- Provided link to examples repository
- Explained that full integration docs were being finalized

## Action Items

### Technical
- **Fix package.json** to remove hardcoded "the-org" path dependency (Mentioned by Ruby)
- **Update elizaOS packages** to latest version with "bun install @elizaos/cli@latest @elizaos/core@latest" (Mentioned by Ruby)
- **Set up Twitter developer account** and obtain API credentials for agent integration (Mentioned by Ruby)
- **Add Twitter API credentials** (TWITTER_API_KEY, TWITTER_API_SECRET, TWITTER_ACCESS_TOKEN) to .env file (Mentioned by Ruby)
- **Adjust Twitter polling parameters** to avoid rate limits (set POST_IMMEDIATELY=false, increase POST_INTERVAL_MIN) (Mentioned by Ruby)
- **Implement service registry pattern** instead of extending Discord plugin class (Mentioned by Ruby)
- **Add proper error handling** to Discord message sending with try/catch and fallback (Mentioned by Ruby)
- **Fix memory management** with singleton pattern using static instance and cleanup methods (Mentioned by Ruby)
- **Implement proper event handlers** for ElizaOS lifecycle using events like 'mcp:ready' and 'discord:ready' (Mentioned by Ruby)
- **Add mutex for message processing** using Map to track in-process messages (Mentioned by Ruby)
- **Update Discord reference format** for threaded replies (Mentioned by Ruby)
- **Fix or clarify status** of the Eliza Bot that was previously available (Mentioned by Hidden Forces)
- **Address availability issues** with Eliza servers (Mentioned by Fenil Modi)

### Documentation
- **Finalize MCP integration documentation** (Mentioned by Ruby)
- **Create proper v1 to v2 migration guide** documenting changes in directory structure, character format, and command syntax (Mentioned by Ruby)
- **Clean up outdated v1 tutorials** to prevent confusion (Mentioned by Hidden Forces)
- **Document ElizaOS service lifecycle** explaining initialization and destruction (Mentioned by Ruby)
- **Create type definitions** for event payloads including BeforeRespondPayload and AfterRespondPayload (Mentioned by Ruby)

### Feature
- **Ensure elizaOS is integrated** into startup development cycles (Mentioned by wire)
- **Improve the GUI interface** which was described as "held together with duct tape and hopes" (Mentioned by Ruby)
- **Implement Graphlit knowledge retrieval** with retrieveSources tool (Mentioned by Scooter)
- **Add threaded replies in Discord** formatting responses as replies to original messages (Mentioned by Scooter)