⚡ You are viewing: Quick Reference - Common mixin usage patternsSee also: 17 Detailed Mixin Specifications (under Specifications → Tool Mixins)
Import:
from gaia.agents.tools.file_monitor_tools import FileToolsMixinPurpose: Reusable tool sets that can be mixed into your agents. Available Mixins: For complete API specifications of all 17 mixins, see Specifications → Tool Mixins
Composable mixins (registry)
The agent registry exposes these mixins by name inKNOWN_TOOLS
(src/gaia/agents/registry.py).
A custom agent can compose any of them by listing the
tool name — BuilderAgent’s template wires the import and base class for you.
Each row is the exact name → module.Class mapping the registry resolves:
The sections below show usage patterns for the most common mixins; the
file_io mixin is covered under Code Development.
9.1 File Watching Mixin
Detailed Spec: FileToolsMixin The chat-toolsFileToolsMixin is narrowly scoped to watching directories
for new documents; it does not register read/write/list tools. Use
FileSearchToolsMixin (§9.4 below) when you need generic filesystem I/O.
9.2 RAG Tools Mixin
Import:from gaia.agents.tools.rag_tools import RAGToolsMixin
Detailed Spec: RAGToolsMixin
9.3 Shell Commands Mixin
Import:from gaia.agents.tools.shell_tools import ShellToolsMixin
Detailed Spec: ShellToolsMixin
9.4 File Search Mixin
Import:from gaia.agents.tools.file_tools import FileSearchToolsMixin
Detailed Spec: FileSearchToolsMixin
FileSearchToolsMixin is the general-purpose filesystem toolbox — it’s what
powers read_file / write_file in the chat agent.
9.5 Stable Diffusion Mixin
Import:from gaia.sd import SDToolsMixin
Detailed Guide: Image Generation Guide
Source: src/gaia/sd/mixin.py
generate_image(prompt, model, size, steps, cfg_scale, seed)- Generate images with SDlist_sd_models()- Show available modelsget_generation_history(limit)- See generated images from session
- SDXL-Turbo (default) - Fast, 512x512, ~17s
- SD-Turbo - Faster, 512x512, ~13s
- SDXL-Base-1.0 - Photorealistic, 1024x1024, ~9min
- SD-1.5 - Legacy, 512x512, ~88s
9.6 Vision Language Model Mixin
Import:from gaia.vlm import VLMToolsMixin
Source: src/gaia/vlm/mixin.py
analyze_image(image_path, focus)- Get detailed image descriptioncreate_story_from_image(image_path, story_style)- Generate creative narrativeanswer_question_about_image(image_path, question)- Answer specific questions
composition, colors, mood, details, all (default)
Story Styles: whimsical, dramatic, educational, adventure, any (default)
Related Topics
- Core Agent System - Learn about the base Agent class
- Code Development Mixins - Specialized code development tools
- User Guides - Pre-built agent implementations
- Best Practices - Agent development guidelines