API

Go SDK

The official Go package, github.com/tactasai/tactasai-go, wraps the TactasAI v1 API with typed helpers for agent and knowledge workflows.

Install

Source repository: TactasAI/tactasai-go.

go get github.com/tactasai/tactasai-go

Configure

The client reads TACTASAI_API_KEY and TACTASAI_BASE_URL. The base URL defaults to https://api.tactas.ai.

client, err := tactasai.NewClient(
    tactasai.WithAPIKey(os.Getenv("TACTASAI_API_KEY")),
    tactasai.WithBaseURL("https://api.tactas.ai"),
    tactasai.WithRetryMax(3),
)

Quick Start

session, err := client.CreateSession(ctx, workspaceID, tactasai.CreateSessionRequest{
    Title: "Go SDK session",
})

response, err := client.SubmitMessage(ctx, workspaceID, session.ID, tactasai.SubmitMessageRequest{
    ContentText: "Summarize my workspace knowledge.",
}, tactasai.WithIdempotencyKey("message-001"))

Raw Requests

Use RawRequest for newly released endpoints before a typed helper exists.

raw, err := client.RawRequest(ctx, http.MethodGet, "/v1/new-endpoint", nil, nil)