> ## Content Index
> Fetch the complete content index at: https://www.stirup.si/llms.txt
> Use this file to discover other available public pages before exploring further.

# Shield KYA Installation, Setup, and Configuration Requirements
- URL: https://www.stirup.si/shield-kya-installation-setup-and-configuration-requirements-898acdde/
- Published: 2026-11-04T13:18:24.000Z
- Updated: 2026-11-04T13:18:24.000Z
- Description: Shield KYA requires Node.js 22+ and uses commands like npm i -g @shield-agent/kya@latest && kya start for installation, with Windows support limited to kya connect copilot due to bash-form pre-tool hooks.
- Author: Satish Das
- Tags: Community, News, Stirup Research

## Installation and Setup Requirements

To install and set up Shield KYA, run the command `npm i -g @shield-agent/kya@latest && kya start`. This requires Node.js 22+ (24 recommended). The `kya start` command initializes the audit trail and gate for AI agent tool calls, supporting platforms like Claude Code and Cursor, as well as any host that reads `.mcp.json` files. For advanced configurations, use `kya start --no-open` to enable wire-only mode or `kya start --force` to rewrite MCP blocks. Receipt change previews are enabled by default for writes but can be disabled by setting `KYA_DIFF_PREVIEW=0`. Note that installation on Windows is not currently supported due to the pre-tool hook being in bash form; for Windows users, use `kya connect copilot` instead.

## Functionality and Behavior of Shield KYA

Shield KYA functions as an open-source audit trail and gate for AI agent tool calls, offering three possible responses—Allow, Review, or Deny—when an agent requests access. Users register the agent and route tool calls through the MCP gate or the hosted plane, with Review prompting human intervention. The system is designed to be advisory, failing open by default, and records every tool call locally in a JSONL file (\~/.kya/trail.jsonl). Blocking occurs only for a predefined 'never-list' of restricted actions. Integration with AI platforms like Claude, Grok, and Kimi is supported through hooks, with specific commands such as `kya connect claude --hooks` enabling setup. The project also serves as a Claude Code plugin marketplace, with the `kya` plugin being advisory and failing open. It records tool calls from Codex through hooks such as `shell` and `apply_patch`, but does not block hosted tools like web search.

## Gate Implementation and Configuration

The **Gate Implementation and Configuration** section of Shield KYA outlines how the local MCP gateway is set up and managed. The `kya gate` command creates a loopback-only listener on `127.0.0.1` at the default port `3930`, acting as a proxy in front of any existing MCP server. Manual configuration is supported via commands like `kya gate init`, which scaffolds a `gateways.json` file with pre-defined recipes. Users can then edit this file, move a recipe into the `servers` section, and fill in placeholders before running `kya gate setup` to download the pinned gateway binary. The `kya gate run` command generates the gateway configuration and starts the listener detached. If another process is already using the default port, `kya gate run` will fail with an `EADDRINUSE` error. The `kya gate doctor` command provides diagnostics for the binary, configuration, listener health, and confirms the loopback-only posture.

## Activity Recording and Sharing Features

Shield KYA provides an activity recording and sharing feature that captures all tool calls made by AI agents in a global, open-source audit trail. This trail is stored in a single file, \~/.kya/trail.jsonl, which can be overridden by setting the KYA\_HOME environment variable. The trail records all events across projects, ensuring a unified view of agent activity.

When generating reports, Shield KYA reads only the last 1 MB of the trail, with older events dropping out of view. This approach ensures that reports remain focused on recent activity while maintaining a consistent format across all projects. To share a report, users can use the `kya receipt --share` command, which publishes a redacted summary to shield-agent.com. The summary includes aggregate decision counts, product and reason-code rollups, and the Certify status, but excludes sensitive details such as paths, tool arguments, and session IDs. A public URL is generated with a 7-day expiry, and users are prompted to share it with their security lead.

## Additional Tools and Environment Variables

Shield KYA provides additional tools and environment variables to enhance its functionality as an open-source audit trail and gate for AI agent tool calls. Users can install the package using npm with specific paths for macOS, Linux, and Windows, with the installation location adjustable via the KYA\_HOME environment variable. After upgrading, activity search defaults to lexical (BM25) until the install command is executed for natural-language search. A variety of environment variables are available, including KYA\_BASE\_URL for the control plane origin, KYA\_API\_KEY for authentication, KYA\_HOST to specify the environment (ide or runtime), KYA\_AGENT\_ID for the agent principal ID, and others that control behavior such as offline mode, receipt auto-open, and preview settings. These variables are detailed in the documentation and are essential for configuring the tool to suit specific use cases and workflows.

## Sources and reporting notes

- [Hacker News Show](https://github.com/The-Pixel-Boys/shield-kya?ref=stirup.si)
- [theregister.com](https://www.theregister.com/virtualization/2026/11/03/architect-creates-open-source-replacement-for-vm-migration-tool-vmware-has-hidden/5307124?ref=stirup.si)

Based on published source material. No independent hands-on testing is claimed.