Skip to content

Getting Started

This guide walks you through building, configuring, and running y-agent for the first time.

Prerequisites

DependencyRequired?Notes
Rust 1.94+YesPinned in rust-toolchain.toml
Node.js 18+GUI onlynodejs.org
SQLite 3.35+EmbeddedBundled, no action needed
Chrome / ChromiumOptionalFor the browser tool (auto-detected)
QdrantOptionalFor semantic vector search (knowledge base, memory)

Build

bash
# Clone
git clone https://github.com/gorgias/y-agent.git
cd y-agent

# Build CLI + Web server
cargo build --release
# Binary: target/release/y-agent

# Or build the GUI desktop app (Tauri v2)
cd crates/y-gui && npm install && cd ../..
./scripts/build-release.sh gui

Initialize Configuration

bash
# Interactive (recommended for first setup)
y-agent init

# Non-interactive
y-agent init --non-interactive --provider openai

This generates the configuration tree:

./
  .env                         # API key placeholders
  config/
    y-agent.example.toml       # Global settings (log level, output)
    providers.example.toml     # LLM provider pool  ** MUST configure **
    knowledge.example.toml     # Knowledge base & embedding
    storage.example.toml       # Database & transcript
    session.example.toml       # Session tree, compaction, auto-archive
    runtime.example.toml       # Docker / Native sandbox, resource limits
    browser.example.toml       # Browser tool
    hooks.example.toml         # Middleware timeouts, event bus capacity
    tools.example.toml         # Tool registry limits, MCP servers
    guardrails.example.toml    # Permission model, loop detection, risk scoring
    bots.toml                  # Bot adapter configuration (Discord, Feishu, Telegram)
    agents/                    # TOML-based agent definitions (18 built-in)
    persona/                   # Persona configuration
    prompts/                   # System prompt templates
  data/
    transcripts/               # Session transcript storage

Configure a Provider

This is the most critical step. Without at least one LLM provider, y-agent cannot function.

Copy config/providers.example.toml to config/providers.toml and edit it (or use the GUI Settings > Providers tab):

toml
[[providers]]
id = "openai-main"
provider_type = "openai"
model = "gpt-4o"
tags = ["reasoning", "general"]
max_concurrency = 3
context_window = 128000
api_key = "sk-your-openai-key-here"
enabled = true
# Or use an environment variable:
# api_key_env = "OPENAI_API_KEY"

Provider Presets

Providerprovider_typeModel ExampleAPI Key Env VarBase URL
OpenAIopenaigpt-4oOPENAI_API_KEY(default)
Anthropicanthropicclaude-sonnet-4-20250514ANTHROPIC_API_KEY(default)
Google Geminigeminigemini-2.5-flashGEMINI_API_KEY(default)
DeepSeekopenaideepseek-chatDEEPSEEK_API_KEYhttps://api.deepseek.com/v1
Groqopenaillama-3.3-70b-versatileGROQ_API_KEYhttps://api.groq.com/openai/v1
Together AIopenaimeta-llama/Llama-3.3-70BTOGETHER_API_KEYhttps://api.together.xyz/v1
Ollama (local)ollamallama3.1:8b(none)http://localhost:11434
Azure OpenAIazuregpt-4o(your key)https://your-resource.openai.azure.com/openai/deployments/gpt-4o
Any OpenAI-compatopenai(user-specified)(user-specified)(your endpoint /v1)

Multiple providers can coexist. y-agent routes requests by tags and automatically fails over when a provider is unavailable. Providers can be toggled on/off with the enabled field.

Start

bash
# CLI interactive chat
y-agent chat

# TUI mode (ratatui terminal UI)
y-agent tui

# Start the Web API server (axum, default port 3000)
y-agent serve

# Or launch the GUI desktop app
# (built via build-release.sh -- .app / .dmg / .AppImage in dist/)

Other CLI Commands

bash
y-agent status              # Show system status
y-agent config show         # View/manage configuration
y-agent session list        # Session management
y-agent agent list          # Agent management
y-agent tool list           # Tool management
y-agent workflow list       # Workflow management
y-agent skill list          # Skill management
y-agent kb ingest --file .. # Knowledge base management
y-agent diag traces         # Diagnostics and observability

Next Steps

Released under the MIT License.