core

package
v0.22.0 Latest Latest
Warning

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

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

README

Go core engine

The reference engine implements Phase 2. The Phase 3 CLI uses this engine; the MCP adapter implements Phase 5 and the A2A adapter implements Phase 6 for A2A 1.0 JSON-RPC with explicit 0.3.0 compatibility. The agent/multi-agent adapter implements Phase 7. The gateway adapter implements Phase 8 read-only HTTP health signals. The router adapter implements Phase 9 read-only HTTP signals. Phase 10 extends this baseline with explicit dependency graphs. Phase 17 adds model/LLM checks, and Phase 18 adds native database checks. Phase 19 adds Qdrant/Pinecone vector-store checks. Other adapters remain later roadmap work.

Run it

The HTTP/API adapter provides passive HEAD-based connectivity, authentication, status and response-header checks, transport-stage diagnostics, and explicit opt-in GET body matching. Default status expectations are 2xx. TLS is verified and redirects are not followed.

Start a local service with a /health endpoint and run:

go run ./examples/core-check examples/core-check/agenthealth.yaml

The example emits JSON; it is an API demonstration, not the Phase 3 CLI or an automation exit-code implementation.

API

LoadConfigFile loads strict YAML; Config.Validate validates configurations built in Go. NewRegistry().Register(adapter) checks metadata compatibility and duplicate target types. NewEngine(registry).Run(ctx, config) returns results in declaration order. Unknown target adapters yield MISCONFIGURED when checks are requested. Explicit checks: [] produces UNKNOWN with no adapter calls; dependencies still run.

Configuration and Reachability gate downstream work. Authentication gates Capability and Functional, while Protocol and Latency remain independent of authentication success. Passing implicit gates are hidden; failed gates appear as evidence and blocked checks are omitted. Latency measures the final successful Reachability attempt, excluding local adapter-slot queue time; threshold violations yield DEGRADED.

MCP shares initialization, inventories and a process/session across dimensions within one target; A2A shares its card and passive RPC evidence. State is shared only by references to one explicit graph node ID within a run; it is never shared across distinct nodes or runs. The optional TargetCloser receives a bounded cleanup context; target resource cancellation and cleanup also run on failure.

Each nested dependency runs independently, even after the parent fails. Critical defaults to true; optional failures contribute DEGRADED. Dependencies do not inherit checks, thresholds, credentials, or policies. Dependency summary checks are optional diagnostics, separate from aggregation. Aggregate also accepts already-evaluated dependency results for external consumers.

WriteJSON and WriteYAML emit a single result or ordered batch with the same wire fields. WriteHuman displays the same result tree and latency with deterministic check ordering and terminal control characters removed. Both validate result shapes and mask recognizable URLs and credential assignments. Output rejects dependency trees deeper than 64 levels, including cyclic caller-built result slices, before writing any bytes. Results initialize Checks and Dependencies to empty collections, not nil.

Policies and safety

See execution policies for the draft fields, defaults, and bounds. Per-attempt deadlines default to five seconds, retries to zero, and the whole-run budget to 60 seconds (a shorter caller deadline takes precedence). Passive no-response connectivity failures may retry at most three additional times. Active checks and partial responses never retry. Retry delays and pool acquisition honor cancellation.

Credentials resolve from environment references once per run. MCP OAuth credentials are acquired noninteractively and cached within the target run; dynamically acquired access/refresh tokens participate in redaction. Configured stdio processes receive only selected runtime variables and explicit environment references. Missing/empty credentials fail Configuration before network requests. Raw adapter errors, messages, and panic values never reach results or engine logs: the engine uses canonical diagnostics and allowlisted transport stages and emits no internal logs. Resolved credentials are redacted recursively from identities and results; callers can safely log engine results through the formatters. Redactor is available for other structured logging paths. Arbitrary manually constructed results must supply known secret values to a Redactor before output; generic patterns cannot identify every possible secret.

Adapters declare active dimensions; none execute by default. Functional must be active and explicitly requested. Trusted adapters must keep probes non-destructive and avoid their own unsafe logging. Canonical adapter diagnostics expose an optional stable code in JSON/YAML; unknown adapter codes are suppressed. The supplied HTTP client verifies TLS without an insecure option and stops redirects to prevent credential forwarding. Per-attempt context/client deadlines govern TLS handshakes and response headers without a separate fixed transport cap. Invalid HTTP header control bytes in credentials fail Configuration before networking.

