diff --git a/.env.example b/.env.example index 295dc3aaf0..ddb5031a37 100644 --- a/.env.example +++ b/.env.example @@ -3,6 +3,7 @@ DISCORD_APPLICATION_ID= DISCORD_API_TOKEN= # Bot token OPENAI_API_KEY=sk-* # OpenAI API key, starting with sk- REDPILL_API_KEY= # REDPILL API Key +GROK_API_KEY= # GROK API Key GROQ_API_KEY=gsk_* OPENROUTER_API_KEY= GOOGLE_GENERATIVE_AI_API_KEY= # Gemini API key @@ -37,20 +38,20 @@ POST_INTERVAL_MAX= #180 #Default #USE IMAGE GEN IMAGE_GEN= #TRUE -#Leave blank to use local embeddings +#Leave blank to use local embeddings USE_OPENAI_EMBEDDING= #TRUE #OpenRouter (Use one model for everything or set individual for small, medium, large tasks) #leave blank to use defaults hermes 70b for small tasks & 405b for medium/large tasks OPENROUTER_MODEL= -SMALL_OPENROUTER_MODEL= -MEDIUM_OLLAMA_MODEL= -LARGE_OLLAMA_MODEL= +SMALL_OPENROUTER_MODEL= +MEDIUM_OLLAMA_MODEL= +LARGE_OLLAMA_MODEL= -#Set to Use for New OLLAMA provider +#Set to Use for New OLLAMA provider OLLAMA_SERVER_URL= #Leave blank for default localhost:11434 -OLLAMA_MODEL= +OLLAMA_MODEL= OLLAMA_EMBEDDING_MODEL= #default mxbai-embed-large #To use custom model types for different tasks set these SMALL_OLLAMA_MODEL= #default llama3.2 diff --git a/docs/docs/core/actions.md b/docs/docs/core/actions.md index 89e8f468c4..c41e0a3894 100644 --- a/docs/docs/core/actions.md +++ b/docs/docs/core/actions.md @@ -6,6 +6,8 @@ sidebar_position: 6 Actions are core building blocks in Eliza that define how agents respond to and interact with messages. They allow agents to interact with external systems, modify their behavior, and perform tasks beyond simple message responses. +--- + ## Overview Each Action consists of: @@ -17,6 +19,8 @@ Each Action consists of: - `handler`: Implementation of the action's behavior - `examples`: Array of example usage patterns +--- + ## Implementation ```typescript @@ -36,6 +40,8 @@ Source: https://github.com/ai16z/eliza/packages/core/src/types.ts # Built-in Actions +--- + ## Conversation Flow ### CONTINUE @@ -57,6 +63,8 @@ Source: https://github.com/ai16z/eliza/packages/core/src/types.ts - Default response action - Used for standard conversational replies +--- + ## External Integrations ### TAKE_ORDER @@ -81,6 +89,8 @@ const take_order: Action = { Source: https://github.com/ai16z/eliza/packages/plugin-solana/src/actions/takeOrder.ts +--- + ## Creating Custom Actions 1. Implement the Action interface @@ -123,6 +133,8 @@ test("Validate action behavior", async () => { }); ``` +--- + ## Core Concepts ### Action Structure @@ -151,6 +163,8 @@ interface Action { - **handler**: Implements the action's behavior - **examples**: Demonstrates proper usage patterns +--- + ## Built-in Actions ### CONTINUE @@ -205,6 +219,8 @@ const followRoomAction: Action = { }; ``` +--- + ## Creating Custom Actions ### Basic Action Template @@ -273,6 +289,8 @@ const complexAction: Action = { }; ``` +--- + ## Implementation Patterns ### State-Based Actions @@ -310,6 +328,8 @@ const serviceAction: Action = { }; ``` +--- + ## Best Practices ### Action Design @@ -368,6 +388,8 @@ examples: [ ]; ``` +--- + ## Troubleshooting ### Common Issues @@ -425,6 +447,8 @@ const chainedAction: Action = { }; ``` +--- + ## Example: Complete Action Implementation ```typescript @@ -498,6 +522,8 @@ const documentAnalysisAction: Action = { }; ``` +--- + # Best Practices 1. **Validation** @@ -517,6 +543,8 @@ const documentAnalysisAction: Action = { - Document expected inputs/outputs - Explain error scenarios +--- + ## Further Reading - [Provider System](./providers.md) diff --git a/docs/docs/core/agents.md b/docs/docs/core/agents.md index f9ea88fb7f..77f7bc1330 100644 --- a/docs/docs/core/agents.md +++ b/docs/docs/core/agents.md @@ -10,7 +10,7 @@ Agents are the core components of the Eliza framework that handle autonomous int ## Overview -The [AgentRuntime](/api/classes/AgentRuntime) class is the primary implementation of the [IAgentRuntime](/api/interfaces) interface, which manages the agent's core functions, including: +The [AgentRuntime](/api/classes/AgentRuntime) class is the primary implementation of the [IAgentRuntime](/api/interfaces/IAgentRuntime) interface, which manages the agent's core functions, including: - **Message and Memory Processing**: Storing, retrieving, and managing conversation data and contextual memory. - **State Management**: Composing and updating the agentโ€™s state for a coherent, ongoing interaction. @@ -90,7 +90,7 @@ const runtime = new AgentRuntime({ ## State Management -This section should cover how agents manage and update state, with a focus on initial state composition and updating methods. The runtime maintains state through the [State](/api/interfaces) interface: +This section should cover how agents manage and update state, with a focus on initial state composition and updating methods. The runtime maintains state through the [State](/api/interfaces/state) interface: ```typescript interface State { @@ -148,7 +148,7 @@ The Eliza framework uses multiple types of memory to support an agent's long-ter - **RAG Integration**: Uses a vector search to perform contextual recall based on similarity matching. This enables the agent to retrieve relevant memory snippets or knowledge based on the content and intent of the current conversation, making its responses more contextually relevant. -The runtime uses multiple specialized [IMemoryManager](/api/interfaces) instances: +The runtime uses multiple specialized [IMemoryManager](/api/interfaces/IMemoryManager) instances: - `messageManager` - conversation messages and responses - `descriptionManager` - user descriptions and profiles @@ -210,6 +210,8 @@ await memoryManager.createMemory({ - Use immutability in state management. - Log errors and maintain stability during service failures. +--- + ## Evaluation System The runtime's [evaluate](/api/classes/AgentRuntime#evaluate) method processes evaluations: @@ -250,6 +252,7 @@ await memoryManager.createMemory({ roomId, }); ``` +--- ## Further Reading diff --git a/docs/docs/core/characterfile.md b/docs/docs/core/characterfile.md index 7ab64396e7..a57e5318d1 100644 --- a/docs/docs/core/characterfile.md +++ b/docs/docs/core/characterfile.md @@ -6,9 +6,11 @@ sidebar_position: 4 Character files are JSON-formatted configurations that define an AI character's personality, knowledge, and behavior patterns. This guide explains how to create effective character files for use with Eliza agents. +--- + ## Overview -A `characterfile` implements the [Character](/api/type-aliases) type and defines the character's: +A `characterfile` implements the [Character](/api/type-aliases/character) type and defines the character's: - Core identity and behavior - Model provider configuration @@ -90,11 +92,11 @@ The character's display name for identification and in conversations. #### `modelProvider` (required) -Specifies the AI model provider. Supported options from [ModelProviderName](/api/enumerations) include `ANTHROPIC`, `LLAMALOCAL`, `OPENAI`, and others. +Specifies the AI model provider. Supported options from [ModelProviderName](/api/enumerations/modelprovidername) include `ANTHROPIC`, `LLAMALOCAL`, `OPENAI`, and others. #### `clients` (required) -Array of supported client types from [Clients](/api/enumerations) e.g., `DISCORD`, `DIRECT`, `TWITTER`, `TELEGRAM`. +Array of supported client types from [Clients](/api/enumerations/clients) e.g., `DISCORD`, `DIRECT`, `TWITTER`, `TELEGRAM`. #### `bio` @@ -205,6 +207,8 @@ The `settings` object defines additional configurations like secrets and voice m } ``` +--- + ## Example: Complete Character File ```json @@ -290,6 +294,8 @@ npx knowledge2character - Show character-specific responses - Demonstrate typical interaction patterns +--- + ## Tips for Quality 1. **Bio and Lore** @@ -316,6 +322,8 @@ npx knowledge2character - Organize in digestible chunks - Update regularly to maintain relevance +--- + ## Further Reading - [Agents Documentation](./agents.md) diff --git a/docs/docs/core/evaluators.md b/docs/docs/core/evaluators.md index 5805ca4a3b..b684dacdb6 100644 --- a/docs/docs/core/evaluators.md +++ b/docs/docs/core/evaluators.md @@ -4,24 +4,21 @@ sidebar_position: 5 # ๐Ÿ“Š Evaluators -## Table of Contents +[Evaluators](/api/interfaces/evaluator) are core components that assess and extract information from conversations. They integrate with the [AgentRuntime](/api/classes/AgentRuntime)'s evaluation system. -- [Overview](#overview) -- [Quick Start](#quick-start) -- [Best Practices](#best-practices) -- [Built-in Evaluators](#built-in-evaluators) -- [Creating Custom Evaluators](#creating-custom-evaluators) -- [Memory Integration](#memory-integration) +--- ## Overview -[Evaluators](/api/interfaces) are core components that assess and extract information from conversations. They integrate with the [AgentRuntime](/api/classes/AgentRuntime)'s evaluation system, enabling agents to: + Evaluators enable agents to: - Build long-term memory - Track goal progress - Extract facts and insights - Maintain contextual awareness +--- + ## Quick Start 1. Import the necessary evaluator types: @@ -46,6 +43,8 @@ const evaluator: Evaluator = { }; ``` +--- + ## Built-in Evaluators ### Fact Evaluator @@ -205,6 +204,8 @@ const memoryEvaluator: Evaluator = { }; ``` +--- + ## Integration with Agent Runtime The [AgentRuntime](/api/classes/AgentRuntime) processes evaluators through its [evaluate](/api/classes/AgentRuntime#evaluate) method: @@ -217,6 +218,8 @@ runtime.registerEvaluator(customEvaluator); const results = await runtime.evaluate(message, state); ``` +--- + ## Error Handling ```typescript diff --git a/docs/docs/core/providers.md b/docs/docs/core/providers.md index 1d9a5b6580..82626f7ee3 100644 --- a/docs/docs/core/providers.md +++ b/docs/docs/core/providers.md @@ -1,6 +1,8 @@ # ๐Ÿ”Œ Providers -[Providers](/api/interfaces) are core modules that inject dynamic context and real-time information into agent interactions. They serve as a bridge between the agent and various external systems, enabling access to market data, wallet information, sentiment analysis, and temporal context. +[Providers](/api/interfaces/provider) are core modules that inject dynamic context and real-time information into agent interactions. They serve as a bridge between the agent and various external systems, enabling access to market data, wallet information, sentiment analysis, and temporal context. + +--- ## Overview diff --git a/docs/docs/quickstart.md b/docs/docs/quickstart.md index f678a71623..b0fb34bdf1 100644 --- a/docs/docs/quickstart.md +++ b/docs/docs/quickstart.md @@ -60,6 +60,7 @@ Before getting started with Eliza, ensure you have: DISCORD_API_TOKEN= # Bot token HEURIST_API_KEY= # Heurist API key for LLM and image generation OPENAI_API_KEY= # OpenAI API key + GROK_API_KEY= # Grok API key ELEVENLABS_XI_API_KEY= # API key from elevenlabs (for voice) ``` diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index bdacb55d9e..519ca70d6e 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -2,7 +2,7 @@ import { themes as prismThemes } from "prism-react-renderer"; const config = { title: "eliza", - tagline: "The flexible, scalable AI agent for everyone", + tagline: "Flexible, scalable AI agents for everyone", favicon: "img/favicon.ico", url: "https://ai16z.github.io", baseUrl: "/eliza/",