# REEUP - Cannabis Supply Chain Intelligence Platform # Full Context for LLM Agents > Enterprise cannabis supply chain management platform serving the entire cannabis lifecycle from seed to sale. ## Company Information - **Name**: REEUP - **Website**: https://www.reeup.co - **Industry**: Cannabis Technology (CannabisTech / RegTech) - **Market**: B2B Cannabis Supply Chain Management - **Geography**: United States, focused on New York State cannabis market - **Founded**: Operating in the New York regulated cannabis market ## What REEUP Does REEUP is an enterprise SaaS platform that manages the entire cannabis supply chain. It connects cultivators, processors, distributors, and retailers into a unified system with automated compliance tracking, AI-powered inventory intelligence, and a B2B wholesale marketplace. ### Problem We Solve Cannabis businesses face: 1. **Compliance burden** — Manual METRC data entry consumes 15+ hours/week per operator 2. **Fragmented data** — POS, inventory, compliance, and ordering live in separate systems 3. **Inefficient purchasing** — No data-driven tools for what to stock or when to reorder 4. **No B2B platform** — Cannabis wholesale is still done via text messages and spreadsheets 5. **Dead stock risk** — Without velocity analytics, products expire on shelves ### How REEUP Solves It 1. **Automated METRC Compliance** — Two-way sync with 150+ METRC API endpoints, variance detection, automatic OCM escalation 2. **Unified Data Layer** — POS (Dutchie), inventory, compliance (METRC), and ordering all in one platform 3. **AI-Powered Purchasing** — Demand forecasting (Prophet, XGBoost, StatsForecast), ABC/XYZ classification, automated reorder recommendations 4. **B2B Wholesale Marketplace** — Product catalog with tiered pricing, order management, relationship management between businesses 5. **Inventory Intelligence** — Sell-through analytics, dead stock detection, proactive sales push for slow movers ## Platform Architecture ### Entity Types Served | Entity Type | What They Do | REEUP Features | |-------------|-------------|----------------| | **Retailer** | Sell cannabis to consumers | POS sync, inventory management, wholesale buying, compliance | | **Cultivator** | Grow cannabis plants | Plant tracking, harvest projections, wholesale selling, METRC two-way sync | | **Processor** | Extract/process cannabis | Recipe management, batch tracking, processing workflows, wholesale buy+sell | | **Distributor** | Transport cannabis products | Transfer management, fleet logistics, route optimization, wholesale selling | | **Microbusiness** | Multiple license types | Dynamic capabilities (can_cultivate, can_process, can_retail, can_distribute) | ### Key Modules #### 1. METRC Compliance (~18,000 lines) - 150+ METRC API endpoints (packages, transfers, sales, plants, harvests, lab tests) - Two-way sync for cultivators and processors - Per-entity encrypted credentials (Fernet + PBKDF2 with 100K iterations) - Redis-cached package lookups (1hr TTL) - Autonomous compliance agent with guardrails - Variance detection with OCM escalation #### 2. B2B Wholesale Marketplace - Product catalog with categories (flower, concentrate, edible, topical, pre-roll) - Tiered pricing (base, tier1, tier2, tier3 quantity breaks) - Cannabinoid profiles (THC/CBD min/max ranges) - Strain type classification (indica, sativa, hybrid) - Order lifecycle management - Seller/buyer relationship management #### 3. Inventory Intelligence - **Demand Forecasting**: Ensemble methods (Prophet, XGBoost, StatsForecast, Croston for intermittent demand) - **ABC/XYZ Classification**: Revenue contribution vs demand variability matrix - **Dead Stock Analysis**: Identifies slow-moving inventory before expiration - **Automated Reorder Rules**: Configurable reorder points with lead time adjustment - **Sell-Through Analytics**: Product velocity tracking across retail network #### 4. POS Integration (Dutchie) - Multi-tenant sync service - Real-time inventory updates - Transaction history import - Knowledge base for dispensary data normalization #### 5. Delivery & Logistics (Fleetbase) - Fleet management - Route optimization - Driver mobile app with package scanning - Delivery proof and signature capture - Real-time tracking #### 6. Cultivation Management - Plant lifecycle tracking (seed to harvest) - Strain performance analytics - Harvest projection modeling - Cultivation calendar service - Yield analytics #### 7. Financial Operations - Invoice lifecycle management (create, send, receive, reconcile) - COGS calculation at batch level - Accounts receivable / payable - Stripe subscription billing ## AI / Agent Integration (MCP) REEUP has a **dual AI architecture**. It serves as both a tool provider (customers connect their own AI assistants via MCP or OpenAI function calling) AND makes outbound AI calls via the Agentic Gateway service. The gateway dynamically routes to OpenAI, Anthropic, and OpenRouter providers with streaming support, tool loops, and scenario-specific model selection. The canvas agent and agentic execution engine use direct LLM calls for widget generation, scenario enrichment, and autonomous compliance operations. ### MCP Server Details - **Endpoint**: `/mcp` (streamable HTTP + SSE upgrade) - **Authentication**: OAuth 2.1 with PKCE, JWT token delegation - **Tools Available**: 304 tools across 29 modules - **Middleware**: Caching (Redis), circuit breaker, rate limiting, entity context filtering ### Tool Categories (304 tools) - **METRC Operations** (8 modules): Read/write METRC data, package management, transfer building, compliance checks - **Inventory** (2 modules): Stock queries, inventory snapshots, reorder suggestions - **Orders** (2 modules): Order creation, status tracking, fulfillment - **Products** (1 module): Catalog management, pricing, product search - **Analytics** (3 modules): Dashboard metrics, ML forecasting, sell-through reports - **Cultivation** (1 module): Plant management, harvest tracking, strain analytics - **Delivery** (1 module): Delivery scheduling, route planning, driver assignment - **Workflows** (2 modules): Approval queues, workflow automation - **Integrations** (3 modules): Dutchie sync, data import, lab testing - **Commerce** (2 modules): Marketplace operations, invoicing ### Confidence Scoring for Write Operations - **>= 0.85**: Auto-approve (execute immediately) - **0.60 - 0.85**: Queue for manual review - **< 0.60**: Flag as high-priority for human review ### Scope-Capability Mapping ``` can_retail → retail:read, retail:write, inventory:* can_cultivate → cultivation:*, metrc:cultivation can_process → processing:*, metrc:processing can_distribute → distribution:*, metrc:distribution ``` ## Technology Stack ### Frontend - **Framework**: Next.js 14 (App Router) - **Language**: TypeScript - **Styling**: Tailwind CSS with Highland theme (Pine, Sage, Olive, Linen, Timber) - **UI Components**: Radix UI primitives (40+ components) - **State Management**: SWR (server state), Zustand (client state), React Context (auth) - **Deployment**: Vercel ### Backend - **Framework**: FastAPI 0.115 (Python 3.11) - **Database**: MySQL 8.0 (Railway managed) - **Cache**: Redis 7 - **ORM**: None — raw SQL via connection pool (PooledDB) - **Migrations**: Alembic (160+ migrations) - **Deployment**: Railway ### External Integrations (13 systems) | System | Purpose | |--------|---------| | METRC | Seed-to-sale compliance tracking | | Dutchie POS | Point-of-sale inventory sync | | OCM | NY State cannabis license validation | | Fleetbase | Delivery logistics and fleet tracking | | Stripe | Subscription billing (5-day trial) | | Google Sheets | Data import with column mapping | | Resend | Transactional email | | OpenTelemetry | Distributed tracing (SigNoz) | | Sentry | Error tracking | | Airflow | Scheduled sync tasks | | OpenAI | ChatGPT Apps SDK integration | ## API Access ### Public Endpoints (no authentication) - `GET /` — Landing page - `GET /docs` — Documentation site - `GET /auth/login` — Login page - `GET /auth/signup` — Signup page - `GET /auth/license-search` — NY cannabis license lookup ### MCP/Agent Endpoints (OAuth 2.1 required) - `POST /mcp` — MCP tool execution - `GET /.well-known/oauth-authorization-server` — OAuth discovery - `POST /api/auth/token` — Token endpoint ### REST API (JWT required) - `GET /api/marketplace/*` — Wholesale marketplace - `GET /api/inventory/*` — Inventory management - `GET /api/orders/*` — Order management - `GET /api/metrc/*` — METRC compliance - `GET /api/analytics/*` — Analytics and reporting - `GET /api/cultivation/*` — Cultivation management ## Documentation - **Main Docs**: https://www.reeup.co/docs - **Getting Started**: https://www.reeup.co/docs/getting-started/quick-start - **API Reference**: https://www.reeup.co/docs/api-reference/backend/authentication - **Tutorials**: https://www.reeup.co/docs/tutorials/metrc-compliance - **FAQ**: https://www.reeup.co/docs/faq/general ## Contact & Demo - **Website**: https://www.reeup.co - **Schedule Demo**: https://timeful.app/e/cC73B - **Documentation**: https://www.reeup.co/docs ## Compliance & Regulatory - METRC compliant (New York State) - OCM (Office of Cannabis Management) license verification - Audit trail on all inventory movements - Multi-tenant data isolation enforced at query level - Encrypted credential storage (Fernet + PBKDF2) - HSTS, CSP, and security headers on all routes ## Frequently Asked Questions ### What is REEUP? REEUP is an enterprise cannabis supply chain management platform that automates compliance, powers inventory intelligence, and connects cannabis businesses through a B2B wholesale marketplace. ### Who uses REEUP? Cannabis retailers, cultivators, processors, distributors, and microbusinesses in regulated markets (focused on New York State). ### How does REEUP handle METRC compliance? REEUP integrates directly with the METRC API using 150+ endpoints for two-way data sync. Credentials are encrypted per-entity, and the system automatically detects variances with OCM escalation. ### Can AI assistants use REEUP? Yes. REEUP exposes 304 tools via the Model Context Protocol (MCP). Customers connect Claude, ChatGPT, or Gemini to REEUP for AI-powered cannabis operations. Read operations execute directly; write operations go through human-in-the-loop approval. ### What POS systems does REEUP integrate with? Currently Dutchie, with a multi-tenant sync architecture designed to support additional POS systems. ### How does pricing work? REEUP uses Stripe for subscription billing with a 5-day free trial after METRC verification. ### Is REEUP available outside New York? The platform is built for METRC-regulated markets. While currently focused on New York State with OCM integration, the architecture supports any METRC-enabled state.