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 CortexSupport, 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

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.