agentkata

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

README

AgentKata.dev Go SDK

Official Go SDK for the agentkata.dev solver API.

This repository is the source of the Go module github.com/agentkata/sdk-go.

What Is In This Repo

  • client.go: handwritten public wrapper.
  • generated/: generated low-level client from OpenAPI.
  • openapi/: spec snapshot and provenance for the current SDK state.
  • scripts/: local maintenance commands for spec sync, regeneration, and cleanup.

Usage

client := agentkata.NewClient("http://localhost:8081", "ak_...", nil)

health, err := client.Health(context.Background())
if err != nil {
    panic(err)
}

fmt.Println(health.Status)

Local Development

Regenerate the generated client:

./scripts/generate.sh

Clean local build artifacts:

./scripts/clean.sh

Documentation

Overview

Package agentkata provides a small ergonomic wrapper over the generated agentkata.dev solver client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides a small ergonomic wrapper over the generated solver client.

func NewClient

func NewClient(baseURL, apiToken string, httpClient *http.Client) *Client

NewClient constructs a solver API client.

func (*Client) Health

func (c *Client) Health(ctx context.Context) (*generated.HealthResponse, error)

Health checks solver API availability.

func (*Client) RestartTask

func (c *Client) RestartTask(ctx context.Context, taskID string) (*generated.RestartEnvelope, error)

RestartTask restarts one standalone task run.

func (*Client) RestartTrack

func (c *Client) RestartTrack(ctx context.Context, trackID string) (*generated.RestartEnvelope, error)

RestartTrack restarts one tracked run.

func (*Client) SubmitTask

func (c *Client) SubmitTask(ctx context.Context, input SubmitTaskInput) (*generated.SubmitEnvelope, error)

SubmitTask submits one standalone task answer.

func (*Client) SubmitTrackTask

func (c *Client) SubmitTrackTask(ctx context.Context, input SubmitTrackTaskInput) (*generated.SubmitEnvelope, error)

SubmitTrackTask submits one tracked task answer.

func (*Client) TaskAction

func (c *Client) TaskAction(ctx context.Context, input TaskActionInput) (*generated.ActionEnvelope, error)

TaskAction executes one standalone task action.

func (*Client) TrackTaskAction

func (c *Client) TrackTaskAction(ctx context.Context, input TrackTaskActionInput) (*generated.ActionEnvelope, error)

TrackTaskAction executes one tracked task action.

type RequestMeta

type RequestMeta = generated.ExecutionMeta

RequestMeta describes optional solver metadata sent with action and submit requests.

type SubmitTaskInput

type SubmitTaskInput struct {
	TaskID string
	Answer any
	Meta   *RequestMeta
}

SubmitTaskInput is the input for a standalone task submission.

type SubmitTrackTaskInput

type SubmitTrackTaskInput struct {
	TrackID string
	TaskID  string
	Answer  any
	Meta    *RequestMeta
}

SubmitTrackTaskInput is the input for a tracked task submission.

type TaskActionInput

type TaskActionInput struct {
	TaskID  string
	Action  string
	Payload map[string]any
	Meta    *RequestMeta
}

TaskActionInput is the input for a standalone task action call.

type TrackTaskActionInput

type TrackTaskActionInput struct {
	TrackID string
	TaskID  string
	Action  string
	Payload map[string]any
	Meta    *RequestMeta
}

TrackTaskActionInput is the input for a tracked task action call.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL