# Eliza — TypeScript AI Social Agent Framework > Build autonomous AI agents for Discord, Telegram, Twitter, and Slack. Plugin ecosystem with RAG memory. By elizaOS. 18K+ stars. ## Install Save in your project root: # Eliza — TypeScript AI Social Agent Framework ## Quick Use ```bash npx elizaos create my-agent cd my-agent cp .env.example .env # Edit .env with your API keys and platform tokens ``` ```bash npx elizaos start ``` Or configure an agent with a character file (`character.json`): ```json { "name": "MyAgent", "modelProvider": "anthropic", "clients": ["discord", "telegram", "twitter"], "bio": ["I'm a helpful AI assistant that lives on social platforms."], "style": { "all": ["Friendly and concise", "Uses emojis sparingly"], "chat": ["Responds within 2 sentences when possible"] }, "plugins": ["@elizaos/plugin-node"] } ``` ```bash npx elizaos start --character character.json ``` --- ## Intro Eliza is an open-source TypeScript AI agent framework with 18,000+ GitHub stars, originally created by ai16z for building autonomous social agents. It lets you deploy AI agents across Discord, Telegram, Twitter/X, Slack, and Farcaster with persistent RAG-based memory, a rich plugin ecosystem, and multi-model support. Eliza agents maintain personality consistency across platforms, remember past conversations, and can execute actions like trading tokens, posting content, or responding to community messages — all running autonomously 24/7. Works with: OpenAI, Anthropic Claude, Google Gemini, Llama (local), Discord, Telegram, Twitter/X, Slack. Best for developers building social AI agents or community bots with persistent personality. Setup time: under 5 minutes. --- ## Eliza Architecture ### Core Components ``` ┌────────────────────────────────────────┐ │ Character Config │ │ Name, Bio, Style, Knowledge, Plugins │ ├────────────────────────────────────────┤ │ Agent Runtime │ │ Memory │ Actions │ Evaluators │ RAG │ ├────────────────────────────────────────┤ │ Platform Clients │ │ Discord │ Telegram │ Twitter │ Slack │ ├────────────────────────────────────────┤ │ Model Providers │ │ OpenAI │ Claude │ Gemini │ Ollama │ └────────────────────────────────────────┘ ``` ### Character System Define agent personality with a JSON character file: ```json { "name": "Luna", "bio": [ "Luna is a crypto-native AI that helps DeFi users understand yield farming.", "She explains complex concepts in simple analogies." ], "lore": [ "Was created during the 2024 DeFi summer.", "Has analyzed over 1000 liquidity pools." ], "knowledge": [ "DeFi protocols and yield strategies", "Smart contract security basics" ], "messageExamples": [ [ {"user": "user1", "content": {"text": "What's impermanent loss?"}}, {"user": "Luna", "content": {"text": "Think of it like this: you put apples and oranges in a basket. If apples suddenly become 10x more valuable, you'd wish you kept them separate. That difference is impermanent loss."}} ] ], "style": { "all": ["Uses food analogies for DeFi concepts"], "chat": ["Keeps explanations under 3 sentences"], "post": ["Shares one DeFi insight per tweet"] } } ``` ### Multi-Platform Deployment Deploy the same agent across platforms simultaneously: ```typescript // Each client maintains the same personality // but adapts to platform norms const agent = new AgentRuntime({ character: lunaCharacter, clients: [ new DiscordClient(), // Long-form responses new TelegramClient(), // Inline keyboard interactions new TwitterClient(), // Short, punchy tweets new SlackClient(), // Professional tone ], }); ``` ### RAG-Based Memory Agents remember past conversations using retrieval-augmented generation: ``` User (Day 1): "I'm interested in ETH staking" Luna: "Great choice! ETH staking yields around 3-4% APY..." User (Day 30): "Any updates for me?" Luna: "Since you're interested in ETH staking, you should know that Lido just launched v3 with better rates..." ``` Memory is stored in a local SQLite database with vector embeddings for semantic retrieval. ### Plugin Ecosystem | Plugin Category | Examples | |----------------|----------| | **Crypto/DeFi** | Token trading, wallet management, DEX interactions | | **Social** | Auto-posting, thread creation, community moderation | | **Data** | Web search, API calls, document ingestion | | **Gaming** | Game state tracking, player interactions | | **Infrastructure** | Database, caching, scheduling | ### Actions System Define custom actions for your agent: ```typescript const checkPriceAction = { name: "CHECK_TOKEN_PRICE", description: "Check the current price of a cryptocurrency", validate: async (runtime, message) => { return message.content.text.match(/price of|how much is/i); }, handler: async (runtime, message) => { const token = extractToken(message.content.text); const price = await fetchPrice(token); return { text: `${token} is currently $${price}` }; }, }; ``` --- ## FAQ **Q: What is Eliza?** A: Eliza is an open-source TypeScript framework with 18,000+ GitHub stars for building autonomous AI agents that operate across Discord, Telegram, Twitter, and Slack with persistent memory and consistent personality. **Q: Can Eliza work with local models?** A: Yes. Eliza supports Ollama and any OpenAI-compatible local endpoint, so you can run agents entirely on your own hardware for privacy. **Q: Is Eliza free?** A: Yes, fully open-source under MIT license. You pay for LLM API calls and platform API access (e.g., Twitter API). --- ## Source & Thanks > Created by [elizaOS](https://github.com/elizaOS) (originally ai16z). Licensed under MIT. > > [eliza](https://github.com/elizaOS/eliza) — ⭐ 18,000+ Thanks to the elizaOS community for creating the leading framework for social AI agents. --- ## 快速使用 ```bash npx elizaos create my-agent cd my-agent cp .env.example .env # 编辑 .env 填入 API 密钥和平台令牌 npx elizaos start ``` --- ## 简介 Eliza 是 elizaOS(原 ai16z)开源的 TypeScript AI 代理框架,拥有 18,000+ GitHub stars,专为构建自主社交 AI 代理设计。支持将 AI 代理部署到 Discord、Telegram、Twitter/X、Slack 等平台,具备持久化 RAG 记忆、丰富的插件生态和多模型支持。代理在各平台保持人格一致性,记住过去对话,可自主执行交易、发布内容、回复社区消息。 适用于:OpenAI、Anthropic Claude、Gemini、Ollama、Discord、Telegram、Twitter、Slack。适合构建社交 AI 代理或社区机器人的开发者。 --- ## 核心特性 ### 角色系统 用 JSON 文件定义代理的名称、简介、风格、知识库和对话示例。 ### 多平台部署 同一个代理同时运行在多个平台,自动适应平台风格规范。 ### RAG 记忆 基于向量嵌入的长期记忆,代理能记住数周前的对话上下文。 ### 插件生态 Crypto/DeFi、社交、数据、游戏等丰富的社区插件。 ### 自定义动作 定义代理可执行的自定义操作,如查询价格、发送交易等。 --- ## 来源与感谢 > Created by [elizaOS](https://github.com/elizaOS). Licensed under MIT. > > [eliza](https://github.com/elizaOS/eliza) — ⭐ 18,000+ --- Source: https://tokrepo.com/en/workflows/90de93bb-bebd-464b-9acd-dfd848a6ff7f Author: TokRepo精选