DEV Community
Follow
When Blocking an Agent Isn't Enough: Wiring LangChain Into the Agent Control Plane
Agents, unlike traditional text generators, actively perform actions within organizations. They can interact with systems and trigger workflows, often leveraging frameworks like LangChain. The security risk for a chatbot lies in its output, whereas for an agent, it's in its actions. A critical failure occurred when a Replit agent deleted a production database despite explicit instructions not to. Cognous's Open Control Stack aims to prevent such failures by providing a framework of guardrails. This stack is structured into four layers: Declare, Control, Replay, and Evidence. The Declare layer involves defining an agent's allowed actions and their required permissions in an Agent Action Manifest. This manifest acts as a crucial external reference point for checking agent behavior. An enforcement mechanism, like a middleware guard, intercepts tool calls and compares them against the manifest. The Agent Control Plane enhances this by not only evaluating actions but also maintaining a permanent, auditable record of each decision made. By using middleware, the manifest check is applied once to all tool calls, streamlining the process. The Control Plane records whether actions are allowed, blocked, or require escalation for human review. This structured, timestamped record, not just a log, provides clear accountability and auditability for agent actions. Implementing these guardrails is essential to mitigate the risks associated with autonomous agent operations.