### Database Agent Quick Start (Bash) Source: https://github.com/truffle-ai/saiki/blob/main/agents/README.md Provides the steps to set up and run a database agent. This involves navigating to the agent directory, executing a setup script, and starting the agent with a specific configuration file. ```bash cd database-agent ./setup-database.sh npm start -- --agent database-agent.yml ``` -------------------------------- ### Setup and Start Database Agent Source: https://github.com/truffle-ai/saiki/blob/main/agents/database-agent/README.md Commands to navigate to the agent directory, execute a setup script, and start the database agent using npm. This process initializes the agent for operation. ```bash cd database-agent ./setup-database.sh ``` ```npm npm start -- --agent database-agent.yml ``` -------------------------------- ### Verify Saiki installation with a command Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/getting-started/installation.md Tests the Saiki installation by executing a simple query to the agent runtime. If Saiki responds successfully, the installation and environment setup are confirmed to be working correctly. ```bash saiki "What is the current version of typescript?" ``` -------------------------------- ### Basic Agent Setup with OpenAI (TypeScript) Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/guides/typescript-sdk.md Initializes a SaikiAgent using the OpenAI provider and a specified model. It then starts the agent and runs a simple prompt, logging the response. ```typescript import { SaikiAgent } from '@truffle-ai/saiki'; // Create agent with minimal configuration const agent = new SaikiAgent({ llm: { provider: 'openai', model: 'gpt-4o', apiKey: process.env.OPENAI_API_KEY } }); await agent.start(); // Start a conversation const response = await agent.run('Hello! What can you help me with?'); console.log(response); ``` -------------------------------- ### Project Structure Setup Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/tutorials/multi-agent-systems.md Commands to create a project directory and initialize configuration files for the multi-agent example. ```bash mkdir multi-agent-example cd multi-agent-example # Create config files for each agent touch researcher.yml writer.yml .env ``` -------------------------------- ### Run Saiki Docker Container (Quick Start) Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/guides/deployment.md Runs the Saiki Docker container, mapping port 3001 for access and loading environment variables from a specified .env file. This starts the server for local testing. ```bash docker run --env-file .env -p 3001:3001 saiki ``` -------------------------------- ### OpenAI LLM Configuration Example Source: https://github.com/truffle-ai/saiki/blob/main/agents/README.md An example YAML snippet demonstrating how to configure the OpenAI provider with a specific model and API key. ```yaml llm: provider: openai model: gpt-4o apiKey: $OPENAI_API_KEY ``` -------------------------------- ### Basic Saiki Configuration Example Source: https://github.com/truffle-ai/saiki/blob/main/agents/README.md A fundamental YAML structure for Saiki, defining `mcpServers` for tool connections and `llm` for AI provider settings. ```yaml mcpServers: github: type: stdio command: npx args: - -y - "@modelcontextprotocol/server-github" env: GITHUB_PERSONAL_ACCESS_TOKEN: your-github-token filesystem: type: stdio command: npx args: - -y - "@modelcontextprotocol/server-filesystem" - . llm: provider: openai model: gpt-4 apiKey: $OPENAI_API_KEY ``` -------------------------------- ### Filesystem Tool Server Configuration Source: https://github.com/truffle-ai/saiki/blob/main/agents/README.md Example configuration for connecting to the Filesystem tool server via stdio, specifying the command and arguments. ```yaml filesystem: type: stdio command: npx args: - -y - "@modelcontextprotocol/server-filesystem" - . ``` -------------------------------- ### Run Saiki Discord Bot (Global Install) Source: https://github.com/truffle-ai/saiki/blob/main/src/app/discord/README.md Starts the Saiki Discord bot using a globally installed version. You can specify a custom configuration file path using the `--agent` flag. ```bash saiki --mode discord # With a custom config path: saiki --mode discord --agent ./agents/discord_bot_config.yml ``` -------------------------------- ### Google LLM Configuration Example Source: https://github.com/truffle-ai/saiki/blob/main/agents/README.md An example YAML snippet for configuring the Google AI provider, specifying the model and API key. ```yaml llm: provider: google model: gemini-2.0-flash apiKey: $GOOGLE_GENERATIVE_AI_API_KEY ``` -------------------------------- ### Start Saiki API Server Source: https://github.com/truffle-ai/saiki/blob/main/docs/api/getting-started.md This command initiates the Saiki server, which enables both the REST and WebSocket APIs. The server defaults to running on port 3001. ```bash saiki --mode server ``` -------------------------------- ### Production-Ready LLM Configuration Example (YAML) Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/guides/configuring-saiki/llm/configuration.md Presents a sample YAML configuration suitable for a production environment. This example focuses on essential parameters like provider, model, API key, temperature, and max output tokens, representing a stable and common setup for deploying LLMs. ```yaml llm: provider: openai model: gpt-4.1-mini apiKey: $OPENAI_API_KEY temperature: 0.3 maxOutputTokens: 4000 ``` -------------------------------- ### GitHub Tool Server Configuration Source: https://github.com/truffle-ai/saiki/blob/main/agents/README.md Example configuration for connecting to the GitHub tool server using the stdio type, including command and environment variables. ```yaml github: type: stdio command: npx args: - -y - "@modelcontextprotocol/server-github" env: GITHUB_PERSONAL_ACCESS_TOKEN: your-github-token ``` -------------------------------- ### Saiki SDK: Installation Source: https://github.com/truffle-ai/saiki/blob/main/docs/how-to-saiki.md Install the Saiki SDK package for use in your TypeScript or JavaScript projects via npm. ```bash npm install @truffle-ai/saiki ``` -------------------------------- ### Quick Setup Command Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/tutorials/product-name-scout-agent.md Executes the product name research agent from the Saiki project root. This command automatically handles the download and installation of all necessary MCP servers. ```bash # From the saiki project root saiki --agent agents/product-name-researcher/product-name-researcher.yml ``` -------------------------------- ### Complete Saiki Configuration Example (YAML) Source: https://github.com/truffle-ai/saiki/blob/main/agents/README.md A comprehensive YAML configuration for Saiki, demonstrating the integration of multiple tool servers (GitHub, filesystem, terminal, desktop, custom) and specifying LLM settings including provider, model, and API key. ```yaml mcpServers: github: type: stdio command: npx args: - -y - "@modelcontextprotocol/server-github" env: GITHUB_PERSONAL_ACCESS_TOKEN: your-github-token filesystem: type: stdio command: npx args: - -y - "@modelcontextprotocol/server-filesystem" - . terminal: type: stdio command: npx args: - -y - "@modelcontextprotocol/server-terminal" desktop: type: stdio command: npx args: - -y - "@wonderwhy-er/desktop-commander" custom: type: stdio command: node args: - --loader - ts-node/esm - src/servers/customServer.ts env: API_KEY: your-api-key llm: provider: openai model: gpt-4 apiKey: $OPENAI_API_KEY ``` -------------------------------- ### Run Saiki Discord Bot (Local Install) Source: https://github.com/truffle-ai/saiki/blob/main/src/app/discord/README.md Starts the Saiki Discord bot when running directly from the source code using `npm`. Supports specifying a custom configuration file path via the `--agent` flag. ```bash npm start -- --mode discord # With a custom config path: npm start -- --mode discord --agent ./agents/discord_bot_config.yml ``` -------------------------------- ### Anthropic LLM Configuration Example Source: https://github.com/truffle-ai/saiki/blob/main/agents/README.md An example YAML snippet showing the configuration for the Anthropic AI provider, including model and API key. ```yaml llm: provider: anthropic model: claude-3-7-sonnet-20250219 apiKey: $ANTHROPIC_API_KEY ``` -------------------------------- ### Advanced System Prompt Configuration Source: https://github.com/truffle-ai/saiki/blob/main/docs/how-to-saiki.md Illustrates a more sophisticated system prompt setup using contributors, allowing static content, file inclusion, and dynamic data. This enables richer context for the LLM. ```yaml systemPrompt: contributors: - id: main-prompt type: static priority: 0 content: | You are Saiki, an expert coding assistant. You have access to a filesystem and a browser. - id: project-context type: file priority: 10 files: - ./README.md # Relative to config file location - ./docs/architecture.md # Relative to config file location - ./CONTRIBUTING.md # Relative to config file location options: includeFilenames: true separator: "\n\n---\n\n" errorHandling: "skip" maxFileSize: 50000 includeMetadata: false - id: current-time type: dynamic priority: 20 source: dateTime - id: mcp-resources type: dynamic priority: 25 source: resources enabled: true ``` -------------------------------- ### Quick Setup for Talk2PDF Agent Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/tutorials/talk2pdf-agent.md This command initiates the Talk2PDF agent. The associated MCP server, '@truffle-ai/talk2pdf-mcp', is automatically downloaded and installed via npx on the first execution. ```bash # From the saiki project root saiki --agent agents/talk2pdf-agent/talk2pdf-agent.yml ``` -------------------------------- ### Start Saiki CLI with Custom Configuration Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/guides/cli.md Initializes the Saiki CLI using a specific agent configuration file. This enables users to define custom AI agent behaviors, tools, and knowledge bases. ```bash saiki --agent ``` -------------------------------- ### Database Agent Example Interactions (Text) Source: https://github.com/truffle-ai/saiki/blob/main/agents/README.md Illustrates example natural language queries that can be used with the database agent. These queries cover common database operations like retrieving data, creating records, and generating reports. ```text Show me all users Create a new user named John Doe with email john@example.com Find products under $100 Generate a sales report by category ``` -------------------------------- ### Create Basic Saiki Agent (TypeScript) Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/guides/typescript-sdk.md Demonstrates initializing a SaikiAgent with OpenAI LLM configuration, starting it, running a query, and stopping the agent. Requires an OpenAI API key set in the environment. ```typescript import { SaikiAgent } from '@truffle-ai/saiki'; const agent = new SaikiAgent({ llm: { provider: 'openai', model: 'gpt-4', apiKey: process.env.OPENAI_API_KEY, }, }); await agent.start(); const response = await agent.run('Hello, world!'); console.log(response); await agent.stop(); ``` -------------------------------- ### Local Development LLM Configuration Example (YAML) Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/guides/configuring-saiki/llm/configuration.md Provides a YAML configuration example tailored for local development. This setup often includes a local model, a dummy API key, a local 'baseURL' (e.g., for Ollama), and specific settings for token limits and the router, facilitating testing and debugging on a local machine. ```yaml llm: provider: openai model: llama3.2 apiKey: dummy baseURL: http://localhost:11434/v1 maxInputTokens: 8000 maxOutputTokens: 4000 temperature: 0.7 router: in-built ``` -------------------------------- ### Start Saiki Server Source: https://github.com/truffle-ai/saiki/blob/main/postman/README.md Instructions to build the Saiki project and start the server using Node.js. This is a prerequisite for testing the API. ```bash npm run build node dist/src/app/index.js --mode server --agent test-config.yml ``` -------------------------------- ### Launch Interactive Saiki CLI Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/guides/cli.md Starts the Saiki CLI in interactive mode, allowing direct conversation with AI agents. This is the primary way to engage with Saiki for general tasks. ```bash saiki ``` -------------------------------- ### Install Saiki CLI using npm Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/getting-started/installation.md Installs the Saiki command-line interface globally on your system using npm. This makes the 'saiki' command available for use in your terminal. Ensure Node.js and npm are installed and configured. ```bash npm install -g @truffle-ai/saiki ``` -------------------------------- ### OpenAI LLM Provider Configuration Example (YAML) Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/guides/configuring-saiki/llm/configuration.md Provides a typical YAML configuration for using OpenAI as the LLM provider. It includes essential fields like provider, model, API key, and optional parameters for temperature and maximum output tokens, showcasing a common setup for OpenAI models. ```yaml llm: provider: openai model: gpt-4.1-mini apiKey: $OPENAI_API_KEY temperature: 0.7 maxOutputTokens: 4000 ``` -------------------------------- ### Start Saiki CLI with Different LLMs Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/guides/cli.md Launches the Saiki CLI using a specified Large Language Model (LLM). This allows users to choose between different providers like OpenAI, Anthropic, or Google for their AI interactions. ```bash # openai saiki -m gpt-4o # anthropic saiki -m claude-4-sonnet-20250514 # google saiki -m gemini-2.0-flash ``` -------------------------------- ### Install Dependencies with Yarn Source: https://github.com/truffle-ai/saiki/blob/main/docs/README.md Installs project dependencies using Yarn. This is the first step before running any development or build commands. ```bash $ yarn ``` -------------------------------- ### Run Database Agent Setup Script Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/tutorials/database-agent.md Navigates to the database agent directory and executes a setup script to initialize the database with sample data. This script sets up tables like Users, Products, Orders, and Order items. ```bash # Navigate to the database agent directory cd agents/database-agent # Run the setup script to initialize the database ./setup-database.sh ``` -------------------------------- ### Saiki SDK: Programmatic Usage Source: https://github.com/truffle-ai/saiki/blob/main/docs/how-to-saiki.md Example of how to use the SaikiAgent class to programmatically control the AI agent. This includes loading configurations, starting the agent, running tasks, managing conversations, and stopping the agent. ```typescript import 'dotenv/config'; import { SaikiAgent, loadAgentConfig } from '@truffle-ai/saiki'; // Load configuration from default location (auto-discovery) const config = await loadAgentConfig(); // Or load from a specific file // const config = await loadAgentConfig('./agents/agent.yml'); // Create and start the agent const agent = new SaikiAgent(config); await agent.start(); // Initializes services like MCP servers // Run a single task const response = await agent.run('List the 3 largest files in the current directory.'); console.log(response); // Hold a conversation (state is maintained automatically) await agent.run('Write a function that adds two numbers.'); await agent.run('Now add type annotations to it.'); // Reset the conversation history agent.resetConversation(); // Stop the agent and disconnect services await agent.stop(); ``` -------------------------------- ### Saiki Agent Configuration Examples (YAML) Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/tutorials/index.md Illustrates environment-specific configurations for the SaikiAgent using YAML. Shows settings for development (faster, cheaper model) and production (more capable model, temperature tuning), and how to add new capabilities via MCP servers. ```yaml # Development Configuration llm: provider: openai model: gpt-4.1-mini # Faster, cheaper for dev apiKey: $OPENAI_API_KEY # Production Configuration llm: provider: openai model: gpt-4.1 # More capable for production apiKey: $OPENAI_API_KEY temperature: 0.3 # More consistent responses # Adding More Capabilities (MCP Servers) mcpServers: filesystem: type: stdio command: npx args: ["-y", "@modelcontextprotocol/server-filesystem", "."] puppeteer: type: stdio command: npx args: ["-y", "@truffle-ai/puppeteer-server"] # Add more servers for additional capabilities ``` -------------------------------- ### Create Agent Directory and Basic Configuration Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/getting-started/first-agent-tutorial.md This snippet shows the initial steps to set up a new Saiki agent project. It involves creating a project directory and adding a minimal `agent.yml` file to define the agent's language model provider and model. ```bash mkdir my-pirate-agent cd my-pirate-agent ``` ```yaml # agent.yml systemPrompt: | You are a helpful AI assistant. llm: provider: openai model: gpt-4.1-mini ``` -------------------------------- ### Install Saiki TypeScript SDK (Bash) Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/guides/typescript-sdk.md Installs the Saiki TypeScript/JavaScript SDK using npm. This command should be run in your project's terminal. ```bash npm install @truffle-ai/saiki ``` -------------------------------- ### Start the Database Agent Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/tutorials/database-agent.md Sets the OpenAI API key as an environment variable and then starts the Saiki database agent using the specified configuration file. ```bash # Set your OpenAI API key export OPENAI_API_KEY="your-openai-api-key" # Start the database agent saiki --agent database-agent.yml ``` -------------------------------- ### Install Saiki CLI Source: https://github.com/truffle-ai/saiki/blob/main/docs/how-to-saiki.md Installs the Saiki command-line interface globally using npm. This is the primary method for interacting with Saiki from the terminal. ```bash npm install -g @truffle-ai/saiki ``` -------------------------------- ### LLM Providers: Quick Setup & Switching Source: https://github.com/truffle-ai/saiki/blob/main/README.md Sets environment variables for API keys and demonstrates how to run Saiki with the default OpenAI provider, and how to switch to other providers like Anthropic or Google via the CLI. ```bash # OpenAI (default) export OPENAI_API_KEY=your_openai_api_key_here export ANTHROPIC_API_KEY=your_anthropic_api_key_here export GOOGLE_GENERATIVE_AI_API_KEY=your_google_gemini_api_key_here saiki # Switch providers via CLI saiki -m claude-3.5-sonnet-20240620 saiki -m gemini-1.5-flash-latest ``` -------------------------------- ### Implement Fallback Configuration on Setup Failure Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/guides/typescript-sdk.md Illustrates how to implement graceful degradation by falling back to a minimal configuration if the primary agent setup fails. This ensures basic functionality even with critical errors. ```typescript try { const agent = new SaikiAgent({ llm: primaryLLMConfig, mcpServers: allServers }); await agent.start(); } catch (error) { console.warn('⚠️ Full setup failed, using minimal config'); // Fallback to basic configuration const agent = new SaikiAgent({ llm: fallbackLLMConfig, mcpServers: {} // No external tools }); await agent.start(); } ``` -------------------------------- ### Quick Start MCPManager Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/guides/mcp-manager.md Demonstrates the basic usage of MCPManager, including creating an instance, connecting to a filesystem MCP server via stdio, retrieving all available tools, and executing a 'readFile' tool. ```typescript import { MCPManager } from '@truffle-ai/saiki'; // Create manager instance const manager = new MCPManager(); // Connect to an MCP server await manager.connectServer('filesystem', { type: 'stdio', command: 'npx', args: ['-y', '@modelcontextprotocol/server-filesystem', '.'] }); // Get available tools const tools = await manager.getAllTools(); console.log('Available tools:', Object.keys(tools)); // Execute a tool const result = await manager.executeTool('readFile', { path: './README.md' }); console.log(result); ``` -------------------------------- ### Start Saiki in Remote Server Mode Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/guides/saiki-as-mcp-server.md Commands to start a Saiki agent in server mode for remote MCP connections. Includes options for global installation or using npx, and how to specify custom ports and enable debug logging. ```bash # If installed globally saiki --mode server # Or via npx npx @truffle-ai/saiki --mode server ``` ```bash # Custom port using environment variable API_PORT=8080 saiki --mode server # Or via npx API_PORT=8080 npx @truffle-ai/saiki --mode server # Custom port for network access API_PORT=3001 saiki --mode server # Or via npx API_PORT=3001 npx @truffle-ai/saiki --mode server # Enable debug logging saiki --mode server --debug # Or via npx npx @truffle-ai/saiki --mode server --debug ``` -------------------------------- ### Example Local MCP Server Configuration Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/guides/configuring-saiki/mcpServers.md Provides YAML examples for configuring local MCP servers. Demonstrates setting up `stdio` servers for filesystem access and puppeteer, including specific commands, arguments, and connection modes. ```yaml mcpServers: filesystem: type: stdio command: npx args: - -y - "@modelcontextprotocol/server-filesystem" - . connectionMode: strict # This server must connect successfully puppeteer: type: stdio command: node args: - dist/src/servers/puppeteerServer.js timeout: 30000 connectionMode: lenient # This server is optional ``` -------------------------------- ### API Key Configuration Methods Source: https://github.com/truffle-ai/saiki/blob/main/agents/README.md Explains secure methods for setting API keys, recommending environment variables over direct configuration. ```yaml # Recommended: Reference environment variables apiKey: $OPENAI_API_KEY # Not recommended: Direct API key in config # apiKey: sk-actual-api-key ``` -------------------------------- ### Configure In-Memory Storage Backend Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/guides/typescript-sdk.md Example configuration for using in-memory storage for both cache and database. This is typically used for development or testing purposes. ```typescript // In-memory (development) const memoryStorage = { cache: { type: 'in-memory' }, database: { type: 'in-memory' } }; ``` -------------------------------- ### Terminal Tool Server Configuration Source: https://github.com/truffle-ai/saiki/blob/main/agents/README.md Example configuration for connecting to the Terminal tool server using the stdio type, including command and arguments. ```yaml terminal: type: stdio command: npx args: - -y - "@modelcontextprotocol/server-terminal" ``` -------------------------------- ### Run Music Creator Agent with Saiki CLI Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/tutorials/music-agent.md This command initiates the Music Creator Agent by pointing the Saiki CLI to its configuration file. It automatically handles the download and installation of the necessary MCP server via `uvx`. ```bash # From the saiki project root saiki --agent agents/music-agent/music-agent.yml ``` -------------------------------- ### Start Saiki Music Agent Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/tutorials/music-agent.md Command to launch the Saiki music creator agent from the project root directory. It specifies the agent configuration file to use. ```bash # From the project root saiki --agent agents/music-agent/music-agent.yml ``` -------------------------------- ### Run Saiki Telegram Bot (CLI) Source: https://github.com/truffle-ai/saiki/blob/main/src/app/telegram/README.md Starts the Saiki Telegram bot using the command-line interface. Supports specifying a custom configuration path. ```bash saiki --mode telegram # With a custom config path: saiki --mode telegram --agent ./agents/telegram_bot_config.yml ``` -------------------------------- ### Build Saiki Docker Image Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/guides/deployment.md Builds the Docker image for the Saiki application with the tag 'saiki'. This is the first step in deploying Saiki via Docker. ```bash docker build -t saiki . ``` -------------------------------- ### Saiki CLI: Interactive Mode Source: https://github.com/truffle-ai/saiki/blob/main/docs/how-to-saiki.md Start an interactive chat session with the Saiki agent in the terminal. This mode allows for multi-turn conversations and stateful interactions. ```bash saiki ``` -------------------------------- ### Complete Example Usage (TypeScript) Source: https://github.com/truffle-ai/saiki/blob/main/docs/api/mcp-manager.md Demonstrates the complete workflow of initializing `MCPManager`, connecting to servers, executing tools, retrieving available tools, and disconnecting. ```typescript import { MCPManager } from '@truffle-ai/saiki'; const manager = new MCPManager(); // Connect to servers await manager.connectServer('filesystem', { type: 'stdio', command: 'npx', args: ['-y', '@modelcontextprotocol/server-filesystem', '.'] }); // Execute tools directly const result = await manager.executeTool('readFile', { path: './README.md' }); console.log('Read file result:', result); // Get all available tools const tools = await manager.getAllTools(); console.log('Available tools:', Object.keys(tools)); // Clean up await manager.disconnectAll(); ``` -------------------------------- ### Configure Cohere LLM Provider Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/guides/typescript-sdk.md Provides configuration examples for using Cohere as an LLM provider. Includes parameters like model name, API key, and temperature. ```typescript // Cohere const cohereConfig = { provider: 'cohere', model: 'command-a-03-2025', apiKey: process.env.COHERE_API_KEY, temperature: 0.3 }; ``` -------------------------------- ### Run Saiki Telegram Bot (npm) Source: https://github.com/truffle-ai/saiki/blob/main/src/app/telegram/README.md Starts the Saiki Telegram bot using npm, typically when running from source. Supports specifying a custom configuration path. ```bash npm start -- --mode telegram # With a custom config path: npm start -- --mode telegram --agent ./agents/telegram_bot_config.yml ``` -------------------------------- ### Basic Saiki Agent Configuration Example Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/guides/configuring-saiki/overview.md An example YAML configuration file for a Saiki agent, showing essential sections like `systemPrompt`, `llm` (OpenAI provider), and `mcpServers` (filesystem). It highlights the use of environment variables for secrets. ```yaml # agent.yml - Basic agent configuration systemPrompt: | You are a helpful AI assistant with access to tools. Use these tools when appropriate to answer user queries. You can use multiple tools in sequence to solve complex problems. After each tool result, determine if you need more information or can provide a final answer. llm: provider: openai model: gpt-4.1-mini # you can update the system prompt to change the behavior of the llm apiKey: $OPENAI_API_KEY mcpServers: filesystem: type: stdio command: npx args: ["-y", "@modelcontextprotocol/server-filesystem", "."] ``` -------------------------------- ### Configure Anthropic LLM Provider Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/guides/typescript-sdk.md Provides configuration examples for using Anthropic as an LLM provider. Includes parameters like model name, API key, and maximum iterations. ```typescript // Anthropic const anthropicConfig = { provider: 'anthropic', model: 'claude-3-opus-20240229', apiKey: process.env.ANTHROPIC_API_KEY, maxIterations: 5 }; ``` -------------------------------- ### Create New Saiki Application Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/guides/cli.md Initializes a fresh TypeScript project for building AI applications using the saiki-core library. This command sets up the basic project structure and dependencies. ```bash saiki create-app ``` -------------------------------- ### Run Saiki Agent with Custom Configuration Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/getting-started/first-agent-tutorial.md This command shows how to execute a Saiki agent from the command line using a specified configuration file. It allows for testing the agent's behavior with its defined personality and settings. ```bash saiki --agent agent.yml "Who are you?" ``` -------------------------------- ### Run Saiki Docker Container in Background Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/guides/deployment.md Starts the Saiki Docker container in detached mode (background), assigning a name for easier management and mapping ports. This is suitable for long-running server instances. ```bash docker run -d --name saiki-server --env-file .env -p 3001:3001 saiki ``` -------------------------------- ### Start Interactive Saiki Agent Session Source: https://github.com/truffle-ai/saiki/blob/main/docs/docs/getting-started/first-agent-tutorial.md This command initiates an interactive session with a Saiki agent. Users can then converse with the agent and test its integrated tools, such as web browsing, by providing prompts. ```bash saiki --agent agent.yml ```