SmartERP Documentation An Ashewa Technology Solutions Platform

Enterprise Prompt Governance, Token Budgets, and Rate Limits

Managing system prompts, enforcing institutional brand voice, configuring monthly token quotas, and securing model inputs.

1. Overview & Business Value#

Operationalizing 47 autonomous agents across enterprise departments requires strict prompt governance, per-department token budget limits, and audit enforcement.

1. Overview & Institutional Governance#

The SmartERP Prompt Registry (addons/muk_ai/models/prompt.py) stores version-controlled system instructions. System prompts cannot be edited by standard end-users. All modifications require approval from a designated AI Governance Administrator.

{screenshot:ai-governance-prompt-registry}

2. Prerequisites & Security Groups#

  • Required Modules: muk_ai, smarterp_security
  • Security Group: Ashewa AI / Manager (Technical ID: muk_ai.group_ai_manager)
  • Dependencies: Active provider configurations and department cost centers.

3. Step-by-Step Configuration & Execution#

Step 1: Navigating to Prompt Management#

  1. Open Settings → Technical → Ashewa AI → System Prompts.
  2. Select the target agent (e.g., Financial Audit Agent).

Step 2: Parameterizing Token Budgets & Rate Limits#

  1. Specify the Maximum Context Tokens (e.g., 8192).
  2. Set the Department Monthly Token Quota (e.g., 5,000,000 tokens).
  3. Set the Hard Stop Action: Choose between Block Execution or Fallback to Flash Lite.
  4. Define temperature parameters:
    • For financial and legal agents: temperature: 0.1 (deterministic).
    • For creative marketing copywriters: temperature: 0.7 (expressive).

{screenshot:ai-governance-token-budget}

Step 3: Enforcing PII Redaction Rules#

Enable the Automatic PII Redactor switch to mask tax identification numbers (TIN), bank account numbers, and personal salary figures before transmitting prompts to external model endpoints.

4. Advanced Configuration Points#

  • Automated Tasks (Crons):
    • Ashewa AI: Reset Monthly Department Quotas (muk_ai.ir_cron_reset_quotas, 1st of each month).
    • Ashewa AI: Audit Prompt Drift (muk_ai.ir_cron_audit_prompts, weekly).
  • Multi-Company Partitioning: Quotas are strictly partitioned by Company ID (res.company).

5. Comprehensive Troubleshooting Matrix#

Error SymptomRoot CauseCorrective Action
TokenQuotaExceededError: Monthly budget exhaustedDepartment has exceeded assigned token allocation.Increase monthly quota in Settings → AI Budgets or wait for automated monthly reset.
PromptInjectionDetected: Prohibited keyword patternUser input triggered prompt-injection safeguard rules.Inspect prompt attempt in ashewa.ai.log and educate user on input compliance.
ModelAuthenticationError: 401 UnauthorizedInvalid or revoked API key in provider pool.Rotate expired key in Settings → AI Providers → Credentials.

2. Prerequisites & Security Access Groups#

  • Required Modules: muk_ai, muk_mcp, smarterp_ai_suite
  • Security Group: Ashewa AI / User (Technical ID: muk_ai.group_ai_user)
  • Master Data Dependencies: Configured AI provider credentials, active system prompts, and departmental cost centers.

3. Step-by-Step UI Execution & Verification#

Step 1: Navigating to the Operational Interface#

  1. Log into your SmartERP instance at https://smarterp.et/odoo.
  2. Open the main App Switcher and select Ashewa AI.
  3. Select the operational workspace corresponding to this agent suite.

{screenshot:40-agent-governance-and-architecture-step1-navigation}

Step 2: Executing Agent Actions#

  1. Review agent prompts and execution parameters.
  2. Trigger the scheduled or on-demand workflow action.
  3. Validate output in the generated operational log.

{screenshot:40-agent-governance-and-architecture-step2-execution}

4. Advanced Configuration Points#

  • Scheduled Crons: muk_ai.ir_cron_agent_health_check runs every 30 minutes.
  • Multi-Company Isolation: Multi-company record rules ensure agent context is isolated to Company 1 (Ashewa Technology Solutions S.C.).

5. Comprehensive Troubleshooting Matrix#

Symptom / ErrorProbable Root CauseResolution Action
Agent unresponsive or timeoutNetwork latency or API endpoint outage.Verify provider connection in Settings → AI Providers.
Access Denied during agent executionUser lacks assigned operational permissions.Assign user to the designated operational group.
Last updated: 2026-10-30