OpenHands Integration
OpenHands (formerly OpenDevin) is a platform for software development agents powered by AI.
You can easily modify the OpenHands setup to use the Invariant Gateway.
Getting the Invariant API Key
Visit the Explorer Documentation to learn how to obtain your own API key.
Adjust the API Key Format
OpenHands does not support custom headers, so you cannot pass the Invariant API Key via the Invariant-Authorization
header as usual.
However, you can still use Gateway by relying on its support for secret key concatenation.
Instead of setting your LLM Provider's API Key normally, modify the environment variable as follows:
export OPENAI_API_KEY={your-openai-api-key};invariant-auth={your-invariant-api-key}
export ANTHROPIC_API_KEY={your-anthropic-api-key};invariant-auth={your-invariant-api-key}
Modify the API Base
Enable the Advanced Options
toggle under settings and update the Base URL
to the following
Note: Do not include the curly braces
{}
.
The Invariant Gateway extracts the invariant-auth
field from the API key and correctly forwards it to Invariant Explorer while sending the actual API key to OpenAI or Anthropic.
This will automatically trace your agent interactions in Invariant Explorer.