Calls are limited to 16 in flight per engine and the configured concurrency (default 16) per run. Panics and invalid adapter states normalize to UNKNOWN. Request.MarkResponse records partial responses even when the caller's deadline wins a race with adapter completion. Adapters must honor contexts: in-process Go code cannot be forcibly terminated, so an uncooperative call occupies a bounded pool slot until it returns. See the adapter interface contract.

Validation

go test -race ./...
go vet ./...
python3 -m pytest tests -q
python3 scripts/check_markdown_links.py
python3 scripts/validate_doc_examples.py

Tests cover A2A cards, MIME modes, passive task lookups, bearer credentials, required skills/capabilities, functional task outcomes, random-source failures, origin/redirect safety, and configuration fixtures, prerequisite gates, independent dependencies, timeout/partial-response classification, bounded retries and calls, active controls, panic recovery, secret suppression, TLS verification, redirect safety, HTTP authentication, and JSON envelopes. A Python integration test validates real example output against the result schema. CI runs all these checks.

Phase 8 Agentgateway integration is implemented in source. See the gateway guide. Gateway checks use explicitly configured read-only HTTP signals and separate backend/path dependencies.

Phase 9 Agent Router HTTP integration is released in v0.7.0. See the router guide. Named router signals, direct backends and configured paths retain separate evidence.

Phase 10 dependency graph

See the explicit graph contract for shared node IDs, relationship evidence, independent edge policies, validation and bounded execution. Existing nested configurations and health semantics remain valid.

Cleanup hooks remain serialized across nodes, runs and engines sharing a registry. Waiting for the serialization gate honors the cleanup deadline; an uncooperative hook holds the gate and its adapter-call slots until it actually returns.

Experimental AHP serving

agenthealth serve <configuration.yaml> exposes snapshot health over HTTP. See the AHP guide for authorization, freshness and deployment.

Kubernetes deployment

Phase 14 integration consumes the existing engine and AHP server. Check budgets must fit exec-probe and Job deadlines. HTTP liveness uses /live independently of dependency readiness; snapshot freshness and aggregation stay unchanged. See the alignment audit for regression coverage and deployment validation limits.

Trust boundary

See the threat model for trusted configuration, credential handling, network access, output limits and in-process adapter isolation. A shared process is not a boundary for mutually untrusted tenants.

The Python SDK wraps CLI execution; Go remains responsible for health semantics and adapter safety.

The JavaScript / TypeScript SDK also wraps the exact-version CLI and preserves the existing configuration, result and health exit-code contracts. Its bundled schemas are parity-tested against the specification.

Phase 17 implements model/LLM health for OpenAI-compatible and Anthropic APIs. Passive model listings and explicit minimal inference preserve existing health semantics. See the Phase 17 alignment audit for cross-phase impacts.

Phase 18 adds native database health for PostgreSQL, MySQL, Redis and MongoDB. Fixed SQL queries require explicit functional opt-in. See the alignment audit and disposable examples.

Phase 19 implements Qdrant and Pinecone vector-store checks with explicit read-only query opt-in. See the phase alignment audit.

Phase 20 runtime integrations reuse the existing agent contract and SDK engine execution without new target types.

CI report consumers

WriteJUnit and WriteGitHub validate existing results and emit positional status evidence without names, endpoints or messages. They preserve dependency occurrences; execution and aggregation are unchanged. See CI/CD.

Observability export (Phase 22)

Released in v0.20.0: --format prometheus|logs|otlp|webhook produces redacted snapshots. See the export guide and cross-phase alignment. Delivery is explicit and external; SDK JSON, AHP, health codes and adapter checks remain unchanged.

Executable adapter ecosystem (Phase 23)

Released in v0.21.0: explicit local manifests and SHA-256-pinned executable adapters with bounded JSON transport, cancellation and normalized engine output. See the guide and all-phase alignment. Processes retain the invoking user’s OS permissions; no sandbox or certification is implied. Built-in adapters and AHS/AHP v1 contracts remain compatible.

Conformance (Phase 24)

Implemented in source: offline result validation and reference behavioral conformance. agenthealth conformance test <result.json> validates bounded local v1 JSON evidence without executing checks. It returns 0 for conformant evidence and 6 otherwise; health command exits are unchanged. Run python3 scripts/test_conformance.py --report conformance-report.json from the source root for mandatory behavioral evidence. Neither profile establishes certification or product interoperability.

