Intelligence / MLE
Conversational AI assistant for real estate agents
Overview
MLE (Beta) is a conversational AI assistant that lives in the Intelligence section of the agent dashboard. It knows the agent's listings, brand voice, service areas, and business context — agents never need to explain their business to it.
MLE helps agents with:
- Content generation — Social posts, listing descriptions, email drafts with iterative refinement
- Listing search — Natural language queries against MLS data ("Show me waterfront condos under $3M")
- Market analysis — Portfolio performance, inventory summaries, days on market
- Client preparation — Briefings and follow-up recommendations (Phase 2)
Dashboard Location
Intelligence
├── MLE (Beta) ← Conversational assistant
├── Voice ← Brand voice settings
├── Automations ← AI content triggers
└── Usage ← Stats & limitsThe Intelligence section consolidates all AI features that were previously spread across Marketing and AI Studio.
Conversation Types
| Type | Description | Persistence |
|---|---|---|
| Topic | General conversations (market analysis, content brainstorming) | Saved in sidebar |
| Client | Linked to a contact record (Phase 2) | Saved on client profile |
| Ephemeral | Quick one-off queries | Not saved |
Tone Selector
MLE responses can be tuned with four tone presets:
- Professional (default) — Polished and expert
- Casual — Warm and conversational
- Luxurious — Sophisticated, aspirational language
- Urgent — Concise and action-oriented
Feature Gating
| Capability | Agent ($99) | Professional ($199) | Prestige ($449) |
|---|---|---|---|
| Conversations/month | 50 | 200 | Unlimited |
| Listing context | Yes | Yes | Yes |
| Content generation | Yes | Yes | Yes |
| Natural language search | Single-turn | Multi-turn | Multi-turn |
| Client data integration | — | Phase 2 | Phase 2 |
Feature Flag
features.intelligence: boolean— Enable/disable per workspace- Set via admin panel: Workspace Settings > Intelligence / MLE
Architecture
System Prompt
MLE's system prompt is assembled dynamically per request:
- Base persona — Luxury real estate assistant behavior rules
- Fair Housing compliance — Mandatory prohibited language rules
- Brand voice — Agent's tone, avoidances, writing sample
- Workspace context — Brokerage, service areas, agent name
- Listing data — Active/pending listings injected based on intent
- Additional instructions — Platform-wide custom instructions (admin setting)
Intent Classification
User messages are classified to determine what context to pre-fetch:
content_generation— Write/draft/create contentlisting_search— Find/show/search listingslisting_detail— Tell me about a specific listingmarket_analysis— How is my inventory performingclient_query— Ask about a client (Phase 2)general— Everything else
Streaming
Uses the Vercel AI SDK with streamText() and useChat() for real-time streaming responses.
Key Files
| File | Purpose |
|---|---|
packages/ai/src/assistant/system-prompt.ts | Dynamic system prompt builder |
packages/ai/src/assistant/context.ts | Listing data fetcher for context injection |
packages/ai/src/assistant/intent.ts | Intent classification |
apps/web/src/app/api/dashboard/assistant/chat/route.ts | Streaming chat endpoint |
apps/web/src/app/api/dashboard/assistant/conversations/ | Conversation CRUD |
apps/web/src/components/dashboard/intelligence/ | Chat UI components |
Database Tables
assistant_conversations (workspace_id, contact_id, title, type, pinned)
assistant_messages (conversation_id, role, content, metadata)Both tables have RLS enabled (service-role-only pattern).
Admin Configuration
Global Settings
Location: Admin > Global Settings > Intelligence / MLE
- Enabled — Master kill switch (independent from AI Content Generation)
- Additional Instructions — Appended to MLE's system prompt for all workspaces
- Retention Days — Conversation cleanup policy (default 90 days)
Per-Workspace
Location: Admin > Workspaces > [workspace] > Settings > Intelligence / MLE
- Enabled — Toggle MLE for this workspace
- Usage stats — Conversations this month, remaining quota
Compliance
- Fair Housing Act rules are always enforced in the system prompt
- MLE operates only on behavioral data (no demographic reasoning)
- All responses include "based on MLS data" attribution for listing facts
ai_usagetable tracks token consumption per conversationassistant_messages.metadatastores model, intent, and token counts
Limitations (Beta)
- No client data integration yet (viewing/favoriting history) — planned for Phase 2
- No proactive intelligence (push notifications for matches) — planned for Phase 3
- No tool calling / platform actions (create note, save search) — planned for Phase 2
- Conversation history is not searchable yet
- No floating "Ask MLE" button on other dashboard pages — planned for Phase 2