Wirken: Open-Source Gateway Shields Against Compromised AI Agents
Wirken, a new open-source gateway, acts as a crucial intermediary between messaging applications and AI agents, mitigating risks from compromised AI instructions.

A new open-source project named Wirken has been released, designed to act as a protective gateway between users' messaging applications and artificial intelligence agents. The core premise of Wirken is the assumption that any AI agent can potentially be compromised or manipulated, and therefore, its access and capabilities must be strictly limited. By mediating interactions, Wirken aims to prevent a compromised AI agent from causing significant damage, such as leaking sensitive data or executing unauthorized commands.
The gateway supports a wide array of popular messaging platforms, including Signal, WhatsApp, Telegram, Matrix, Discord, Slack, Teams, Google Chat, and iMessage, as well as a generic web chat interface. Each communication channel is managed as a separate process, with each process holding only its specific credentials. This compartmentalization is a key security feature, ensuring that even if one channel's AI agent is compromised, the damage is contained to that specific context and does not spill over to other services or the agent's broader system access.
Wirken employs a multi-layered security approach. Credentials are stored in an encrypted vault and are only supplied at the edge of the system, meaning neither the AI model nor the agent itself ever directly handles sensitive keys. Shell commands are executed within ephemeral containers that have no network access, further isolating potentially malicious operations. If the sandbox environment is unavailable, command execution is refused entirely, prioritizing security over functionality in uncertain conditions. While read operations are generally permitted freely, actions that modify data require explicit user approval, with the system remembering these approvals for subsequent similar actions. However, destructive actions like deleting data, installing software, or accessing credentials require re-approval every time.
To ensure accountability and provide an audit trail, every action performed by an AI agent is logged to a signed, hash-chained log before execution. This log is attributed to the individual who initiated the action, and the integrity of the log can be verified offline. The system demonstrates this by showing sample output with multiple verified chain-head signatures, indicating the logging and verification process is functional. Any attempt to tamper with an entry in the log will result in a verification failure, providing a robust mechanism for detecting unauthorized modifications.
Despite its robust security measures, Wirken acknowledges certain limitations. Outbound network traffic is not entirely contained, as child processes of the MCP server and the LLM client can establish their own connections. The system includes an injection detection mechanism that flags suspicious input but still allows it to pass through, relying on other controls to mitigate potential harm. Furthermore, agents share the gateway's address space, and only the channel adapters run as separate processes. In shared channels, a single user's approval for an action might cover all senders until that approval expires.
The project also highlights potential evasion tactics. An attacker who gains the same user privileges as the system administrator could potentially rewrite both the log and the key used for signing, thereby evading the tamper-detection mechanism. Additionally, removing the data directory will destroy the audit log, so the project strongly recommends exporting the log regularly. The sandbox functionality relies on Docker, which is enabled by default. If Docker is not available, shell commands will be disabled, but other features will continue to operate. The installer is provided as a shell script for Linux and macOS, with a published hash for verification before execution, while Windows 11 users have a separate installation path with a different feature set.
Wirken is available as a free, open-source project on GitHub, offering developers and users a proactive defense against the growing risks associated with AI agents. As AI becomes more integrated into daily workflows, tools like Wirken are essential for maintaining security and preventing potential breaches stemming from manipulated AI instructions.