Skip to main content
Version: 3.0.6

AI Assistant

Settings > AI Assistant configures AI for every account on the server: the user panel's Assistant widget and Vibe Code agent, the webmail's summaries, reply suggestions and translations, and your own Admin Assistant. One provider, one key, one abuse-prevention policy.

Provider​

SettingNotes
Enable AI for all usersThe master switch. Off means no AI feature appears anywhere.
ProviderOpenAI, Anthropic (Claude), or Custom - any OpenAI-compatible chat-completions endpoint: OpenRouter, LiteLLM, a local Ollama (http://127.0.0.1:11434/v1), a third-party gateway.
Modele.g. gpt-4o-mini, claude-opus-5, llama3.
API keyStored only in /etc/hitechcloud/ai/gateway.conf (root:hitechwebmail, 0640). The page shows the last four characters and never the key again. Leave the field as it is to keep the key, paste to replace, clear to remove.
Base URLOptional for OpenAI/Anthropic, required for Custom. Up to and excluding /chat/completions.
Max tokens per replyOutput cap per request.

Test connection sends one tiny request with what is in the form - saved or not - and reports the provider's answer or its error (with the key redacted).

Abuse prevention​

All limits are per hosting account and shared by the panel and the webmail through one counter (/var/lib/hitechcloud/ai/usage/<account>.json).

SettingDefault
Requests per minute20
Daily token budget (input + output)200 000, reset at midnight UTC
Max input characters per request20 000
Allowed featuressummarize, reply suggestions, translate, format text, key points, chat assistant
Blocked keywords / patternsCase-insensitive regular expressions, one per line; a match is refused before it leaves the server
Log all requests (metadata only)On. One line per request in /var/log/hitechcloud/ai.log: account, feature, model, size, tokens, duration. Never the text. Refused requests and every agent tool call are logged regardless.

Who may use AI​

  • Accounts you own directly - on/off default for your own customers.
  • Resellers and their customers - on/off. When on, each reseller gets Accounts > AI Assistant in their own panel to grant or withhold AI for their customers (a default switch plus per-account Allow/Deny).
  • Only accounts on these plans - restrict to chosen plans.
  • Always allow / Never allow - per-account overrides. Deny wins over everything, including a reseller's grant.

The rules live in /etc/hitechcloud/ai/access.conf and /etc/hitechcloud/ai/resellers/<reseller>.conf; the decision per account is materialized in /etc/hitechcloud/ai/accounts.conf for the webmail, rebuilt on save and refreshed by the panel whenever it decides for an account.

Admin Assistant​

Settings > Admin Assistant is a chat for you, on the same gateway, charged to admin:<your username>. It can list accounts and plans, show an account's details and domains, check services and server health, read a DNS zone, and - only after you confirm in the chat - suspend or unsuspend an account or restart a service. Resellers do not get it.

Its standing rules, enforced in code where they can be and stated in the prompt where they cannot:

  1. Never escalate privileges; it runs with your session's rights and only the listed tools.
  2. Never reveal passwords, hashes, keys or tokens; tool results redact them.
  3. Never disclose one customer's data to help with another.
  4. Refuse unsafe operations; explain the risk of a destructive action and require your confirmation.
  5. Report exactly what the tools returned.
  6. Answer in the language you pick (English or Vietnamese).

Files​

/etc/hitechcloud/ai/gateway.conf provider, key, policy root:hitechwebmail 0640
/etc/hitechcloud/ai/access.conf delegation rules 0644
/etc/hitechcloud/ai/resellers/*.conf one reseller's rules 0644
/etc/hitechcloud/ai/accounts.conf decision per account 0644
/var/lib/hitechcloud/ai/usage/*.json per-account budget root:hitechwebmail 2770
/var/log/hitechcloud/ai.log audit log root:hitechwebmail 0660

The webmail reads the conf through HITECHCLOUD_AI_CONF in its environment file (written by hitechcloudcli native-webmail install), which also sets HITECHCLOUD_AI_USAGE_DIR and HITECHCLOUD_AI_LOG.