> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eyesotope.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Assistant

> Chat with Tako — your AI-powered farm assistant with real-time streaming, file analysis, web research, and deep reasoning

# AI Assistant

Eyesotope includes **Tako**, a built-in AI assistant that can analyze your farm data, answer questions, generate reports, and provide actionable recommendations — all in a real-time streaming chat interface.

## Accessing the AI Assistant

1. Navigate to **AI** in the left sidebar
2. The chat interface opens with a conversation panel on the left and the chat area on the right
3. Click **New** to start a fresh conversation, or select a previous one from the sidebar

## What Can Tako Do?

<CardGroup cols={2}>
  <Card title="Farm Data Analysis" icon="chart-line">
    Query your fields, inventory, equipment, operations, contracts, deliveries, and partner data using natural language.
  </Card>

  <Card title="Smart Recommendations" icon="lightbulb">
    Get suggestions for crop management, optimal planting times, resource allocation, and operational improvements.
  </Card>

  <Card title="Report Generation" icon="file-lines">
    Generate summaries and reports about your farm operations, seasons, and financial data.
  </Card>

  <Card title="Farm Tools" icon="wrench">
    Tako has access to specialized tools that query your farm database in real-time — fields, seasons, equipment, inventory, weather, and more.
  </Card>

  <Card title="File Analysis" icon="paperclip">
    Upload images, PDFs, spreadsheets, and text files. Tako can analyze documents, extract data from photos, and process CSV files.
  </Card>

  <Card title="Web Research" icon="globe">
    Enable web research to let Tako search the internet for up-to-date agricultural information, market prices, and best practices.
  </Card>
</CardGroup>

## Chat Interface

The chat interface features a modern two-row input design:

* **Top row** — Text input area (auto-expanding, supports multiline)
* **Bottom row** — Toolbar with action buttons:
  * **🌐 Web** — Toggle web research on/off
  * **✨ Pro** — Toggle deep reasoning mode
  * **📎 Attach** — Upload files (images, PDFs, text, CSV)
  * **➤ Send** — Send your message

### Real-Time Streaming

Responses stream in real-time, token by token, with a phased status indicator:

1. **Thinking...** — The AI is processing your request
2. **Calling tools...** — The AI is querying your farm data (with a live tool count)
3. **Processing results...** — Tool results are being analyzed
4. **Generating response** — The answer is streaming in with a smooth fade-in effect

After the response completes, a meta row shows the model used, token count, duration, and number of tools called. Click the **Debug** button to expand detailed diagnostics.

## @Mentions — Tag Your Farm Data

Type **@** anywhere in the message to open the mention picker. You can tag specific farm entities to give Tako precise context:

* **@Fields** — Tag a specific field by name
* **@Contracts** — Reference a contract
* **@Equipment** — Reference equipment
* **@Deliveries** — Tag a delivery
* **@Inputs** — Reference an inventory item
* **@Seeds** — Reference a seed variety
* **@Seasons** — Tag a season
* **@Partners** — Reference a partner

Tagged entities are passed as structured context to the AI, enabling more precise and relevant answers.

## File Attachments

Attach files to your messages for analysis:

* **Supported formats** — JPEG, PNG, WebP, GIF, PDF, plain text (.txt), CSV
* **Limits** — Up to 3 files per message, 10 MB each
* **Upload methods:**
  * Click the **📎 Attach** button
  * **Drag and drop** files onto the chat area
  * **Paste** images from your clipboard (Ctrl+V / Cmd+V)

When images are attached, Tako uses a specialized vision model to analyze photos, extract text via OCR, and identify objects. PDFs and text files are automatically parsed and their content is included in the conversation.

<Tip>
  Upload a photo of a soil analysis report or a pest-affected plant and ask Tako to identify and recommend treatment.
</Tip>

## Web Research

Toggle the **🌐 Web** button to enable web research. When active, Tako searches the internet before responding, providing:

* Current market prices and agricultural news
* Up-to-date pest and disease management practices
* Weather forecasts and climate advisories
* Regulatory and compliance information

Web research results are automatically integrated into the AI's response as additional context.

## Deep Reasoning (Pro Mode)

Toggle the **✨ Pro** button to activate deep reasoning mode. This triggers a **two-stage analysis pipeline**:

1. **Stage 1** — The standard AI agent gathers your farm data using tools
2. **Stage 2** — A specialized reasoning model performs deeper analysis on the gathered data

Deep reasoning is ideal for complex questions like:

* "Analyze the profitability trend of my wheat fields over the last 3 seasons"
* "What are the risk factors for my current crop plan?"
* "Compare my operational efficiency with best practices"

<Info>
  Deep reasoning takes longer but provides significantly more thorough analysis. The reasoning model and tokens used are shown in the debug panel after completion.
</Info>

## Conversation History

All conversations are automatically saved and accessible from the sidebar:

* **Sidebar** — Toggle the conversation list with the menu button
* **Search** — Find previous conversations quickly
* **Delete** — Remove conversations you no longer need
* **Resume** — Click any conversation to continue where you left off

## Example Questions

* "What is the total area of all my wheat fields?"
* "Show me the operations planned for this season"
* "Which equipment has been used the most this month?"
* "What's my current inventory of fertilizers?"
* "Summarize the deliveries for the past quarter"
* "Analyze the NDVI trends for @Field Name over the last 6 months"
* "What's the weather forecast for my farm this week?" *(with web research enabled)*
* "Review this soil analysis report" *(with PDF attached)*

## AI Credits

The AI assistant uses a credit-based system:

* Each farm has an AI credit balance
* Credits are consumed per interaction (based on tokens used)
* Your current balance is shown in the user dropdown (top-right corner)
* Credit balance is color-coded:
  * **Green** — More than 100 credits remaining
  * **Yellow** — 20–100 credits remaining
  * **Red** — Fewer than 20 credits remaining

<Warning>
  Deep reasoning mode and web research consume more credits per interaction. Monitor your balance in the user dropdown. Contact your farm administrator to top up credits when running low.
</Warning>

## Debug Panel

After each response, click **Debug** to see detailed information:

| Field                | Description                                              |
| -------------------- | -------------------------------------------------------- |
| **Provider**         | The AI provider used (e.g., Nebius AI Studio)            |
| **Model**            | The primary model and its ID                             |
| **Tokens**           | Input, output, and total token counts                    |
| **Duration**         | Response time in seconds                                 |
| **Tool Calls**       | Number of tool invocations                               |
| **Tools**            | List of tools used (e.g., get\_fields, get\_weather)     |
| **Web Research**     | Whether web search was used                              |
| **Attachments**      | Number of files attached                                 |
| **Vision Model**     | The vision model used for image analysis (if applicable) |
| **Reasoning Model**  | The deep reasoning model used (if Pro mode was active)   |
| **Reasoning Tokens** | Token consumption for the reasoning stage                |

A detailed **Tool Log** shows each tool call with its success/failure status, latency, and output size.

## Access

The AI module is typically available to **Admins only** by default, but farm administrators can grant AI access to any member from the **Teams** page under module access settings.
