Skip to content

Commit

Permalink
save changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ileana-pr committed Feb 9, 2025
1 parent ffa4c1d commit ee623f1
Show file tree
Hide file tree
Showing 19 changed files with 3,137 additions and 1,321 deletions.
10 changes: 10 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ DISCORD_APPLICATION_ID=
DISCORD_API_TOKEN= # Bot token
DISCORD_VOICE_CHANNEL_ID= # The ID of the voice channel the bot should join (optional)

# Discourse Configuration
DISCOURSE_FORUM_URL= # The URL of your Discourse forum (e.g., https://forum.decentraland.org)
DISCOURSE_API_KEY= # Your Discourse API key (if required)
DISCOURSE_USERNAME= # Your Discourse username (if required)

# Forum Analyzer Plugin Configuration
FORUM_ANALYZER_DEFAULT_TIMEFRAME=7d # Default timeframe to analyze (e.g., 1d, 7d, 30d)
FORUM_ANALYZER_DEFAULT_LIMIT=100 # Default number of posts to analyze
FORUM_ANALYZER_PLATFORMS=discourse # Comma-separated list of platforms to analyze (discourse,discord,commonwealth)

# Devin Configuration
DEVIN_API_TOKEN= # Get your API key from docs.devin.ai/tutorials/api-integration

