Documentation Index
Fetch the complete documentation index at: https://docs.vaultak.com/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Initialization
from vaultak import Vaultak, ActionType, KillSwitchMode
vt = Vaultak(
api_key="vtk_your_api_key_here",
allowed_action_types=[ActionType.FILE_READ, ActionType.API_CALL],
allowed_resources=["/tmp/*", "/data/readonly/*"],
blocked_resources=["prod.*", "*.env"],
max_actions_per_minute=20,
max_risk_score=0.7,
mode=KillSwitchMode.PAUSE
)
Parameters
| Parameter | Type | Default | Description |
|---|
| api_key | str | required | Your Vaultak API key |
| mode | KillSwitchMode | ALERT | Response mode when violation occurs |
| allowed_action_types | list | None (all allowed) | Whitelist of permitted action types |
| allowed_resources | list | None (all allowed) | Glob patterns for permitted resources |
| blocked_resources | list | [] | Glob patterns for blocked resources |
| max_actions_per_minute | int | 60 | Rate limit for agent actions |
| max_risk_score | float | 1.0 | Hard ceiling on risk score |
| risk_threshold | float | 0.7 | Score that triggers the response mode |
| rollback_limit | int | 5 | Max actions to reverse in ROLLBACK mode |
Action Types
| Value | Description |
|---|
| ActionType.FILE_READ | Reading a file |
| ActionType.FILE_WRITE | Writing to a file |
| ActionType.FILE_DELETE | Deleting a file |
| ActionType.API_CALL | External API request |
| ActionType.DATABASE_QUERY | Reading from a database |
| ActionType.DATABASE_WRITE | Writing to a database |
| ActionType.CODE_EXECUTION | Executing code |
| ActionType.NETWORK_REQUEST | Network communication |
Response Modes
KillSwitchMode.ALERT # Log and notify only (default)
KillSwitchMode.PAUSE # Halt agent, await approval
KillSwitchMode.ROLLBACK # Reverse last N actions and pause
vt.monitor()
Context manager that wraps your entire agent session.
with vt.monitor("my-agent"):
pass
vt.log_action()
Explicitly log a single agent action.
vt.log_action(
agent_id="my-agent",
action_type="file_delete",
resource="/data/sensitive.csv",
payload={"reason": "cleanup"}
)
5-Dimensional Risk Scoring
Every action is scored across five dimensions:
| Dimension | Description |
|---|
| Action severity | How destructive is this action type? |
| Resource sensitivity | How sensitive is the target resource? |
| Payload anomaly | Does the payload deviate from baseline? |
| Frequency | Is the agent acting unusually fast? |
| Context | Does this action fit the agent’s normal pattern? |
REST API
All endpoints require your API key in the header:
x-api-key: vtk_your_api_key_here
POST /api/check
Pre-execution risk check. Returns decision before action runs.
curl -X POST https://vaultak.com/api/check
-H "x-api-key: vtk_your_api_key_here"
-H "Content-Type: application/json"
-d '{"agent_id": "my-agent", "action_type": "file_delete", "resource": "/data/sensitive.csv"}'
Response:
{
"decision": "block",
"reason": "Resource '/data/sensitive.csv' is blocked for this agent",
"risk_score": 0.91,
"risk_breakdown": {...}
}
PATCH /api/agents//profile
Update an agent’s permission profile from the API.
curl -X PATCH https://vaultak.com/api/agents/my-agent/profile
-H "x-api-key: vtk_your_api_key_here"
-H "Content-Type: application/json"
-d '{
"allowed_action_types": ["file_read", "api_call"],
"allowed_resources": ["/tmp/*"],
"blocked_resources": ["prod.*", "*.env"],
"max_actions_per_minute": 20,
"max_risk_score": 0.7
}'
POST /api/actions
Log a completed agent action.
curl -X POST https://vaultak.com/api/actions
-H "x-api-key: vtk_your_api_key_here"
-H "Content-Type: application/json"
-d '{"agent_id": "my-agent", "action_type": "file_write", "resource": "/tmp/output.txt"}'
GET /api/agents
List all registered agents with their permission profiles.
curl https://vaultak.com/api/agents
-H "x-api-key: vtk_your_api_key_here"
GET /api/alerts
Retrieve active alerts.
curl https://vaultak.com/api/alerts
-H "x-api-key: vtk_your_api_key_here"
Security Policies
Policies let you define rules that automatically block, pause, or allow actions.
curl -X POST https://vaultak.com/api/policies
-H "x-api-key: vtk_your_api_key_here"
-H "Content-Type: application/json"
-d '{
"name": "no-prod-deletes",
"action_type": "file_delete",
"resource_pattern": "prod.*",
"effect": "block",
"max_risk_score": 0.5,
"priority": 10
}'
| Field | Type | Description |
|---|
| name | str | Human-readable policy name |
| action_type | str | Action type to match |
| resource_pattern | str | Glob pattern for resource matching |
| effect | str | block, pause, or allow |
| max_risk_score | float | Trigger if risk score exceeds this value |
| priority | int | Higher priority policies evaluated first |