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/index.md
+58-8Lines changed: 58 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,14 +26,59 @@ For this, it relies on an entirely transparent proxy that intercepts and traces
26
26
</div>
27
27
</div>
28
28
29
-
## Overview
29
+
## Getting Started as Developer
30
+
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.
32
+
33
+
```python hl_lines="5 6 7 8 9 10 11 12"
34
+
35
+
from swarm import Swarm, Agent
36
+
from openai import OpenAI
37
+
from httpx import Client
38
+
39
+
# === Invariant integration ===
40
+
client = Swarm(
41
+
client=OpenAI(
42
+
# redirect and authenticate with the Invariant Gateway
messages=[{"role": "user", "content": "What's the weather?"}],
65
+
)
66
+
67
+
print(response.messages[-1]["content"])
68
+
# Output: "It seems to be sunny."
69
+
```
30
70
31
-
Based on the gateway, Invariant offers a family of tools for securing, testing and debugging AI agents. These tools are designed to be used in conjunction with the gateway, which greatly facilitates integration.
71
+
With this code, your agent is automatically tracked and all execution traces will be logged in a designated dataset on the <imgclass='inline-invariant'src="assets/logo.svg"/> [Invariant Explorer](https://explorer.invariantlabs.ai).
32
72
33
-
You can use each tool independently, or in combination with each other. The following interactive figure illustrates the Invariant eco-system and how the tools fit together:
73
+
This enables you to analyze, debug and ensure the security of your agentic system, during development and operation. It also opens up your agent to the Invariant family of tools, allowing you to [observe and debug](./explorer/) your agent, [test it](testing/), and [analyze it for security vulnerabilities](https://github.com/invariantlabs-ai/invariant?tab=readme-ov-file#analyzer).
34
74
35
-
<br/>
36
-
<br/>
75
+
In the next sections, we will introduce the Invariant eco-system and how to get started with it.
76
+
77
+
## Overview
78
+
79
+
With the gateway at the core, Invariant offers a family of tools for trace analysis and testing, allowing you to secure, debug and test your AI agents.
80
+
81
+
You can use each tool independently, or in combination with each other. The following interactive figure illustrates the Invariant eco-system and how the tools fit together. You can click on any of the boxes to learn more about the respective tool.
37
82
38
83
<divclass='overview'>
39
84
<div class='clear box thirdparty'>
@@ -45,17 +90,17 @@ You can use each tool independently, or in combination with each other. The foll
45
90
<i>Transparent LLM proxy to trace and intercept LLM calls</i>
46
91
<i class='more'>→</i>
47
92
</a>
48
-
<div class='online'>
93
+
<!-- <div class='online'>
49
94
<div class='title'>Online Guardrails</div>
50
95
<div class='box fill clear' style="flex: 1;">
51
96
<p>Analyzer</p>
52
97
<i>Agent Security Scanner</i>
53
98
<i class='more'>→</i>
54
99
</div>
55
-
</div>
100
+
</div> -->
56
101
<div class='offline'>
57
102
<hr/>
58
-
<div class='title'>Offline Analysis</div>
103
+
<div class='title'>Trace Analysis</div>
59
104
<a class='box fill clear' href='./explorer'>
60
105
<p>Explorer</p>
61
106
<i>Trace viewing and debugging</i>
@@ -66,6 +111,11 @@ You can use each tool independently, or in combination with each other. The foll
66
111
<i>Agent Unit Testing</i>
67
112
<i class='more'>→</i>
68
113
</a>
114
+
<a class='box fill clear' href='https://github.com/invariantlabs-ai/invariant?tab=readme-ov-file#analyzer'>
0 commit comments