Skip to content

Agentic AI ​

Zero Ichi includes an AI assistant that can understand messages and execute bot commands on your behalf using tool calling.

How It Works ​

The AI system uses Pydantic AI to connect to language models. It can:

  • Understand context — knows the chat, sender, group info, and message history
  • Execute actions — send messages, mention users, reply to messages
  • Use tools — kick, mute, promote/demote members in groups
  • Remember — maintains conversation memory per chat
  • Follow skills — custom instructions you define

Setup ​

1. Set API Key ​

Add your API key to .env:

bash
AI_API_KEY=sk-your-api-key-here

2. Enable AI ​

Via WhatsApp:

/config ai on

Or in config.json:

json
{
  "agentic_ai": {
    "enabled": true,
    "provider": "openai",
    "model": "gpt-5-mini"
  }
}

Trigger Modes ​

Control when the AI responds:

ModeCommandDescription
mention/config ai mode mentionResponds when @mentioned
reply/config ai mode replyResponds when replying to the bot
always/config ai mode alwaysResponds to every message

Recommended

Use mention or reply mode to avoid the AI responding to every message.

Providers ​

The bot supports multiple AI providers:

ProviderConfig ValueExample Models
OpenAIopenaigpt-5-mini, gpt-5
Googlegooglegemini-2.0-flash
Groqgroqllama-3.3-70b

Change provider:

/config ai provider google
/config ai model gemini-2.0-flash

AI Skills ​

Skills are custom instructions that the AI follows. They let you customize the AI's behavior without changing code.

Adding a Skill ​

/addskill <name> <instructions>

Example:

/addskill translator When someone asks you to translate, translate to requested language.

Alternative methods:

/addskill <url-to-markdown-skill>

or attach a .md skill file and send:

/addskill

You can also reply to a text message and send:

/addskill <name>

Managing Skills ​

/skills              # List all skills
/delskill <name>     # Remove a skill

Security ​

Blocked Actions ​

By default, dangerous commands are blocked from AI execution:

json
{
  "agentic_ai": {
    "blocked_actions": ["eval", "aeval", "addcommand", "delcommand"]
  }
}

Owner Only Mode ​

Restrict AI to only respond to the bot owner:

json
{
  "agentic_ai": {
    "owner_only": true
  }
}

Built with ❤️