# AI Features Guide

Demeter includes assistive intelligence to identify plants, diagnose problems,
plan plantings, and answer gardening questions. These features are surfaced
contextually across the app (and via the mobile **Garden Assistant**), backed by
the API's `/v1/ai/*` endpoints.

## What you can do

| Feature                   | Where                    | What it does                                                                           |
| ------------------------- | ------------------------ | -------------------------------------------------------------------------------------- |
| **Plant identification**  | Camera / photo upload    | Identify a species from a photo (`/v1/ai/identify-plant`)                              |
| **Problem diagnosis**     | From a planting or photo | Diagnose pests/diseases/deficiencies and suggest treatments (`/v1/ai/diagnose`)        |
| **Planting plan**         | Garden planner           | Generate a planting plan for your beds, season, and zone (`/v1/ai/planting-plan`)      |
| **Layout optimization**   | Garden planner           | Suggest a better bed arrangement (spacing, companions, sun) (`/v1/ai/optimize-layout`) |
| **Harvest prediction**    | Planting detail          | Predict harvest timing from stage + conditions (`/v1/ai/harvest-predict`)              |
| **Garden assistant chat** | Mobile assistant         | Ask free-form gardening questions in context (`/v1/ai/chat`)                           |

## Identify a plant

Point your camera at a plant (or upload a photo). Demeter returns likely species
with confidence; from there you can open the
[encyclopedia](plant-encyclopedia.md) entry or add it as a planting.

## Diagnose a problem

Spotted spots, wilting, or pests? Submit a photo and a description. The
diagnosis returns probable causes and recommended treatments, which you can
record against the planting's pest report and track for effectiveness.

## Plan and optimize

From the garden planner, ask Demeter to **generate a planting plan** (what to
put where, given your beds, climate zone, and season) or **optimize an existing
layout** for spacing, companion pairings, and sun exposure.

## Ask the assistant

The mobile **Garden Assistant** answers questions ("why are my tomato leaves
curling?", "what should I do in the garden this week?") using your garden's
context. Conversations can be multi-turn.

## Good to know

These features assist your judgment — they don't replace it. Identification and
diagnosis return confidence levels; always sanity-check before acting on a
treatment, especially for edible crops.
