# `mix jido_ai`
[🔗](https://github.com/agentjido/jido_ai/blob/v2.4.0/lib/mix/tasks/jido_ai.ex#L1)

Unified Jido AI CLI task.

Provide a query for one-shot execution, or `--stdin` for batch mode.

## Quick Start

    # One-shot query
    mix jido_ai "Calculate 15 * 7 + 3"

    # Batch mode from stdin
    cat queries.txt | mix jido_ai --stdin --format json --quiet

## Modes

- One-shot mode: query args provided
- Stdin mode: `--stdin`

## Options

### Agent Configuration
    --agent MODULE       Use existing agent module (ignores --model/--tools/--system)
    --type TYPE          Agent type: react (default), aot, cod, cot, tot, got, trm, adaptive
    --model MODEL        LLM model alias/spec (default: :fast via Jido.AI.resolve_model/1)
    --tools MODULES      Comma-separated tool modules
    --system PROMPT      System prompt
    --max-iterations N   Max reasoning iterations (default: 10)

### Input Mode
    --stdin              Read queries from stdin (one per line)

### Output Format (one-shot/stdin)
    --format FORMAT      text (default) | json
    --quiet              Suppress logs (use with --format json)

### Execution
    --timeout MS         Timeout in ms (default: 60000)
    --trace              Show signals, directives, and AI lifecycle events

## Examples

    # One-shot with a custom agent
    mix jido_ai --agent MyApp.WeatherAgent "Will it rain in Seattle?"

    # One-shot with specific model/tools
    mix jido_ai --model openai:gpt-4o --tools Jido.Tools.Arithmetic "15 * 23"

    # One-shot with tracing
    mix jido_ai --trace "Will it rain in Seattle today?"

---

*Consult [api-reference.md](api-reference.md) for complete listing*
