You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guardrails/code-validation.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@ Secure the code that your agent generates and executes.
6
6
7
7
Code validation is a critical component of any code-generating LLM system, as it helps to ensure that the code generated by the LLM is safe and secure. Guardrails provides a simple way to validate the code generated by your LLM, using a set of pre-defined rules and checks.
8
8
9
+
<divclass='risks'/>
9
10
> **Code Validation Risks**<br/>
10
11
> Code validation is a critical component of any code-generating LLM system. For example, an insecure agent could:
Copy file name to clipboardExpand all lines: docs/guardrails/computer-use.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@ Guardrail the actions of computer use agents, to enable safe UI interfacing.
6
6
7
7
Computer use agents are powerful general-purpose reasoners, equipped with their own computer and the ability to interact with it. However, to ensure security and correctness properties, it is important to guardrail the actions of these agents, to prevent them from performing undesired or harmful actions.
8
8
9
+
<divclass='risks'/>
9
10
> **Computer Use Agent Risks**<br/>
10
11
> Computer use agents are powerful general-purpose reasoners, equipped with their own computer and the ability to interact with it. For example, an insecure agent could:
Copy file name to clipboardExpand all lines: docs/guardrails/dataflow-rules.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@ Secure the dataflow of your agentic system, to ensure that sensitive data never
6
6
7
7
Due to their dynamic nature, agentic systems often mix and combine data from different sources, and can easily leak sensitive information. Guardrails provides a simple way to define dataflow rules, to ensure that sensitive data never leaves the system through unintended channels.
8
8
9
+
<divclass='risks'/>
9
10
> **Dataflow Risks**<br/>
10
11
11
12
> Due to their dynamic nature, agentic systems often mix and combine data from different sources, and can easily leak sensitive information. For example, an insecure agent could:
Copy file name to clipboardExpand all lines: docs/guardrails/function-calls.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@ At the core of any agentic systems are function and tool calls, i.e. the ability
8
8
9
9
For security and safety reasons, it is important to ensure that all tool calls an agent executes are validated and well-scoped, to prevent undesired or harmful actions.
10
10
11
+
<divclass='risks'/>
11
12
> **Tool Calling Risks**<br/>
12
13
> Since tools are an agent's interface to interact with the world, they can also be used to perform actions that are harmful or undesired. For example, an insecure agent could:
Copy file name to clipboardExpand all lines: docs/guardrails/loops.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ Detect and prevent infinite loops in your agentic system.
7
7
8
8
Loop detection is a critical component of any agentic system, as it helps to prevent infinite loops and other undesired behavior. Guardrails provides a simple way to detect and prevent loops in your agentic system.
9
9
10
+
<divclass='risks'/>
10
11
> **Looping Risks**<br/>
11
12
> Loops are a common source of bugs and errors in agentic systems. For example, an insecure agent could:
Copy file name to clipboardExpand all lines: docs/index.md
+68-37Lines changed: 68 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,51 +1,79 @@
1
1
---
2
-
title: Welcome
2
+
title: Invariant Agent Security
3
3
---
4
4
5
-
# Invariant Agent Security and Debugging
5
+
# Invariant Agent Security
6
6
7
7
<divclass='subtitle'>A security and debugging layer for agentic AI systems.</div>
8
8
9
-
Invariant offers a toolchain for building and securing agentic AI systems. It supports building secure agentic AI systems _from scratch_, and to _secure existing or deployed AI agents_ in an organization.
9
+
Invariant is a **security layer to protect agentic AI systems**. It supports building secure agentic AI systems _from scratch_, and to _secure existing or deployed AI agents_ in an organization.
10
10
11
-
For this, the _Invariant Gateway_ intercepts and traces the LLM calls of your agent. This enables security guardrailing and insights during development and operation, without requiring any code changes.
11
+
For this, the _Invariant Gateway_**intercepts the LLM calls of your agent**, to implement _guardrailing and security analysis_ during development and operation, without requiring any code changes.
12
12
13
13
<divclass='overview small'>
14
14
<div class='clear box thirdparty'>
15
15
Agent
16
16
</div>
17
+
↔
17
18
<div class='box fill main clear'>
18
19
<a class='box clear' href='./gateway'>
19
20
<p>Invariant Gateway</p>
20
-
<i>Transparent LLM proxy to trace and intercept LLM calls</i>
21
-
<i class='more'>→</i>
21
+
<i>Security proxy to intercept LLM and tool calls</i>
22
+
<i class='more'>↗ </i>
22
23
</a>
23
24
</div>
25
+
↔
24
26
<div class='clear box thirdparty'>
25
27
LLM Provider
26
28
</div>
27
29
</div>
28
30
29
-
## Getting Started as Developer
31
+
## Why You Need A Security Layer for Your Agents
32
+
33
+
Invariant helps you make sure that your agents are safe from malicious actors and prevents fatal malfunction:
34
+
35
+
* It **blocks prompt injections and agent jailbreaks**.
36
+
* It **imposes strict** rules on agent capabilities and behavior, to prevent malfunction and abuse.
37
+
* It **analyzes the data flow of your agents**, to ensure that they are not leaking sensitive information.
38
+
* It helps you **steer and control your agents**, to ensure that they are not doing anything unexpected.
39
+
* It ensures that your agents are **in compliance with your organization's policies**.
40
+
* It helps you to **surface novel malicious behavioral patterns** in your agents, and automatically proposes guardrailing rules to prevent them.
41
+
42
+
Securing your agent is a crucial step in safely deploying AI agents to production or in your organization.
30
43
31
-
To quickly integrate your agentic application with Invariant, it is enough to rely on our hosted gateway, to automatically trace your agent's LLM calls and to unlock the Invariant eco-system.
44
+
## Getting Started as Developer
32
45
33
-
```python hl_lines="5 6 7 8 9 10 11 12"
46
+
To quickly secure your agentic application with Invariant, you can rely on our hosted gateway. It automatically traces and protects your agent's LLM calls and actions by enforcing guardrailing rules:
messages=[{"role": "user", "content": "What's the weather?"}],
92
+
messages=[{"role": "user", "content": "Tell me more about fight club."}],
65
93
)
94
+
```
66
95
67
-
print(response.messages[-1]["content"])
68
-
# Output: "It seems to be sunny."
96
+
**Output**
97
+
```bash
98
+
BadRequest: [Invariant] The message did not pass the guardrailing check:
99
+
'Rule 1: Do not talk about Fight Club'"
69
100
```
70
101
71
-
With this code, your agent is automatically tracked and all execution traces will be logged in a designated dataset in Explorer ([screenshot here](./explorer/)).
102
+
With this code, your agent is automatically secured and all execution traces will be logged in a designated dataset in Explorer ([screenshot here](./explorer/)).
72
103
73
-
Overall, this integration opens up your agent system to the full Invariant family of tools, allowing you to [observe and debug](./explorer/), [write unit tests](testing/), and [analyze your agent's behavior for security vulnerabilities](https://github.com/invariantlabs-ai/invariant?tab=readme-ov-file#analyzer).
104
+
This integration opens up your agent system to the full Invariant family of tools, allowing you to [guardrail and secure](./guardrails/), [observe and debug](./explorer/) and [unit test](testing/) your agents.
74
105
75
-
This documentation describes how to get started with Invariant eco-system and how to use the different tools, to build and secure your agentic AI systems.
106
+
This documentation describes how to get started with the Invariant eco-system and how to use the different tools, to build and secure your agentic AI systems.
76
107
77
108
## Getting Started as a Security Admin
78
109
79
110
Looking to observe and secure AI agents in your organization? Read our no-code quickstart guides below, for configuring different agents directly with the Invariant Gateway.
80
111
81
-
This way, you can keep track of your organization's agents, without having to change their code.
112
+
This way, you can keep track and secure your organization's agents, without having to change their code.
82
113
83
-
If you are interested in deploying your own dedicated instance of the Invariant Gateway, see [self-hosting](./gateway/self-hosted.md).
114
+
If you are interested in deploying your own dedicated instance of the Invariant Gateway, see our [self-hosting guide](./gateway/self-hosted.md).
84
115
85
116
<div class='tiles'>
86
117
@@ -114,15 +145,15 @@ You can use each tool independently, or in combination with each other. The foll
114
145
<div class='box fill main clear'>
115
146
<a class='box clear' href='./gateway'>
116
147
<p>Invariant Gateway</p>
117
-
<i>Transparent LLM proxy to trace and intercept LLM calls</i>
118
-
<i class='more'>→</i>
148
+
<i>Security proxy to trace and intercept LLM calls</i>
149
+
<i class='more'>↗ </i>
119
150
</a>
120
151
<!-- <div class='online'>
121
152
<div class='title'>Online Guardrails</div>
122
153
<div class='box fill clear' style="flex: 1;">
123
154
<p>Analyzer</p>
124
155
<i>Agent Security Scanner</i>
125
-
<i class='more'>→</i>
156
+
<i class='more'>↗ </i>
126
157
</div>
127
158
</div> -->
128
159
</div>
@@ -136,21 +167,21 @@ You can use each tool independently, or in combination with each other. The foll
136
167
</div>
137
168
<div class='offline'>
138
169
<div class='title'>Trace Analysis</div>
170
+
<a class='box fill clear' href='https://github.com/invariantlabs-ai/invariant?tab=readme-ov-file#analyzer'>
171
+
<p>Guardrails</p>
172
+
<i>Steer and protect your agents</i>
173
+
<i class='more'>↗ </i>
174
+
</a>
139
175
<a class='box fill clear' href='./explorer'>
140
176
<p>Explorer</p>
141
-
<i>Trace viewing</i>
142
-
<i class='more'>→</i>
177
+
<i>Trace analysis and debugging</i>
178
+
<i class='more'>↗ </i>
143
179
</a>
144
-
<a class='box fill clear' href='./testing'>
180
+
<!-- <a class='box fill clear' href='./testing'>
145
181
<p>Testing</p>
146
182
<i>Agent Unit Testing</i>
147
-
<i class='more'>→</i>
148
-
</a>
149
-
<a class='box fill clear' href='https://github.com/invariantlabs-ai/invariant?tab=readme-ov-file#analyzer'>
0 commit comments