AIAI governance for admins

AI governance for admins

Organisation rules for the AI: which commands run without asking, webhooks on its actions, and which tools it gets.

Guide2 min read

Organization owners and admins set rules for how the AI behaves in their organization, in AI settings (requires sign-in): shared provider keys, command rules, webhooks, and which tools the AI may use.

Command rules

By default every shell command the AI wants to run asks first. A rule changes that for one program:

DecisionThe command
AllowRuns without asking.
AskAsks first (the default).
DenyIs refused. The AI is told why and can choose another way.

A rule names a program, matched against the command's first word exactly (pytest, npm), and can narrow it by its first arguments: npm with test matches npm test and npm test --watch, but not npm publish. An organization can have up to 100 rules.

Rules never affect irreversible actions, which always need a typed name and an emailed code.

Webhooks

A webhook calls your own service when something happens in an AI chat:

EventWhen
Before a tool runsBefore every tool call.
After a tool runsAfter every tool call.
When a message is sentA person sends a message.
When a chat startsA new chat begins.
When the assistant finishesA turn ends.
When a sub-agent finishesA helper agent the AI started is done.
Before history is compactedA long chat is about to be summarised.
On a notificationThe AI raises a notification.

Only before a tool runs can block: your service can refuse the call, and the AI is told why. The others are for logging and alerts.

Each webhook has a secret used to sign its requests, so your service can check they came from CodePinion, and a timeout (3 seconds by default). Choose fail closed to refuse the tool call when your service doesn't answer in time; otherwise the call goes ahead.

Tool groups

Admins can switch whole groups of the AI's tools on or off for the organization: skills, code, web, planning, collaboration, devops, lifecycle, workspace, live collaboration and billing. A switched-off group is simply not offered to the AI.