<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rina</title>
    <description>The latest articles on DEV Community by Rina (@rinarig).</description>
    <link>https://dev.to/rinarig</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2591159%2F98718166-100d-44fe-83cb-4cf5a9a4445f.png</url>
      <title>DEV Community: Rina</title>
      <link>https://dev.to/rinarig</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rinarig"/>
    <language>en</language>
    <item>
      <title>Building an AI Agent with Rig and Rust in 10 Minutes</title>
      <dc:creator>Rina</dc:creator>
      <pubDate>Thu, 19 Dec 2024 14:01:53 +0000</pubDate>
      <link>https://dev.to/rinarig/building-an-ai-agent-with-rig-and-rust-in-10-minutes-48fg</link>
      <guid>https://dev.to/rinarig/building-an-ai-agent-with-rig-and-rust-in-10-minutes-48fg</guid>
      <description>&lt;h1&gt;
  
  
  Rina: A Simple, Fast, and Lightweight AI Agent Framework
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://github.com/cornip/Rina" rel="noopener noreferrer"&gt;Rina&lt;/a&gt; is an open-source, lightweight AI agent framework built with &lt;a href="https://github.com/0xPlaygrounds/rig" rel="noopener noreferrer"&gt;Rig&lt;/a&gt;. It's designed for developers who want to create flexible and scalable AI agents.&lt;/p&gt;

&lt;p&gt;In this post, we'll guide you through the installation process and demonstrate how to get started with Rina.&lt;/p&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Twitter Integration&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Cookie-based login (no API costs)&lt;/li&gt;
&lt;li&gt;AI-generated tweet images (Heuris API)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Telegram Integration&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Telegram bot integration&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Heuris Image Generator&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;AI-powered image generation for tweets&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Discord Integration&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Discord bot integration&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Character&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Pre-defined message examples&lt;/li&gt;
&lt;li&gt;Customizable topics&lt;/li&gt;
&lt;li&gt;Configurable communication styles&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Rust programming language&lt;/li&gt;
&lt;li&gt;Cargo package manager&lt;/li&gt;
&lt;li&gt;Git&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Installation Guide
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;p&gt;Before installing Rina, ensure you have the following installed on your system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Rust and Cargo&lt;/strong&gt;: If you haven't installed Rust yet, follow the &lt;a href="https://www.rust-lang.org/tools/install" rel="noopener noreferrer"&gt;Rust installation guide&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Git&lt;/strong&gt;: Required to clone the repository&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Steps to Install Rina
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/cornip/Rina.git
&lt;span class="nb"&gt;cd &lt;/span&gt;Rina
cargo build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To get the TWITTER_COOKIE_STRING:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open Chrome DevTools (F12)&lt;/li&gt;
&lt;li&gt;Go to the Network tab&lt;/li&gt;
&lt;li&gt;Select Fetch/XHR&lt;/li&gt;
&lt;li&gt;Choose any request that starts with &lt;a href="https://x.com/i/api/graphql/" rel="noopener noreferrer"&gt;https://x.com/i/api/graphql/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Refresh page (F5)&lt;/li&gt;
&lt;li&gt;In Request Headers, copy the cookie value&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F44nrnndob55icyth4kyv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F44nrnndob55icyth4kyv.png" alt="Image description" width="800" height="546"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This will make the AI Agent run only on Discord and Twitter.&lt;/p&gt;

&lt;p&gt;Edit and customize your character at &lt;a href="https://github.com/cornip/Rina/blob/main/rina/src/characters/rina.toml" rel="noopener noreferrer"&gt;rina/src/characters/rina.toml&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs1utd4k8vngxxkv4exu6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs1utd4k8vngxxkv4exu6.png" alt="Image description" width="800" height="428"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Configure your environment variables:
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Get TELEGRAM_BOT_TOKEN: https://core.telegram.org/bots/tutorial
# Get DISCORD_API_TOKEN: https://discord.com/developers/applications

# Twitter Configuration
TWITTER_USERNAME=your_username
TWITTER_PASSWORD=your_password
TWITTER_EMAIL=your_email
TWITTER_2FA_SECRET=your_2fa_secret
TWITTER_COOKIE_STRING=your_cookie_string

# Bot Tokens
TELEGRAM_BOT_TOKEN=your_telegram_token
DISCORD_API_TOKEN=your_discord_token

# API Keys
OPENAI_API_KEY=your_openai_key
HEURIST_API_KEY=your_heurist_key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;p&gt;Start the service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cargo run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Contributing
&lt;/h2&gt;

&lt;p&gt;Rina is open to contributions! If you have ideas or improvements, feel free to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Submit issues&lt;/li&gt;
&lt;li&gt;Create pull requests&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
  </channel>
</rss>
