Python
Requires Python >= 3.10.
pip install warlockcode-wartools-ai
from warlockcode_wartools_ai import WarTools, JsonFileKvStore, SecurityConfig
kit = WarTools.create(
preset="none",
enable=["time.now", "kv.*"],
security=SecurityConfig(fs_root="./workspace", http_allow_domains=["api.github.com"]),
store=JsonFileKvStore("./.wartools-store.json"),
)
res = kit.execute("time.now", {"timezone": "America/Bogota"})
kit.execute(name, input)is synchronous and returns the envelope as a dict.- Runtime options:
WarTools.create(runtime={"approval": {...}, "budget": {...}, "retry": {...}, "idempotency": {...}});kit.approve(id)/kit.deny(id),kit.budget_usage(). See approval gate and budget guard. - The package installs a
wartools-aicommand (MCP over stdio).