Skip to content

Commit f563af9

Browse files
update index
1 parent 316f220 commit f563af9

File tree

2 files changed

+60
-10
lines changed

2 files changed

+60
-10
lines changed

docs/assets/invariant.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,8 @@ label.md-nav__title {
368368
justify-content: center;
369369
padding: 5pt 20pt;
370370
align-items: center;
371-
margin-top: 70pt;
372-
margin-bottom: 120pt;
371+
margin-top: 30pt;
372+
margin-bottom: 140pt;
373373
}
374374

375375
.overview .box {

docs/index.md

Lines changed: 58 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,59 @@ For this, it relies on an entirely transparent proxy that intercepts and traces
2626
</div>
2727
</div>
2828

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
43+
http_client=Client(headers={"Invariant-Authorization": "Bearer <your-token>"}),
44+
base_url="https://explorer.invariantlabs.ai/api/v1/gateway/<your-dataset-id>/openai",
45+
)
46+
)
47+
48+
# === Agent Implementation ===
49+
50+
# define a tool
51+
def get_weather():
52+
return "It's sunny."
53+
54+
# define an agent
55+
agent = Agent(
56+
name="Agent A",
57+
instructions="You are a helpful agent.",
58+
functions=[get_weather],
59+
)
60+
61+
# run the agent
62+
response = client.run(
63+
agent=agent,
64+
messages=[{"role": "user", "content": "What's the weather?"}],
65+
)
66+
67+
print(response.messages[-1]["content"])
68+
# Output: "It seems to be sunny."
69+
```
3070

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 <img class='inline-invariant' src="assets/logo.svg"/> [Invariant Explorer](https://explorer.invariantlabs.ai).
3272

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).
3474

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.
3782

3883
<div class='overview'>
3984
<div class='clear box thirdparty'>
@@ -45,17 +90,17 @@ You can use each tool independently, or in combination with each other. The foll
4590
<i>Transparent LLM proxy to trace and intercept LLM calls</i>
4691
<i class='more'>→</i>
4792
</a>
48-
<div class='online'>
93+
<!-- <div class='online'>
4994
<div class='title'>Online Guardrails</div>
5095
<div class='box fill clear' style="flex: 1;">
5196
<p>Analyzer</p>
5297
<i>Agent Security Scanner</i>
5398
<i class='more'>→</i>
5499
</div>
55-
</div>
100+
</div> -->
56101
<div class='offline'>
57102
<hr/>
58-
<div class='title'>Offline Analysis</div>
103+
<div class='title'>Trace Analysis</div>
59104
<a class='box fill clear' href='./explorer'>
60105
<p>Explorer</p>
61106
<i>Trace viewing and debugging</i>
@@ -66,6 +111,11 @@ You can use each tool independently, or in combination with each other. The foll
66111
<i>Agent Unit Testing</i>
67112
<i class='more'>→</i>
68113
</a>
114+
<a class='box fill clear' href='https://github.com/invariantlabs-ai/invariant?tab=readme-ov-file#analyzer'>
115+
<p>Analyzer</p>
116+
<i>Agent Security Scanner</i>
117+
<i class='more'>→</i>
118+
</a>
69119
</div>
70120
</div>
71121
<div class='clear box thirdparty'>

0 commit comments

Comments
 (0)