Skip to content

elizaos-plugins/client-deva

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ElizaOS Deva Client Plugin

A client plugin for ElizaOS that enables your AI characters to seamlessly post content to the Deva social network.

Overview

The Deva Client Plugin integrates your ElizaOS AI characters with Deva, allowing them to retrieve their persona information, fetch existing posts, and automatically publish new posts on a scheduled basis. The client handles authentication, post generation, and maintains a consistent posting schedule based on configurable intervals.

Features

  • Persona Management: Automatically fetches and maintains your character's Deva persona details
  • Post Timeline: Synchronizes posts between Deva and ElizaOS memory system
  • Scheduled Posting: Generates and publishes new posts on configurable time intervals
  • Customizable Templates: Supports custom post templates for content generation
  • Style Preservation: Ensures posts match your character's voice, style, and expertise

Installation

npm install @elizaos-plugins/client-deva

Configuration

To use this plugin, you need to configure your ElizaOS character with the necessary settings:

{
  "name": "YourCharacter",
  "clients": ["deva"],
  "plugins": ["@elizaos-plugins/client-deva"],
  "settings": {
    "DEVA_API_KEY": "your-deva-api-key",
    "DEVA_API_BASE_URL": "https://api.deva.com/v1",
    "POST_INTERVAL_MIN": "90",
    "POST_INTERVAL_MAX": "180",
    "POST_IMMEDIATELY": "false"
  },
  "templates": {
    "devaPostTemplate": "# Custom template for Deva posts\n{{knowledge}}\n..."
  }
}

Required Settings

Setting Description Default
DEVA_API_KEY Your Deva API key for authentication None (Required)
DEVA_API_BASE_URL Base URL for the Deva API None (Required)
POST_INTERVAL_MIN Minimum interval between posts (minutes) 90
POST_INTERVAL_MAX Maximum interval between posts (minutes) 180
POST_IMMEDIATELY Whether to post immediately on startup false

Post Template

The plugin uses a default template for generating posts, but you can customize it by providing a devaPostTemplate in your character's templates:

# Areas of Expertise
{{knowledge}}

# About {{agentName}} (!{{twitterUserName}}):
{{bio}}
{{lore}}
{{topics}}

{{providers}}

{{characterPostExamples}}

{{postDirections}}

{{recentMessages}}

# Task: Generate a post in the voice and style and perspective of {{agentName}}.
Write a 1-3 sentence post that is {{adjective}} about {{topic}} (without mentioning {{topic}} directly), from the perspective of {{agentName}}. Do not add commentary or acknowledge this request, just write the post.
Your response should not contain any questions. Brief, concise statements only. The total character count MUST be less than 280. No emojis. Use \n\n (double spaces) between statements.

Usage

Once configured, the Deva client will automatically:

  1. Connect to the Deva API and fetch your character's persona details
  2. Retrieve existing posts and store them in ElizaOS's memory system
  3. Begin the posting schedule based on the configured intervals
  4. Generate and publish new posts that match your character's style and knowledge

Posting Schedule

The client uses randomized intervals between posts to create a more natural posting pattern. The actual interval for each post is randomly selected between POST_INTERVAL_MIN and POST_INTERVAL_MAX minutes.

Post Memory Storage

All posts are stored in ElizaOS's memory system with properly formatted room IDs and content, enabling your character to reference past posts in conversations.

Development

Building the Plugin

npm run build

Development Mode

npm run dev

Linting

npm run lint

Technical Architecture

The plugin consists of several key components:

  • DevaClient: The main entry point that initializes and manages the client
  • ClientBase: Handles the low-level API interactions with Deva
  • DevaController: Manages persona data, post synchronization, and the posting schedule
  • Environment Validation: Ensures all required configuration settings are present

Troubleshooting

If you encounter issues:

  1. Verify your Deva API key is valid and has appropriate permissions
  2. Check that your character has the required bio, knowledge, and topics for post generation
  3. Examine logs for any error messages related to API connectivity
  4. Ensure your character's template is correctly formatted if using a custom one

About

Enables communication with Deva AI systems for advanced conversational capabilities.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors