Install
openclaw skills install @psyb0t/go-julepUnofficial Go client for the Julep API, generated with oapi-codegen. julep.NewClientWithResponses(baseURL, opts...) from github.com/psyb0t/go-julep gives a typed method for every endpoint in Julep's OpenAPI spec (agents, agent docs and search, tools, tasks, executions and transitions, sessions and chat, users, files, secrets, projects, embeddings, jobs, health), with request structs and decoded JSON200/JSON201/JSON422 response fields. Auth is an API key in the Authorization header, added through a request editor. Use when Go code needs to call the Julep API, or already imports go-julep.
openclaw skills install @psyb0t/go-julepTyped Go client for the Julep API. Package julep, generated from the spec Julep publishes for its SDKs.
For install details, the method naming scheme and the operation list, see references/setup.md.
JULEP_API_KEY. Never hardcode it, commit it, or log it, and never print request headers.NewClientWithResponses: https://api.julep.ai/api, or https://dev.julep.ai/api when the user asks for dev.github.com/psyb0t/go-julep.GetExecutionDetailsExecutionsExecutionIdGet instead.import (
"context"
"fmt"
"net/http"
"os"
"github.com/psyb0t/go-julep"
)
auth := julep.WithRequestEditorFn(func(_ context.Context, req *http.Request) error {
req.Header.Set("Authorization", "Bearer "+os.Getenv("JULEP_API_KEY"))
return nil
})
client, err := julep.NewClientWithResponses("https://api.julep.ai/api", auth)
if err != nil {
return err
}
limit := 10
agents, err := client.ListAgentsAgentsGetWithResponse(
ctx,
&julep.ListAgentsAgentsGetParams{Limit: &limit},
)
if err != nil {
return err // transport failure
}
if agents.JSON200 == nil {
return fmt.Errorf("list agents: status %d: %s", agents.StatusCode(), agents.Body)
}
for _, agent := range agents.JSON200.Items {
fmt.Println(*agent.Id, agent.Name)
}
Creating a user (the API answers 201, so read JSON201):
name := "alice"
res, err := client.CreateUserUsersPostWithResponse(ctx, julep.CreateUserRequest{Name: &name})
if err != nil {
return err
}
if res.JSON201 == nil {
return fmt.Errorf("create user: status %d: %s", res.StatusCode(), res.Body)
}
fmt.Println(*res.JSON201.Id)
err is a transport or decoding failure.err. Check StatusCode(): the matching JSON200 or JSON201 field is set on success, JSON422 (*HTTPValidationError, with Detail) on a validation error, and Body always holds the raw response.