Skip to main content

Installation

pip install vaultak

Vaultak Class

The main class for governing agent behavior.
from vaultak import Vaultak
from vaultak.models import AgentConfig, KillSwitchMode

breaker = Vaultak(AgentConfig(
    agent_id="my-agent",
    kill_switch_mode=KillSwitchMode.PAUSE,
    risk_threshold=0.7
))

AgentConfig Parameters

ParameterTypeDefaultDescription
agent_idstrrequiredUnique identifier for your agent
kill_switch_modeKillSwitchModeALERTResponse mode when risk threshold is exceeded
risk_thresholdfloat0.7Score from 0-1 that triggers the response
baseline_windowint50Number of actions used to learn normal behavior
rollback_limitint5Max number of actions to reverse in ROLLBACK mode

breaker.watch()

Context manager that monitors a single agent action.
with breaker.watch(action_type, resource, payload, rollback_fn):
    # your action here

Parameters

ParameterTypeRequiredDescription
action_typestrYesType of action (file_write, api_call, etc.)
resourcestrYesResource being acted upon
payloaddictNoAction data for risk scoring
rollback_fncallableNoFunction to call if ROLLBACK is triggered

Action Types

ActionDescription
file_readReading a file
file_writeWriting to a file
file_deleteDeleting a file
api_callExternal API request
database_queryReading from database
database_writeWriting to database
code_executionExecuting code
network_requestNetwork communication

KillSwitchMode

from vaultak.models import KillSwitchMode

KillSwitchMode.ALERT     # Log and notify only
KillSwitchMode.PAUSE     # Halt agent, await approval
KillSwitchMode.ROLLBACK  # Reverse actions and pause

breaker.approve()

Resume a paused agent after human review.
breaker.approve()

breaker.audit_trail()

Returns the full log of all monitored actions.
trail = breaker.audit_trail()
for action in trail:
    print(action.action_type, action.risk_score, action.flagged)