Documentation

Overview

Package core implements the shared Agent Health Specification model.

Index

Constants

View Source
const ConformanceMaxBytes = 4 << 20

ConformanceMaxBytes bounds an offline evidence document before decoding.

View Source
const DefaultRetryDelay = 100 * time.Millisecond
View Source
const DefaultTimeout = 5 * time.Second

Variables

This section is empty.

Functions

func NewHTTPClient

func NewHTTPClient() *http.Client

NewHTTPClient creates an isolated TLS-verifying transport. Redirects are not followed, preventing probes or credentials from moving to another endpoint.

func SupportedMCPVersion added in v0.2.0

func SupportedMCPVersion(v string) bool

func SupportedModelAPI added in v0.15.0

func SupportedModelAPI(api string) bool

SupportedModelAPI reports whether api names an implemented inference dialect.

func ValidVectorStore added in v0.17.0

func ValidVectorStore(t Target) bool

ValidVectorStore validates endpoint and vector options for both config and adapter callers.

func ValidateResult

func ValidateResult(r Result) error

ValidateResult verifies the wire shape before emitting it. Adapters remain responsible for redacting messages before handing them to the output layer.

func WriteGitHub added in v0.19.0

func WriteGitHub(w io.Writer, results []Result) error

WriteGitHub emits safe GitHub workflow annotations. Names and diagnostic text are omitted because they can contain secrets or workflow command syntax.

func WriteHuman

func WriteHuman(w io.Writer, results []Result) error

WriteHuman presents the same result tree without terminal control characters.

func WriteJSON

func WriteJSON(w io.Writer, results []Result) error

WriteJSON emits a single result document or an ordered batch envelope.

func WriteJUnit added in v0.19.0

func WriteJUnit(w io.Writer, results []Result) error

WriteJUnit emits one case per target/dependency occurrence. Every non-HEALTHY status fails the case; no inconclusive health result is treated as skipped.

func WriteObservability added in v0.20.0

func WriteObservability(w io.Writer, results []Result, format string) error

WriteObservability emits a finite snapshot, never sends network requests and buffers validation/encoding before touching the destination. OTLP is an OTLP/HTTP JSON ExportLogsServiceRequest; webhook is a versioned JSON payload.

func WriteYAML

func WriteYAML(w io.Writer, results []Result) error

WriteYAML emits the same sanitized wire document as WriteJSON.

Types

type A2AInteraction added in v0.3.0

type A2AInteraction struct {
	Safe bool   `yaml:"safe"`
	Text string `yaml:"text"`
}

type A2AOptions added in v0.3.0

type A2AOptions struct {
	CardURL              string          `yaml:"card_url"`
	ProtocolVersion      string          `yaml:"protocol_version"`
	RequiredSkills       []string        `yaml:"required_skills"`
	RequiredCapabilities []string        `yaml:"required_capabilities"`
	Functional           *A2AInteraction `yaml:"functional"`
}

A2AOptions describes passive expectations and an explicitly safe interaction.

type AHPOptions added in v0.9.0

type AHPOptions struct {
	Token    string
	Interval time.Duration
	MaxAge   time.Duration
}

AHPOptions controls the experimental v1 HTTP binding. Token grants access to topology and evidence; it must be resolved by the caller from a secret reference.

type AHPServer added in v0.9.0

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

AHPServer runs checks independently of requests and serves immutable snapshots. Construct one server per configuration; Run must remain active while serving.

func NewAHPServer added in v0.9.0

func NewAHPServer(engine *Engine, config Config, options AHPOptions) (*AHPServer, error)

func (*AHPServer) Run added in v0.9.0

func (s *AHPServer) Run(ctx context.Context)

Run refreshes serially, without overlapping runs or request-triggered probes.

func (*AHPServer) ServeHTTP added in v0.9.0

