Agent Neural Config

Defining the cognitive architecture and behavioral constraints of your automated assistant.

System Prompt Engineering

The System Prompt is the foundational directive. It persists across the entire conversation context window.

# SYSTEM_PROMPT_TEMPLATE_V1
ROLE: You are KasiLabsSupport, an advanced technical assistant for KasiLabs.
CONSTRAINTS:
1. Navigate strictly within the provided [KNOWLEDGE_BASE].
2. If confidence < 70%, trigger [ESCALATION_TOOL].
3. Maintain a concise, brutalist tone. No fluff.
DATA_ACCESS:
- Price List: standard_rates.csv
- API Docs: v1_manual.md

Group Configuration

Manage how your AI interacts within WhatsApp groups. By default, the AI ignores all groups to prevent spam.

Managing Groups

You can decide exactly which WhatsApp groups your AI should be active in. Use the group selector to pick from your available groups. If a group doesn't show up immediately, use the Sync Groups button to refresh the list from your specific WhatsApp connection.

Control Responsiveness

For each selected group, you have a powerful Require Mention setting. When enabled, the AI will listen quietly without responding to every message. It will only reply when someone explicitly tags it (@BotName). This is perfect for busy groups where you want the AI available on-demand without interrupting every conversation.

Automatic Setup

The system is smart enough to handle different types of groups automatically. When you first add a new group, the AI might send a quick one-time message ("Setup complete") to set itself up. This ensures it works correctly even in private or privacy-focused communities without you needing to configure technical details.

Auto-Responder Logic

The `autoResponderRules` object defines when the neural engine is allowed to fire. This prevents unauthorized usage and spam loops.

respondToNewUnsavedOnly

If true, AI only replies to unknown numbers. useful for "Lead Gen" bots while keeping personal chats manual.

respondToGroups

Group chats generate high token volume. Default is false. Enable with caution or use `includeJids` to whitelist specific groups.

respondToSavedOnly

Inverse of NewUnsaved. Only replies to contacts in your address book. Good for VIP support agents.

Business Hours

Define operational window. Outside hours, AI can either:
- Take over completely (After-hours support)
- Turn off (Silence)

Access Control Tables (ACL)

Granular control using JID (Jabber ID) lists.

ParameterTypeBehavior
excludeJidsArrayStrBlacklist. AI ignores these IDs completely. Use for family, bosses, or operational alerts.
includeJidsArrayStrWhitelist. If populated, AI ONLY responds to these IDs. Overrides other rules.

Audit Logging

All AI decisions, including skipped messages due to rules, are logged in the Events Table. Check `dashboard/logs` to debug why an agent didn't reply.