Official SDKs
Native libraries for your language of choice. Every SDK is type-safe, fully tested, and maintained by the SentryAgent team.
Node.js SDK
TypeScriptInstallation
npm install @sentryagent/idp-sdkQuick Start
import { AgentIdPClient } from '@sentryagent/idp-sdk';
const client = new AgentIdPClient({
apiUrl: process.env.AGENTIDP_URL!,
clientId: process.env.AGENTIDP_CLIENT_ID!,
clientSecret: process.env.AGENTIDP_CLIENT_SECRET!,
});
// Register a new agent
const agent = await client.agents.register({
name: 'my-ai-agent',
description: 'Production summarisation agent',
});
console.log('Agent ID:', agent.agentId);
// Issue an access token
const { accessToken } = await client.tokens.issue(agent.agentId);
console.log('Token:', accessToken);Python SDK
PythonInstallation
pip install sentryagent-idpQuick Start
from sentryagent_idp import AgentIdPClient
client = AgentIdPClient(
api_url=os.environ["AGENTIDP_URL"],
client_id=os.environ["AGENTIDP_CLIENT_ID"],
client_secret=os.environ["AGENTIDP_CLIENT_SECRET"],
)
# Register a new agent
agent = client.agents.register(
name="my-ai-agent",
description="Production summarisation agent",
)
print("Agent ID:", agent.agent_id)
# Issue an access token
token_response = client.tokens.issue(agent.agent_id)
print("Token:", token_response.access_token)Go SDK
GoInstallation
go get github.com/sentryagent/idp-sdk-goQuick Start
import (
"fmt"
"os"
idp "github.com/sentryagent/idp-sdk-go"
)
client := idp.NewClient(idp.Config{
APIURL: os.Getenv("AGENTIDP_URL"),
ClientID: os.Getenv("AGENTIDP_CLIENT_ID"),
ClientSecret: os.Getenv("AGENTIDP_CLIENT_SECRET"),
})
// Register a new agent
agent, err := client.Agents.Register(ctx, &idp.RegisterAgentInput{
Name: "my-ai-agent",
Description: "Production summarisation agent",
})
if err != nil {
panic(err)
}
fmt.Println("Agent ID:", agent.AgentID)
// Issue an access token
token, err := client.Tokens.Issue(ctx, agent.AgentID)
fmt.Println("Token:", token.AccessToken)Java SDK
JavaInstallation
<dependency>
<groupId>ai.sentryagent</groupId>
<artifactId>idp-sdk</artifactId>
<version>1.0.0</version>
</dependency>Quick Start
import ai.sentryagent.idp.AgentIdPClient;
import ai.sentryagent.idp.model.Agent;
import ai.sentryagent.idp.model.TokenResponse;
AgentIdPClient client = AgentIdPClient.builder()
.apiUrl(System.getenv("AGENTIDP_URL"))
.clientId(System.getenv("AGENTIDP_CLIENT_ID"))
.clientSecret(System.getenv("AGENTIDP_CLIENT_SECRET"))
.build();
// Register a new agent
Agent agent = client.agents().register(
RegisterAgentRequest.builder()
.name("my-ai-agent")
.description("Production summarisation agent")
.build()
);
System.out.println("Agent ID: " + agent.getAgentId());
// Issue an access token
TokenResponse token = client.tokens().issue(agent.getAgentId());
System.out.println("Token: " + token.getAccessToken());