func (s *AHPServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Adapter

type Adapter interface {
	Metadata() Metadata
	Check(context.Context, Request, string) (Observation, error)
}

Adapter implementations must honor context cancellation and use the supplied HTTP client for HTTP requests. The engine trusts compiled-in adapter code; arbitrary code cannot be sandboxed or forcibly stopped in-process.

type AgentOptions added in v0.5.0

type AgentOptions struct {
	RequiredCapabilities []string   `yaml:"required_capabilities"`
	Functional           *AgentTask `yaml:"functional"`
}

AgentOptions configures the bounded agent health interface.

type AgentTask added in v0.5.0

type AgentTask struct {
	Safe       bool   `yaml:"safe" json:"safe"`
	Text       string `yaml:"text" json:"text"`
	Downstream string `yaml:"downstream" json:"downstream,omitempty"`
}

type AuthReference

type AuthReference struct {
	BearerEnv string `yaml:"bearer_env"`
}

AuthReference resolves a credential from the environment; never a literal secret.

type CheckResult

type CheckResult struct {
	Code    string            `json:"code,omitempty"`
	Status  Status            `json:"status"`
	Message string            `json:"message,omitempty"`
	Steps   map[string]Status `json:"steps,omitempty"`
}

func NormalizeError

func NormalizeError(err error, responseReceived bool) CheckResult

NormalizeError never incorporates raw errors (which may contain credentials).

type Config

type Config struct {
	Concurrency int      `yaml:"concurrency"`
	Version     string   `yaml:"version"`
	Targets     []Target `yaml:"targets"`
}

func LoadConfig

func LoadConfig(r io.Reader) (Config, error)

LoadConfig accepts exactly one YAML document and rejects unknown fields. Parser details are deliberately suppressed because they may contain secrets.

func LoadConfigFile

func LoadConfigFile(path string) (Config, error)

func (Config) Validate

func (c Config) Validate() error

type ConformanceReport added in v0.22.0

type ConformanceReport struct {
	Version string `json:"conformance_version"`
	Profile string `json:"profile"`
	Passed  bool   `json:"passed"`
	Results int    `json:"results"`
	Code    string `json:"code"`
}

ConformanceReport describes evidence validation, not certification or health. It deliberately contains no input identities, messages, or parser errors.

func TestConformance added in v0.22.0

func TestConformance(reader io.Reader) (ConformanceReport, error)

TestConformance validates one JSON v1 result or batch without executing it. Unknown extension fields are tolerated, as in the v1 result schema.

type DatabaseOptions added in v0.16.0

type DatabaseOptions struct {
	Username    string `yaml:"username"`
	PasswordEnv string `yaml:"password_env"`
	TLS         string `yaml:"tls"`
}

DatabaseOptions permits fixed read-only probes, never caller-supplied queries.

type Dependency

type Dependency struct {
	Target       `yaml:",inline"`
	Ref          string `yaml:"ref"`
	Relationship string `yaml:"relationship"`
	Critical     *bool  `yaml:"critical"`
}

func (Dependency) IsCritical

func (d Dependency) IsCritical() bool

type Engine

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

Engine executes targets in declaration order with a bounded adapter-call pool. Construct it with NewEngine; share it across concurrent runs if needed.

func NewEngine

func NewEngine(registry *Registry) *Engine

func (*Engine) Run

func (e *Engine) Run(ctx context.Context, config Config) ([]Result, error)

Run applies a 60-second whole-run safety budget in addition to per-check deadlines. A shorter caller deadline takes precedence. Dependencies execute independently even when a parent's prerequisites fail.

type ExportObservation added in v0.20.0

type ExportObservation struct {
	Kind         string   `json:"kind"`
	Node         string   `json:"node"`
	Parent       string   `json:"parent,omitempty"`
	Edge         string   `json:"edge,omitempty"`
	Type         string   `json:"type"`
	Status       Status   `json:"status"`
	Dimension    string   `json:"dimension,omitempty"`
	LatencyMS    *float64 `json:"latency_ms,omitempty"`
	Relationship string   `json:"relationship,omitempty"`
	Critical     *bool    `json:"critical,omitempty"`
}

ExportObservation is a deliberately reduced view: source names, IDs, diagnostic messages, step names and endpoints never cross the export boundary. Aliases are local to one snapshot, not durable identities or anonymization.

type Failure

type Failure struct{ Status Status }

Failure carries a normalized health classification, never a raw diagnostic.

func (*Failure) Error

func (e *Failure) Error() string

type HTTPOptions

type HTTPOptions struct {
	Method         string            `yaml:"method"`
	ExpectedStatus []int             `yaml:"expected_status"`
	Headers        map[string]string `yaml:"headers"`
	BodyContains   string            `yaml:"body_contains"`
	MaxBodyBytes   *int              `yaml:"max_body_bytes"`
}

HTTPOptions specifies passive method and response expectations, never credentials.

type MCPInvocation added in v0.2.0

type MCPInvocation struct {
	Tool          string `yaml:"tool"`
	Safe          bool   `yaml:"safe"`
	ArgumentsJSON string `yaml:"arguments_json"`
}

type MCPOAuth added in v0.2.0

type MCPOAuth struct {
	Issuer          string   `yaml:"issuer"`
	ClientID        string   `yaml:"client_id"`
	Grant           string   `yaml:"grant"`
	ClientSecretEnv string   `yaml:"client_secret_env"`
	RefreshTokenEnv string   `yaml:"refresh_token_env"`
	TokenFile       string   `yaml:"token_file"`
	Scopes          []string `yaml:"scopes"`
	RedirectPort    *int     `yaml:"redirect_port"`
}

MCPOAuth uses a pinned issuer and environment/file references, never secrets.

type MCPOptions added in v0.2.0

type MCPOptions struct {
	Transport         string         `yaml:"transport"`
	Stdio             *MCPStdio      `yaml:"stdio"`
	OAuth             *MCPOAuth      `yaml:"oauth"`
	ProtocolVersion   string         `yaml:"protocol_version"`
	RequiredTools     []string       `yaml:"required_tools"`
	RequiredResources []string       `yaml:"required_resources"`
	RequiredPrompts   []string       `yaml:"required_prompts"`
	Functional        *MCPInvocation `yaml:"functional"`
}

MCPOptions configures Streamable HTTP discovery and an explicitly safe probe.

type MCPStdio added in v0.2.0

type MCPStdio struct {
	Command   string            `yaml:"command"`
	Args      []string          `yaml:"args"`
	Directory string            `yaml:"directory"`
	Env       map[string]string `yaml:"env"`
}

type Metadata

type Metadata struct {
	Name                 string   `json:"name"`
	Version              string   `json:"version"`
	CompatibilityVersion string   `json:"compatibility_version"`
	TargetTypes          []string `json:"target_types"`
	Dimensions           []string `json:"dimensions"`
	ActiveChecks         []string `json:"active_checks"`
}

Metadata declares compatibility, implemented dimensions, and active checks. All active checks must remain non-destructive, even when opted in.

type ModelInference added in v0.15.0

type ModelInference struct {
	Safe            bool   `yaml:"safe"`
	Model           string `yaml:"model"`
	Prompt          string `yaml:"prompt"`
	MaxOutputTokens *int   `yaml:"max_output_tokens"`
	// TokenParameter names the OpenAI-compatible output limit field.
	TokenParameter string `yaml:"token_parameter"`
}

type ModelOptions added in v0.15.0

type ModelOptions struct {
	API            string          `yaml:"api"`
	RequiredModels []string        `yaml:"required_models"`
	Functional     *ModelInference `yaml:"functional"`
}

ModelOptions selects the inference API dialect, passive model expectations, and an explicitly safe, token-bounded minimal inference.

type Observation

type Observation struct {
	Check            CheckResult
	ResponseReceived bool
	// Code selects an engine-owned diagnostic; arbitrary adapter text is suppressed.
	Code string
}

Observation records whether a response was received, distinguishing partial responses before a timeout from failures to establish communication.

type Redactor

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

Redactor masks resolved credentials, URL addresses (including userinfo and query strings), and recognizable authentication assignments.

func NewRedactor

func NewRedactor(secrets ...string) *Redactor

func (*Redactor) Redact

func (r *Redactor) Redact(s string) string

func (*Redactor) Remember added in v0.2.0

func (r *Redactor) Remember(secret string)

Remember safely registers credentials obtained while a run is in progress.

func (*Redactor) Result

func (r *Redactor) Result(value Result) Result

type Registry

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

Registry supports concurrent lookup and registration; duplicate types fail atomically rather than silently replacing an adapter.

func NewRegistry

func NewRegistry() *Registry

func (*Registry) Register

func (r *Registry) Register(a Adapter) error

type Request

type Request struct {
	// TargetContext bounds resources shared across dimensions; Check must still honor its attempt context.
	TargetContext context.Context
	// MarkResponse must be called as soon as any response arrives, before reading its body.
	MarkResponse func()
	// RecordStep records only allowlisted transport stages and health states.
	RecordStep func(string, Status)
	// Environment is a per-target snapshot of configured environment references.
	Environment map[string]string
	// RunState belongs to one target execution; adapters may cache acquired credentials.
	RunState *sync.Map
	// RememberSecret registers dynamically acquired credentials for output redaction.
	RememberSecret func(string)
	Target         Target
	Credential     string
	Client         *http.Client
}

Request contains per-target state. Credentials must never be logged. Client verifies TLS, restricts redirects, and follows the check context.

type Result

type Result struct {
	Relationship string                 `json:"relationship,omitempty"`
	Critical     *bool                  `json:"critical,omitempty"`
	Target       TargetIdentity         `json:"target"`
	Status       Status                 `json:"status"`
	LatencyMS    *float64               `json:"latency_ms"`
	Checks       map[string]CheckResult `json:"checks"`
	Dependencies []Result               `json:"dependencies"`
}

type Status

type Status string

Status is ordered by the specification's severity, not by reachability.

const (
	Healthy       Status = "HEALTHY"
	Degraded      Status = "DEGRADED"
	Unhealthy     Status = "UNHEALTHY"
	Unreachable   Status = "UNREACHABLE"
	Misconfigured Status = "MISCONFIGURED"
	Unknown       Status = "UNKNOWN"
)

func Aggregate

func Aggregate(checks map[string]CheckResult, dependencies []Result, critical []bool) Status

Aggregate excludes the dependency diagnostic from own health; dependencies contribute independently even when the diagnostic was not requested.

func DependencyContribution

func DependencyContribution(s Status, critical bool) Status

DependencyContribution maps dependency health onto the parent's ability to work.

func Worst

func Worst(values ...Status) Status

Worst returns UNKNOWN when there is no evidence or an invalid status.

func (Status) Valid

func (s Status) Valid() bool

type Target

type Target struct {
	VectorStore   *VectorStoreOptions `yaml:"vector_store"`
	Database      *DatabaseOptions    `yaml:"database"`
	Agent         *AgentOptions       `yaml:"agent"`
	ID            string              `yaml:"id"`
	BudgetMS      *int                `yaml:"budget_ms"`
	Name          string              `yaml:"name"`
	Type          string              `yaml:"type"`
	Endpoint      string              `yaml:"endpoint"`
	Checks        []string            `yaml:"checks"`
	Thresholds    *Thresholds         `yaml:"thresholds"`
	Dependencies  []Dependency        `yaml:"dependencies"`
	TimeoutMS     *int                `yaml:"timeout_ms"`
	Retries       *int                `yaml:"retries"`
	RetryDelayMS  *int                `yaml:"retry_delay_ms"`
	CheckTimeouts map[string]int      `yaml:"check_timeouts_ms"`
	Auth          *AuthReference      `yaml:"auth"`
	HTTP          *HTTPOptions        `yaml:"http"`
	MCP           *MCPOptions         `yaml:"mcp"`
	A2A           *A2AOptions         `yaml:"a2a"`
	Model         *ModelOptions       `yaml:"model"`
}

func (Target) CredentialReferences added in v0.2.0

func (t Target) CredentialReferences() []string

CredentialReferences lists only references used by this target.

type TargetCloser added in v0.4.0

type TargetCloser interface {
	CloseTarget(context.Context, *sync.Map)
}

TargetCloser optionally releases per-target resources after all dimensions. It must honor the bounded cleanup context and is not called concurrently with another CloseTarget.

type TargetIdentity

type TargetIdentity struct {
	ID   string `json:"id,omitempty"`
	Name string `json:"name"`
	Type string `json:"type"`
}

type Thresholds

type Thresholds struct {
	LatencyMS *float64 `yaml:"latency_ms"`
}

type VectorQuery added in v0.17.0

type VectorQuery struct {
	Safe   bool      `yaml:"safe"`
	Vector []float64 `yaml:"vector"`
}

type VectorStoreOptions added in v0.17.0

type VectorStoreOptions struct {
	Provider   string       `yaml:"provider"`
	Collection string       `yaml:"collection"`
	Namespace  string       `yaml:"namespace"`
	Functional *VectorQuery `yaml:"functional"`
}

VectorStoreOptions selects read-only metadata and an optional bounded query.

Jump to

Keyboard shortcuts

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