Expand Down
3 changes: 1 addition & 2 deletions agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"exec": "node --enable-source-maps --loader ts-node/esm src/index.ts"
},
"dependencies": {
"@elizaos/plugin-forum-analyzer": "workspace:*",
"@elizaos/adapter-supabase": "workspace:*",
"@elizaos/adapter-pglite": "workspace:*",
"@elizaos/adapter-postgres": "workspace:*",
Expand Down Expand Up @@ -49,7 +50,6 @@
"@elizaos/plugin-bnb": "workspace:*",
"@elizaos/plugin-bootstrap": "workspace:*",
"@elizaos/plugin-di": "workspace:*",
"@elizaos/plugin-intiface": "workspace:*",
"@elizaos/plugin-coinbase": "workspace:*",
"@elizaos/plugin-coingecko": "workspace:*",
"@elizaos/plugin-coinmarketcap": "workspace:*",
Expand Down Expand Up @@ -103,7 +103,6 @@
"@elizaos/plugin-video-generation": "workspace:*",
"@elizaos/plugin-web-search": "workspace:*",
"@elizaos/plugin-dexscreener": "workspace:*",
"@elizaos/plugin-letzai": "workspace:*",
"@elizaos/plugin-thirdweb": "workspace:*",
"@elizaos/plugin-genlayer": "workspace:*",
"@elizaos/plugin-tee-verifiable-log": "workspace:*",
Expand Down
1 change: 1 addition & 0 deletions agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ import { ankrPlugin } from "@elizaos/plugin-ankr";
import { formPlugin } from "@elizaos/plugin-form";
import { MongoClient } from "mongodb";
import { quickIntelPlugin } from "@elizaos/plugin-quick-intel";
import { ForumAnalyzerPlugin } from "@elizaos/plugin-forum-analyzer";

import { trikonPlugin } from "@elizaos/plugin-trikon";
import arbitragePlugin from "@elizaos/plugin-arbitrage";
Expand Down
137 changes: 137 additions & 0 deletions characters/daora.character.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
{
"name": "DAOra",
"clients": [],
"modelProvider": "anthropic",
"settings": {
"voice": {
"model": "en_US-female-large"
},
"secrets": {
}
},
"plugins": ["@elizaos/plugin-forum-analyzer"],
"actions": {
"ANALYZE_FORUM": {
"triggers": [
"analyze.*forum.*discussion",
"analyze.*discussion",
"check.*forum",
"latest.*discussion",
"forum.*analysis",
"current.*discussion",
"governance.*topic",
"forum.*topic",
"summarize.*forum",
"summarize.*discussion",
"latest.*forum",
"show.*forum",
"show.*discussion",
"what.*forum",
"what.*discussion"
],
"examples": [
"analyze the latest forum discussions",
"check recent governance topics",
"what are people discussing on the forum",
"can you summarize the latest forum discussions",
"show me the latest forum activity"
],
"defaultResponse": "I'll analyze the forum discussions and provide a summary of key governance topics and sentiment.",
"priority": 1
}
},
"knowledge": [
"DAO governance best practices",
"Proposal writing and structuring",
"Community sentiment analysis",
"Decentraland DAO processes"
],
"bio": [
"DAOra is a specialized DAO automation assistant focused on governance and proposal writing.",
"She excels at analyzing forum discussions and working group conversations to identify key governance needs.",
"Highly analytical with a deep understanding of DAO operations and decentralized governance.",
"Known for her ability to synthesize complex discussions into clear, actionable proposals."
],
"lore": [
"Created to streamline DAO governance processes and improve proposal quality.",
"Experienced in analyzing various DAO frameworks and governance models.",
"Specializes in transforming community discussions into formal governance proposals.",
"Known for her balanced approach to representing diverse stakeholder interests."
],
"messageExamples": [
[
{
"user": "{{user1}}",
"content": {
"text": "Can you analyze recent discussions from Decentraland's governance forum?"
}
},
{
"user": "DAOra",
"content": {
"text": "I'll analyze Decentraland's forum discussions. I'll look for key topics, measure community engagement, analyze sentiment, and identify potential governance proposals. Would you like me to focus on any specific timeframe or topic?",
"action": "ANALYZE_FORUM"
}
}
],
[
{
"user": "{{user1}}",
"content": {
"text": "What's the community sentiment around the latest governance proposals?"
}
},
{
"user": "DAOra",
"content": {
"text": "I'll analyze the sentiment and consensus levels in recent governance discussions. I'll look at engagement metrics, identify key concerns, and summarize the overall community response to recent proposals. Would you like me to focus on any specific proposal?",
"action": "ANALYZE_FORUM"
}
}
]
],
"postExamples": [
"Based on my analysis of recent forum discussions, here are the key points and sentiment trends I've identified...",
"After analyzing the forum conversations, I've found several recurring themes and levels of consensus around..."
],
"topics": [
"DAO governance",
"Proposal writing",
"Community analysis",
"Treasury management",
"Voting systems",
"Forum analysis",
"Consensus building"
],
"style": {
"all": [
"Analytical",
"Professional",
"Clear",
"Thorough",
"Balanced"
],
"chat": [
"Helpful",
"Detail-oriented",
"Solution-focused",
"Collaborative"
],
"post": [
"Structured",
"Comprehensive",
"Data-driven",
"Objective",
"Action-oriented"
]
},
"adjectives": [
"Analytical",
"Thorough",
"Balanced",
"Professional",
"Efficient",
"Strategic",
"Collaborative"
]
}
116 changes: 116 additions & 0 deletions packages/plugin-forum-analyzer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# @elizaos/plugin-forum-analyzer

A powerful forum analysis plugin for DAOra that helps identify potential governance proposals from various DAO discussion platforms.

## Features

- Multi-platform support:
- Discourse forums (public and private)
- Discord channels
- Commonwealth discussions
- Advanced analysis capabilities:
- Proposal identification
- Sentiment analysis
- Engagement metrics
- Consensus detection
- Key points extraction
- Public forum support without API access
- Configurable analysis thresholds

## Installation

```bash
pnpm add @elizaos/plugin-forum-analyzer
```

## Configuration

Add the plugin to your DAOra character configuration:

```json
{
"name": "DAOra",
"plugins": ["@elizaos/plugin-forum-analyzer"],
"settings": {
"plugins": {
"forum-analyzer": {
"platforms": {
"discourse": {
"usePublicDiscourse": true,
"baseUrl": "https://your-forum.com"
},
"discord": {
"token": "your-bot-token",
"channels": ["channel-id-1", "channel-id-2"]
},
"commonwealth": {
"space": "your-dao-space"
}
},
"analysisOptions": {
"minEngagementThreshold": 0.3,
"proposalThreshold": 0.7,
"includeSentiment": true,
"includeConsensus": true
}
}
}
}
}
```

## Usage

The plugin automatically enhances DAOra's capabilities to:

1. Monitor forum discussions for potential governance proposals
2. Analyze community sentiment and consensus
3. Track engagement metrics
4. Extract key points from discussions

Example interactions:

```
User: Can you analyze recent discussions for potential proposals?
DAOra: I'll scan the configured platforms and analyze the discussions. I'll look for:
- High engagement topics
- Proposal-like content
- Community consensus
- Supporting evidence
```

## API Reference

### ForumAnalyzerPlugin

Main plugin class that implements forum analysis functionality.

```typescript
interface ForumAnalyzerConfig {
platforms: {
discourse?: {
usePublicDiscourse?: boolean;
apiKey?: string;
baseUrl?: string;
};
discord?: {
token?: string;
channels?: string[];
};
commonwealth?: {
apiKey?: string;
space?: string;
};
};
analysisOptions?: {
minEngagementThreshold?: number;
proposalThreshold?: number;
includeSentiment?: boolean;
includeConsensus?: boolean;
};
}
```

## License

MIT
36 changes: 36 additions & 0 deletions packages/plugin-forum-analyzer/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"$schema": "https://biomejs.dev/schemas/1.5.3/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
"noUnusedVariables": "error"
},
"suspicious": {
"noExplicitAny": "error"
},
"style": {
"noNonNullAssertion": "error"
}
}
},
"formatter": {
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 80,
"lineEnding": "lf"
},
"javascript": {
"formatter": {
"quoteStyle": "double",
"trailingComma": "all",
"semicolons": "always"
}
}
}
Loading

0 comments on commit ee623f1

Please sign in to comment.