Task (schema/agent_jobs.go)

LocalAI · core/schema/agent_jobs.go · go · MIT
auth

Defines task, job, and webhook schemas for scheduled agent jobs.

// Source: https://github.com/mudler/LocalAI | License: MIT | Copyright 2023-2025 Ettore Di Giacinto (mudler@localai.io)
// Provided via justclaw.it.com; keep this notice with the code.
package schema

import (
	"time"
)

// Task represents a reusable agent task definition
type Task struct {
	ID             string            `json:"id"`          // UUID
	Name           string            `json:"name"`        // User-friendly name
	Description    string            `json:"description"` // Optional description
	Model          string            `json:"model"`       // Model name (must have MCP config)
	Prompt         string            `json:"prompt"`      // Template prompt (supports Go template .param syntax)
	CreatedAt      time.Time         `json:"created_at"`
	UpdatedAt      time.Time      

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key