agentcontrol

package
v0.1.0-preview Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package agentcontrol is the resource module for the AgentControl surface — fine-tuning jobs, model training, knowledge bases, datasets, server-side agents, and GitHub dataset import.

Every AgentControl request carries an X-Tenant-ID header. Set the tenant id once (via vxsdk.WithTenantID, LoadFromVxcli, or the Client's TenantID field) and it applies to every sub-resource call.

Endpoints (all on the per-tenant node):

GET  /api/v2/agentcontrol/summary
GET  /api/v2/agentcontrol/{fine-tuning,training,knowledge,datasets,agents}/
GET  /api/v2/agentcontrol/{...}/{id}
POST /api/v2/agentcontrol/{fine-tuning,training,knowledge}/
GET  /api/v2/agentcontrol/datasets/{id}/preview
POST /api/v2/agentcontrol/datasets/upload                 (multipart)
POST /api/v2/agentcontrol/agents/{id}/execute
GET  /api/v2/agentcontrol/github/repos
POST /api/v2/agentcontrol/github/import-dataset

agentcontrol_new.go — sub-resources added to reach UI parity with the /api/v2/agentcontrol/* surface. The original agentcontrol.go covers FineTuning, Training, Knowledge, Datasets, Agents, GitHub and Summary; this file adds Embeddings, Tools, MCP, Evals, Code, Models, Deployments, WebAssets, Benchmarks, Catalog, Health, Events, LLM, DeployTargets, Workflows-shim and Infra. Conventions match the existing file: every sub-resource is a {*Client, path} struct; all I/O routes through Client.do / doList / doDelete / doBytes; validation uses requireKeys.

agentcontrol_verbs.go — verbs missing from the original agentcontrol.go sub-resources, plus a handful of agent-related routes (Get, Update, Delete, ProxyExecute, RuntimeMetrics) and dataset routes (Download, Delete) that don't fit either the "new sub-resource" file or the trimmed original.

Method receivers reuse the existing sub-resource types from agentcontrol.go so the public API stays one struct per resource. Routes mirror what the UI's agentcontrol_service.ts calls — see [c:/tmp/agentcontrol_ui_actions.md].

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agents

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

Agents is the server-side agents sub-resource.

func (*Agents) Create

func (r *Agents) Create(ctx context.Context, spec map[string]interface{}) (Result, error)

Create registers a new server-side agent. spec must include at least name and model_id.

func (*Agents) Delete

func (r *Agents) Delete(ctx context.Context, agentID string) (Result, error)

Delete removes one server-side agent.

func (*Agents) Execute

func (r *Agents) Execute(ctx context.Context, agentID, task string, extra map[string]interface{}) (Result, error)

Execute runs a server-side agent against a task. extra fields, if any, are merged into the request body.

func (*Agents) Get

func (r *Agents) Get(ctx context.Context, agentID string) (Result, error)

Get returns one server-side agent.

func (*Agents) List

func (r *Agents) List(ctx context.Context) ([]Result, error)

List returns all server-side agents for the tenant.

func (*Agents) ProxyExecute

func (r *Agents) ProxyExecute(ctx context.Context, in ProxyExecuteInput) (Result, error)

ProxyExecute relays an execution call through the node so HTTPS callers can reach plain-HTTP agent endpoints on the VM. POST /agents/proxy-execute.

func (*Agents) Update

func (r *Agents) Update(ctx context.Context, agentID string, patch map[string]interface{}) (Result, error)

Update patches one server-side agent (PUT, mirrors UI).

type Benchmarks

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

Benchmarks is the benchmarks sub-resource. (Distinct from Evals — Evals is the v3 /evals/runs surface; this is the legacy /benchmarks/ surface.)

func (*Benchmarks) Create

func (r *Benchmarks) Create(ctx context.Context, spec map[string]interface{}) (Result, error)

Create posts a new benchmark. spec is opaque to the SDK.

func (*Benchmarks) List

func (r *Benchmarks) List(ctx context.Context) (Result, error)

List returns all benchmarks for the tenant.

type Catalog

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

Catalog is the model-catalog sub-resource (Browse Models in the UI).

func (*Catalog) List

func (r *Catalog) List(ctx context.Context) ([]Result, error)

List returns the full catalog.

func (*Catalog) Summary

func (r *Catalog) Summary(ctx context.Context) (Result, error)

Summary returns the catalog summary metrics.

type ChatRequest

type ChatRequest struct {
	Provider  string // required (e.g. "anthropic", "openai", "ollama")
	Model     string // required
	Message   string // required
	AgentType string // optional ("coding", "devops", "git", ...)
	SessionID string // optional — continues a prior session
}

ChatRequest describes one LLM chat call.

type Client

type Client struct {
	T       *transport.Transport
	NodeURL string
	// TenantID is sent as X-Tenant-ID on every call. Required.
	TenantID string
}

Client is the AgentControl facade. Construct via c.AgentControl().

func (*Client) Agents

func (c *Client) Agents() *Agents

Agents returns the server-side agents sub-resource. These are distinct from c.Agents() (client-side AI orchestration) — they persist in the agentcontrol DB and run via /agents/{id}/execute.

func (*Client) Benchmarks

func (c *Client) Benchmarks() *Benchmarks

Benchmarks returns the benchmarks sub-resource (separate from Evals).

func (*Client) Catalog

func (c *Client) Catalog() *Catalog

Catalog returns the model-catalog sub-resource (Browse Models in the UI).

func (*Client) Code

func (c *Client) Code() *Code

Code returns the Programming-tab sub-resource — run + persist editor content.

func (*Client) Datasets

func (c *Client) Datasets() *Datasets

Datasets returns the datasets sub-resource.

func (*Client) DeployTargets

func (c *Client) DeployTargets() *DeployTargets

DeployTargets returns the deploy-target provisioning sub-resource.

func (*Client) Deployments

func (c *Client) Deployments() *Deployments

Deployments returns the agentcontrol Deployments sub-resource (model endpoints — create, sync, status, delete).

func (*Client) Embeddings

func (c *Client) Embeddings() *Embeddings

Embeddings returns the vector-artifacts sub-resource (FAISS / ChromaDB).

func (*Client) Evals

func (c *Client) Evals() *Evals

Evals returns the evaluation-runs sub-resource (Benchmarks tab).

func (*Client) Events

func (c *Client) Events() *Events

Events returns the event-bus sub-resource (Kafka/Redis/Celery status).

func (*Client) FineTuning

func (c *Client) FineTuning() *FineTuning

FineTuning returns the fine-tuning-jobs sub-resource.

func (*Client) GitHub

func (c *Client) GitHub() *GitHub

GitHub returns the GitHub dataset-import sub-resource.

func (*Client) Health

func (c *Client) Health() *Health

Health returns the model-health sub-resource.

func (*Client) Infra

func (c *Client) Infra() *Infra

Infra returns the infrastructure-discovery sub-resource (endpoint list).

func (*Client) Knowledge

func (c *Client) Knowledge() *Knowledge

Knowledge returns the knowledge-bases sub-resource.

func (*Client) LLM

func (c *Client) LLM() *LLM

LLM returns the LLM-chat + providers sub-resource.

func (*Client) MCP

func (c *Client) MCP() *MCP

MCP returns the MCP-servers sub-resource. Note: per project-mcp-split-brain memory, the MCP route is Cloudflare bot-blocked for non-browser callers on some environments; expect HTTP 403 "error code: 1010" if so. Use a browser User-Agent header on the Transport to work around it.

func (*Client) Models

func (c *Client) Models() *Models

Models returns the agentcontrol-side Models sub-resource (UI uploads, soft-delete, state changes). Distinct from the marketplace catalog.

func (*Client) RuntimeMetrics

func (c *Client) RuntimeMetrics(ctx context.Context, endpoint string) (Result, error)

RuntimeMetrics proxies a metrics-endpoint scrape through the node. endpoint is the agent's metrics URL (e.g. "http://1.2.3.4:8000/metrics"). Used by the My Agents tab to show requests/errors/latency without CORS issues.

func (*Client) Summary

func (c *Client) Summary(ctx context.Context) (Result, error)

Summary returns the AgentControl dashboard summary for the tenant.

func (*Client) Tools

func (c *Client) Tools() *Tools

Tools returns the tools & actions sub-resource.

func (*Client) Training

func (c *Client) Training() *Training

Training returns the model-training-jobs sub-resource.

func (*Client) WebAssets

func (c *Client) WebAssets() *WebAssets

WebAssets returns the Web-Assets sub-resource.

func (*Client) Workflows

func (c *Client) Workflows() *Workflows

Workflows returns the workflow-shim sub-resource (list + trigger; the fuller workflow surface lives on the workflow service, not agentcontrol).

type Code

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

Code is the Programming-tab sub-resource — runs editor content and persists saved snippets on the tenant node via the Go shim's /code/* routes.

func (*Code) DeleteSaved

func (r *Code) DeleteSaved(ctx context.Context, filename string) (Result, error)

DeleteSaved removes one saved snippet.

func (*Code) GetSaved

func (r *Code) GetSaved(ctx context.Context, filename string) (Result, error)

GetSaved fetches the contents of one saved snippet.

func (*Code) ListSaved

func (r *Code) ListSaved(ctx context.Context) (Result, error)

ListSaved returns metadata for every saved snippet.

func (*Code) Run

func (r *Code) Run(ctx context.Context, opts RunOptions) (Result, error)

Run executes a one-shot code snippet on the tenant node and returns stdout / stderr / exit_code.

func (*Code) Save

func (r *Code) Save(ctx context.Context, filename, language, content string) (Result, error)

Save persists a snippet to the tenant's editor storage.

type Datasets

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

Datasets is the datasets sub-resource.

func (*Datasets) Create

func (r *Datasets) Create(ctx context.Context, spec map[string]interface{}) (Result, error)

Create (metadata-only) adds a dataset row without uploading content. Distinct from Upload, which posts the file body via multipart.

func (*Datasets) Delete

func (r *Datasets) Delete(ctx context.Context, id string) (Result, error)

Delete removes one dataset (row + on-disk file).

func (*Datasets) Download

func (r *Datasets) Download(ctx context.Context, id string) ([]byte, error)

Download returns the raw dataset bytes. Callers handle the filename (typically derived from a Content-Disposition header on the HTTP response — for that, use BytesWithHeaders directly).

func (*Datasets) Get

func (r *Datasets) Get(ctx context.Context, datasetID string) (Result, error)

Get returns one dataset.

func (*Datasets) List

func (r *Datasets) List(ctx context.Context) ([]Result, error)

List returns all datasets for the tenant.

func (*Datasets) Preview

func (r *Datasets) Preview(ctx context.Context, datasetID string) (Result, error)

Preview returns a sample of a dataset's rows.

func (*Datasets) Upload

func (r *Datasets) Upload(ctx context.Context, content []byte, filename string, opts UploadOptions) (Result, error)

Upload creates a dataset from in-memory file content. The SDK never reads from disk — the caller supplies the bytes and a filename.

type DeployTargets

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

DeployTargets is the deploy-target provisioning sub-resource.

func (*DeployTargets) List

func (r *DeployTargets) List(ctx context.Context) ([]Result, error)

List returns all deploy targets registered for the tenant.

func (*DeployTargets) Provision

func (r *DeployTargets) Provision(ctx context.Context, in ProvisionInput) (Result, error)

Provision starts a new deploy-target VM. Returns a session_id the caller uses with ProvisionStatus to poll.

func (*DeployTargets) ProvisionStatus

func (r *DeployTargets) ProvisionStatus(ctx context.Context, sessionID, username string) (Result, error)

ProvisionStatus polls a provisioning session.

type Deployments

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

Deployments is the model-endpoints sub-resource (Models tab > My Deployments).

func (*Deployments) Create

func (r *Deployments) Create(ctx context.Context, spec map[string]interface{}) (Result, error)

Create starts a deployment. spec must include at least name and model_id.

func (*Deployments) Delete

func (r *Deployments) Delete(ctx context.Context, id string) (Result, error)

Delete removes one deployment row.

func (*Deployments) DeleteAll

func (r *Deployments) DeleteAll(ctx context.Context) (Result, error)

DeleteAll removes every deployment row for the tenant.

func (*Deployments) List

func (r *Deployments) List(ctx context.Context) ([]Result, error)

List returns all deployment rows.

func (*Deployments) SetStatus

func (r *Deployments) SetStatus(ctx context.Context, id, status string) (Result, error)

SetStatus patches the deployment's status field.

func (*Deployments) Summary

func (r *Deployments) Summary(ctx context.Context) (Result, error)

Summary returns deployment-summary metrics.

func (*Deployments) Sync

func (r *Deployments) Sync(ctx context.Context, id string) (Result, error)

Sync refreshes a deployment's runtime status from the VM.

type Embeddings

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

Embeddings is the vector-artifacts sub-resource. Backs the Embeddings tab.

func (*Embeddings) Delete

func (r *Embeddings) Delete(ctx context.Context, id string) (Result, error)

Delete removes a single embedding artifact (rows + on-disk bytes).

func (*Embeddings) DeleteAll

func (r *Embeddings) DeleteAll(ctx context.Context) (Result, error)

DeleteAll wipes every embedding artifact for the tenant. Requires the caller to opt in via confirm=true (also reflected in the UI's red button).

func (*Embeddings) Download

func (r *Embeddings) Download(ctx context.Context, id, part string) ([]byte, error)

Download fetches a raw zip part of the embedding bundle. `part` is one of "faiss" or "chromadb" (other parts may be added server-side later).

func (*Embeddings) List

func (r *Embeddings) List(ctx context.Context) ([]Result, error)

List returns all embedding artifacts for the tenant. The collection URL uses no trailing slash on this route (unlike the others) — matches /api/v2/agentcontrol/embeddings.

func (*Embeddings) Promote

func (r *Embeddings) Promote(ctx context.Context, id string) (Result, error)

Promote registers the embedding artifact as a production model so it shows up in Models & Endpoints. Returns the new model_id.

func (*Embeddings) Query

func (r *Embeddings) Query(ctx context.Context, id, question string, topK int) (Result, error)

Query runs a semantic query against an artifact and returns the top-K hits. question is the natural-language query; topK defaults to 5 when <= 0.

func (*Embeddings) Upload

func (r *Embeddings) Upload(ctx context.Context, filename, contentBase64 string) (Result, error)

Upload accepts a pre-built embedding bundle as base64-encoded zip bytes. The SDK never reads from disk — caller supplies the bytes.

func (*Embeddings) Visualize

func (r *Embeddings) Visualize(ctx context.Context, id string, maxPoints int) (Result, error)

Visualize returns 2D PCA coordinates for the artifact's vectors. maxPoints defaults to 400 when <= 0.

type Evals

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

Evals is the evaluation-runs sub-resource (Benchmarks tab).

func (*Evals) CreateRun

func (r *Evals) CreateRun(ctx context.Context, spec map[string]interface{}) (Result, error)

CreateRun starts an eval run. spec must include at least name. The SDK auto-injects tenant_id into the body — the v3 route requires it there in addition to the X-Tenant-ID header.

func (*Evals) DeleteRun

func (r *Evals) DeleteRun(ctx context.Context, id string) (Result, error)

DeleteRun removes one eval run.

func (*Evals) FeedbackStats

func (r *Evals) FeedbackStats(ctx context.Context) (Result, error)

FeedbackStats returns aggregate feedback statistics for the tenant.

func (*Evals) ListRuns

func (r *Evals) ListRuns(ctx context.Context) ([]Result, error)

ListRuns returns all eval runs for the tenant. Mirrors the UI's /evals/runs/ listing.

func (*Evals) SubmitFeedback

func (r *Evals) SubmitFeedback(ctx context.Context, requestID, feedback, comment string) (Result, error)

SubmitFeedback records human feedback against a request_id.

type Events

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

Events is the event-bus sub-resource.

func (*Events) Publish

func (r *Events) Publish(ctx context.Context, topic, eventType string, payload interface{}) (Result, error)

Publish posts an event to a topic. payload is opaque.

func (*Events) Status

func (r *Events) Status(ctx context.Context) (Result, error)

Status returns Kafka/Redis/Celery connectivity + active task counts.

type FineTuning

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

FineTuning is the fine-tuning-jobs sub-resource.

func (*FineTuning) Create

func (r *FineTuning) Create(ctx context.Context, spec map[string]interface{}) (Result, error)

Create starts a fine-tuning job. spec must include at least name, base_model and training_file.

func (*FineTuning) Delete

func (r *FineTuning) Delete(ctx context.Context, jobID string) (Result, error)

Delete removes one fine-tuning job (row + on-disk artifacts).

func (*FineTuning) DeleteAll

func (r *FineTuning) DeleteAll(ctx context.Context) (Result, error)

DeleteAll wipes every fine-tuning job for the tenant.

func (*FineTuning) Get

func (r *FineTuning) Get(ctx context.Context, jobID string) (Result, error)

Get returns one fine-tuning job.

func (*FineTuning) List

func (r *FineTuning) List(ctx context.Context) ([]Result, error)

List returns all fine-tuning jobs for the tenant.

func (*FineTuning) Wait

func (r *FineTuning) Wait(ctx context.Context, jobID string, opts WaitOptions) (Result, error)

Wait polls a fine-tuning job until its status is terminal.

type GitHub

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

GitHub is the GitHub dataset-import sub-resource.

func (*GitHub) ImportDataset

func (r *GitHub) ImportDataset(ctx context.Context, in ImportDatasetInput) (Result, error)

ImportDataset imports a dataset from a GitHub repository.

func (*GitHub) ListRepos

func (r *GitHub) ListRepos(ctx context.Context) (Result, error)

ListRepos lists the GitHub repositories visible to the tenant.

func (*GitHub) RepoContents

func (r *GitHub) RepoContents(ctx context.Context, in GitHubContentsInput) (Result, error)

RepoContents returns either one file object (with base64 `content`) or an array when the path points to a directory. Used by the Programming tab's "Import from GitHub" button.

type GitHubContentsInput

type GitHubContentsInput struct {
	Owner string // required
	Repo  string // required
	Path  string // optional — directory or file path within the repo
	Ref   string // optional — branch/sha; defaults to main on the server
}

GitHubContentsInput describes a GitHub repo-contents fetch.

type Health

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

Health is the model-health sub-resource.

func (*Health) AllModels

func (r *Health) AllModels(ctx context.Context) (Result, error)

AllModels returns the rollup health status for every model.

func (*Health) Model

func (r *Health) Model(ctx context.Context, id string) (Result, error)

Model returns the health status for one model.

type ImportDatasetInput

type ImportDatasetInput struct {
	Repo   string // owner/name (required)
	Branch string // default "main"
	Path   string // path within the repo
	Name   string // dataset name; defaults to the repo basename
}

ImportDatasetInput describes a GitHub dataset import.

type Infra

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

Infra is the infrastructure-discovery sub-resource — returns the list of reachable agentcontrol endpoints on the tenant node.

func (*Infra) Endpoints

func (r *Infra) Endpoints(ctx context.Context) (Result, error)

Endpoints returns the discovered endpoints (typically used by the UI's auto-config flow).

type Knowledge

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

Knowledge is the knowledge-bases sub-resource.

func (*Knowledge) Create

func (r *Knowledge) Create(ctx context.Context, spec map[string]interface{}) (Result, error)

Create builds a knowledge base. spec must include at least name.

func (*Knowledge) Delete

func (r *Knowledge) Delete(ctx context.Context, kbID string) (Result, error)

Delete removes one knowledge base.

func (*Knowledge) DeleteAll

func (r *Knowledge) DeleteAll(ctx context.Context) (Result, error)

DeleteAll wipes every knowledge base for the tenant.

func (*Knowledge) Get

func (r *Knowledge) Get(ctx context.Context, kbID string) (Result, error)

Get returns one knowledge base.

func (*Knowledge) List

func (r *Knowledge) List(ctx context.Context) ([]Result, error)

List returns all knowledge bases for the tenant.

func (*Knowledge) Wait

func (r *Knowledge) Wait(ctx context.Context, kbID string, opts WaitOptions) (Result, error)

Wait polls a knowledge base until its status is terminal.

type LLM

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

LLM is the in-node LLM-chat sub-resource. Distinct from the standalone vxsdk Chat client — this one runs through agentcontrol's agent dispatcher.

func (*LLM) Chat

func (r *LLM) Chat(ctx context.Context, in ChatRequest) (Result, error)

Chat sends one message and returns reply + session_id.

func (*LLM) Providers

func (r *LLM) Providers(ctx context.Context) (Result, error)

Providers returns the list of configured LLM providers and their default models.

type MCP

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

MCP is the MCP-servers sub-resource.

func (*MCP) Create

func (r *MCP) Create(ctx context.Context, spec map[string]interface{}) (Result, error)

Create registers an MCP server. spec must include at least name and url.

func (*MCP) Delete

func (r *MCP) Delete(ctx context.Context, id string) (Result, error)

Delete removes an MCP-server registration.

func (*MCP) List

func (r *MCP) List(ctx context.Context) ([]Result, error)

List returns all MCP servers registered for the tenant.

func (*MCP) Refresh

func (r *MCP) Refresh(ctx context.Context, id string) (Result, error)

Refresh re-probes the server (HEAD on HTTP/SSE/WS, 3-second timeout) and returns the row with an updated `status` field.

type Models

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

Models is the agentcontrol Models sub-resource — what the UI's "Upload Custom" + "Soft-Delete All" buttons hit.

func (*Models) Create

func (r *Models) Create(ctx context.Context, spec map[string]interface{}) (Result, error)

Create uploads a custom model row. spec must include at least name.

func (*Models) Delete

func (r *Models) Delete(ctx context.Context, id string) (Result, error)

Delete soft-deletes one model row (audit row stays).

func (*Models) DeleteAll

func (r *Models) DeleteAll(ctx context.Context) (Result, error)

DeleteAll soft-deletes every model row for the tenant.

func (*Models) ExportTrainingData

func (r *Models) ExportTrainingData(ctx context.Context, id string) (Result, error)

ExportTrainingData exports the model's training-data bundle.

func (*Models) Get

func (r *Models) Get(ctx context.Context, id string) (Result, error)

Get returns one model record.

func (*Models) List

func (r *Models) List(ctx context.Context, state string) ([]Result, error)

List returns all models. state, if non-empty, filters server-side (UI uses values like "running", "stopped").

func (*Models) SetState

func (r *Models) SetState(ctx context.Context, id, state string) (Result, error)

SetState changes a model's state ("running", "stopped", etc.). PATCH.

type ProvisionInput

type ProvisionInput struct {
	CloudProvider string // e.g. "aws", "vxcloud"
	Region        string
	InstanceType  string
	OS            string
	InstanceName  string
}

ProvisionInput describes a deploy-target provisioning request.

type ProxyExecuteInput

type ProxyExecuteInput struct {
	Endpoint    string // required — the agent's HTTP base URL
	Message     string // required
	SessionID   string // optional
	Path        string // optional — append to endpoint (e.g. "/chat")
	PayloadMode string // optional — "auto"|"message"|"prompt"|"query"|"input"|"common"
}

ProxyExecuteInput describes a node-mediated execute call against a marketplace agent running on the tenant VM. The UI uses this for mixed- content reasons (HTTPS browser cannot directly call HTTP endpoints).

type Result

type Result = map[string]interface{}

Result is a decoded JSON object response.

type RunOptions

type RunOptions struct {
	Filename    string            // optional
	Language    string            // "python"|"py"|"bash"|"sh"|"shell" (required)
	Content     string            // source body (required)
	Env         map[string]string // optional env vars
	TimeoutSecs int               // optional, 0 = server default
	Args        []string          // optional argv after the script
}

RunOptions describes a Code.Run request.

type Tools

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

Tools is the tools & actions sub-resource.

func (*Tools) Create

func (r *Tools) Create(ctx context.Context, spec map[string]interface{}) (Result, error)

Create adds a tool. spec must include at least name.

func (*Tools) Delete

func (r *Tools) Delete(ctx context.Context, id string) (Result, error)

Delete removes a tool.

func (*Tools) List

func (r *Tools) List(ctx context.Context) ([]Result, error)

List returns all tools for the tenant.

func (*Tools) Update

func (r *Tools) Update(ctx context.Context, id string, patch map[string]interface{}) (Result, error)

Update patches a tool (toggle enabled, rename, etc.). PATCH semantics.

type Training

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

Training is the model-training-jobs sub-resource.

func (*Training) Chat

func (r *Training) Chat(ctx context.Context, jobID string, in TrainingChatRequest) (Result, error)

Chat opens a chat session against the trained model.

func (*Training) Clone

func (r *Training) Clone(ctx context.Context, jobID string) (Result, error)

Clone duplicates a training job for a fresh run.

func (*Training) Create

func (r *Training) Create(ctx context.Context, spec map[string]interface{}) (Result, error)

Create starts a training job. spec must include at least name, base_model and dataset_id.

func (*Training) Delete

func (r *Training) Delete(ctx context.Context, jobID string) (Result, error)

Delete removes one training job.

func (*Training) DeleteAll

func (r *Training) DeleteAll(ctx context.Context, typeFilter string) (Result, error)

DeleteAll removes every training job for the tenant. typeFilter, if non-empty, scopes to that type (e.g. "pipeline" to mirror the UI's Pipelines-tab "Delete All").

func (*Training) Export

func (r *Training) Export(ctx context.Context, jobID string) (Result, error)

Export bundles the trained model + manifest for download.

func (*Training) Get

func (r *Training) Get(ctx context.Context, jobID string) (Result, error)

Get returns one training job.

func (*Training) List

func (r *Training) List(ctx context.Context) ([]Result, error)

List returns all training jobs for the tenant.

func (*Training) Logs

func (r *Training) Logs(ctx context.Context, jobID string) (Result, error)

Logs returns the most recent log lines for a training job.

func (*Training) Metrics

func (r *Training) Metrics(ctx context.Context, jobID string) (Result, error)

Metrics returns epoch-by-epoch loss/accuracy for a training job.

func (*Training) Restart

func (r *Training) Restart(ctx context.Context, jobID string) (Result, error)

Restart re-runs a training job from scratch.

func (*Training) RunQA

func (r *Training) RunQA(ctx context.Context, jobID string) (Result, error)

RunQA runs the LLM-graded QA suite against the training job.

func (*Training) RunTests

func (r *Training) RunTests(ctx context.Context, jobID string) (Result, error)

RunTests runs the test suite against the training job's produced model.

func (*Training) Update

func (r *Training) Update(ctx context.Context, jobID string, patch map[string]interface{}) (Result, error)

Update patches a training job's mutable fields (status, accuracy, etc.).

func (*Training) Wait

func (r *Training) Wait(ctx context.Context, jobID string, opts WaitOptions) (Result, error)

Wait polls a training job until its status is terminal.

type TrainingChatRequest

type TrainingChatRequest struct {
	Message   string // required
	SessionID string // optional
	ModelID   string // optional, picks which trained model to chat with
}

ChatRequest is the body of a Training.Chat call.

type UploadOptions

type UploadOptions struct {
	Name   string // dataset name (required)
	Type   string // dataset type; default "training"
	Format string // file format; default "csv"
}

UploadOptions describes a dataset upload.

type WaitOptions

type WaitOptions struct {
	Timeout  time.Duration // default 30m
	Interval time.Duration // default 5s
	// OnTick, if set, is called with the latest job Result after each poll.
	OnTick func(Result)
}

WaitOptions tunes the job poller. Zero values fall back to the defaults.

type WebAssets

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

WebAssets is the Web-Assets sub-resource.

func (*WebAssets) Create

func (r *WebAssets) Create(ctx context.Context, spec map[string]interface{}) (Result, error)

Create adds a web asset. spec must include at least name.

func (*WebAssets) Delete

func (r *WebAssets) Delete(ctx context.Context, id string) (Result, error)

Delete removes a web asset.

func (*WebAssets) List

func (r *WebAssets) List(ctx context.Context) ([]Result, error)

List returns all web-asset rows.

type Workflows

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

Workflows is the agentcontrol workflow-shim sub-resource. The full workflow surface (definitions, executions, etc.) lives on the workflow service, not on agentcontrol — this just exposes the two routes the UI hits to list and trigger from inside the agentcontrol context.

func (*Workflows) List

func (r *Workflows) List(ctx context.Context) (Result, error)

List returns the workflows visible to the tenant via the agentcontrol shim.

func (*Workflows) Trigger

func (r *Workflows) Trigger(ctx context.Context, workflowID string, input interface{}) (Result, error)

Trigger fires a workflow by id with optional input.

Jump to

Keyboard shortcuts

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