Skip to content

Your own farm AI assistant. Any OS. Any Platform. Inspired by the lobster way. 🦞

License

Notifications You must be signed in to change notification settings

nhemanthrao23/farm_clawed_test

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8,507 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

farm_clawed β€” AI-first Farm Operator (Permaculture-ready)

farm_clawed

Your autonomous farming assistant that grows with you

From a single potted lemon to a full permaculture food forest

CI status GitHub release MIT License

farm_clawed is an AI-first farm automation platform you run on your own devices. Whether you're nurturing a single container plant or managing a commercial permaculture operation, farm_clawed provides intelligent recommendations, safety-first automation, and ROI tracking.

farm_clawed Dashboard - Farm Map with AI Insights and Floating Chat

Farm Map view with AI Insights panel and floating chat assistant

Key Features

  • AI-First Interface β€” ChatGPT-style conversational UI as your primary farming tool
  • Floating AI Assistant β€” Access farm_clawed from any page via the floating chat bubble
  • Day 1 Value β€” Works immediately with manual logs and templates, no hardware required
  • Permaculture-Ready β€” Native support for zones, sectors, guilds, and succession planning
  • Safety-First Automation β€” Toyota-style Jidoka principles for physical automation
  • Local LLM Support β€” Run with Ollama for privacy and offline operation
  • Interactive Farm Map β€” Satellite, terrain, and default map layers with asset overlays
  • Scale Smoothly β€” From container gardening to commercial operations

What's New

Conversational Dashboard

The farm_clawed dashboard is designed like ChatGPT β€” your AI assistant is the interface, not just a feature. Ask questions, get sensor cards, approve automations, all in a natural conversation flow.

Floating Chat Bubble

Access farm_clawed from anywhere in the app. The floating 🌱 button in the bottom-right corner opens a quick chat panel with full context awareness of what you're viewing.

Farm Map View

Full-screen interactive map with:

  • Default/Satellite/Terrain layer switching
  • AI Insights floating panel
  • Pending Automations overlay
  • Asset markers with status colors

Local LLM with Ollama

Run farm_clawed completely offline with Ollama:

# Install Ollama
brew install ollama

# Pull a model
ollama pull llama3.2

# farm_clawed auto-detects Ollama on localhost:11434

Choose Your Path

Permaculture Depth (0-3)

Level Name What You Get
0 Standard Conventional farm ops, fields/blocks/irrigation zones
1 Regen-Friendly Soil health focus, water conservation, IPM basics
2 Permaculture-Lite Optional zones/sectors, guild guidance
3 Full Permaculture Complete zones/sectors, guilds, stacking, succession

Automation Level (0-4)

Level Name Control Style
0 Observe Dashboards and logs only
1 Assist AI recommendations + checklists
2 Propose Human-in-loop approvals (default)
3 Auto-Guardrails Automatic within safety limits
4 Full Ops Hardware integration with strict Jidoka

Quick Start

AI-Only Day 1 (No Hardware)

Get started in 5 minutes with AI recommendations based on your manual inputs:

# Install
npm install -g farm_clawed@latest

# Initialize your farm context
farm_clawed farm init

# Answer the setup wizard questions about your farm
# Then get your first AI analysis:
farm_clawed farm schedule run

Run the Lemon Tree Experiment

See farm_clawed in action with our flagship demo:

# Start the gateway
farm_clawed gateway --port 18789

# Open the web UI
open http://localhost:18789

# Navigate to Farm tab to see the dashboard

The experiment demonstrates:

  • Real sensor data (Tuya/SmartLife soil sensor)
  • AI-driven watering recommendations
  • Safety guardrails in action
  • ROI tracking from day 1
  • How a single plant scales to an orchard

Installation

Runtime: Node 22+

# npm
npm install -g farm_clawed@latest

# pnpm
pnpm add -g farm_clawed@latest

# Run onboarding
farm_clawed onboard --install-daemon

From Source (Development)

git clone https://github.com/rahulraonatarajan/farm_clawed.git
cd farm_clawed

pnpm install
pnpm ui:build
pnpm build

pnpm farm_clawed onboard --install-daemon

Configuration

Minimal ~/.farm_clawed/farm_clawed.json:

{
  farm: {
    permacultureDepth: 1,  // 0-3
    automationLevel: 1,    // 0-4
  },
  agent: {
    model: "ollama/llama3.2",  // local LLM
  },
}

Environment Variables

# Optional: AI provider (works without, uses Ollama by default)
AI_PROVIDER=local  # or openai, anthropic, none

# Optional: Cloud AI (if not using Ollama)
AI_API_KEY=sk-...

# Optional: IFTTT for actuator control
IFTTT_WEBHOOK_KEY=your-key

Farm Context Pack

farm_clawed uses a simple template system to understand your farm:

Core Templates (Required)

File Purpose
farm_profile.yaml Location, climate, constraints
farm_map.geojson Areas/fields/zones as polygons
water_assets.csv Water sources, valves, sensors
roi_inputs.yaml Cost tracking configuration
sensor_readings.csv Manual or imported sensor data
season_calendar.yaml Planting windows, frost dates

Permaculture Extensions (Depth 2+)

File Purpose
zones_0_5.geojson Permaculture zone boundaries
sectors.yaml Sun, wind, water flow analysis
guilds.yaml Plant guild definitions
succession_plan.yaml Multi-year succession stages
water_budget.yaml Drought stages and priorities

See docs/FARM_CONTEXT_PACK.md for complete specifications.

CLI Commands

# Farm management
farm_clawed farm init           # Initialize farm context
farm_clawed farm status         # Show current status
farm_clawed farm schedule run   # Trigger AI analysis

# Approvals and safety
farm_clawed farm approve <id>   # Approve pending action
farm_clawed farm audit          # View audit log

# Export and reporting
farm_clawed farm export         # Export data/reports
farm_clawed farm roi            # Show ROI dashboard

Safety/Jidoka System

farm_clawed implements Toyota-style autonomation for physical automation:

Stop-the-Line Triggers

  • Leak Detection β€” Flow without valve open command
  • Overwatering β€” Moisture > threshold for too long
  • EC Spike β€” High EC combined with dry soil
  • Frost Risk β€” Soil temperature dropping rapidly

Audit Chain

Every action is logged with SHA256 hash chain for tamper-evident history.

Approval Levels

  • Level 0-2: All actuator actions require human approval
  • Level 3: Automatic within guardrails, alerts on anomalies
  • Level 4: Full automation with strict Jidoka and incident runbooks

Hardware Integration (Optional)

Supported Devices

  • Tuya/SmartLife β€” Soil sensors, valve controllers
  • IFTTT Webhooks β€” Scene-based actuation
  • Home Assistant β€” Bridge stub (coming soon)

Scene Convention

FARM_LEMON_WATER_1MIN
FARM_LEMON_WATER_2MIN
FARM_LEMON_WATER_5MIN
FARM_LEMON_WATER_10MIN
FARM_ALL_OFF

See docs/IFTTT_SMARTLIFE_SETUP.md for setup guide.

ROI Tracking

farm_clawed tracks return on investment across:

  • Water Savings β€” Gallons saved vs baseline
  • Time Savings β€” Hours freed per week
  • Avoided Loss β€” Prevented plant death/damage
  • Input Savings β€” Reduced fertilizer waste
  • Payback Period β€” Months to recover equipment cost

ROI adapts to your chosen permaculture depth and automation level.

Tool Ladder

Tier Tools Value
0 AI console (free) Time saved, better decisions
1 Paid AI models Higher quality recommendations
2 Workflows Automated scheduling
3 Custom skills Domain-specific knowledge
4 Local LLM Privacy + cost savings
5 Full hardware End-to-end automation

Architecture

farm_clawed/
β”œβ”€β”€ src/farm/              # Farm-specific logic
β”‚   β”œβ”€β”€ schemas/           # Zod validation schemas
β”‚   β”œβ”€β”€ safety/            # Jidoka implementation
β”‚   β”œβ”€β”€ ai/                # Provider abstraction
β”‚   └── roi/               # ROI calculator
β”œβ”€β”€ skills/
β”‚   β”œβ”€β”€ farm-standard/     # Standard farm skills
β”‚   └── farm-permaculture/ # Permaculture skills
β”œβ”€β”€ extensions/
β”‚   └── ifttt-smartlife/   # Optional actuator connector
└── ui/src/ui/
    β”œβ”€β”€ views/
    β”‚   β”œβ”€β”€ farm-dashboard.ts     # ChatGPT-style AI interface
    β”‚   β”œβ”€β”€ farm-map-dashboard.ts # Full-screen map with overlays
    β”‚   β”œβ”€β”€ farm-equipment.ts     # Equipment management
    β”‚   └── farm-automations.ts   # Automation history
    └── components/
        └── chat-bubble.ts        # Floating AI assistant

See docs/ARCHITECTURE_REVIEW.md for details.

Documentation

Flagship Experiment: Santa Teresa Lemon Tree

Our live demo showcases farm_clawed managing a containerized Meyer Lemon:

Hardware:

  • SmartLife/Tuya Valve Controller 2 + Gateway
  • Tuya Solar Soil Sensor (Moisture + Temp + EC)

Day 1 Readings:

  • Moisture: 17%
  • Soil Temp: 54.5Β°F
  • EC: 0.001 mS/cm
  • Battery: 57%

Route: /farm (Dashboard) or /farm/map (Map View)

This experiment demonstrates how the same system scales from a single container plant to an entire orchard or farm.

Contributors

farm_clawed is built on the shoulders of giants:

We welcome contributions from farmers, developers, and permaculture enthusiasts! See CONTRIBUTING.md for guidelines.

License

MIT License β€” see LICENSE for details.

This project is open source to ensure farmers everywhere can benefit from AI-assisted automation. Commercial use, modification, and distribution are all permitted under the MIT license.


farm_clawed β€” Growing smarter, together. 🌱

About

Your own farm AI assistant. Any OS. Any Platform. Inspired by the lobster way. 🦞

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 83.2%
  • Swift 12.9%
  • Kotlin 1.8%
  • Shell 0.8%
  • CSS 0.5%
  • JavaScript 0.4%
  • Other 0.4%