agent

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2026 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package agent composes tool registrations and seals them into the same execution catalog used for model discovery and dispatch.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithToolInvocation

func WithToolInvocation(ctx context.Context, invocation ToolInvocation) (context.Context, error)

Types

type Admission

type Admission struct {
	CatalogVersion string
	Policy         policy.Snapshot
	Ledger         execution.AttemptLedger
	Approver       execution.Approver
	Approvals      execution.ApprovalStore
}

type AdmittedAgent

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

func (*AdmittedAgent) AgentType

func (a *AdmittedAgent) AgentType() string

func (*AdmittedAgent) ExecuteTool

func (a *AdmittedAgent) ExecuteTool(ctx context.Context, name, arguments string) (string, error)

func (*AdmittedAgent) HasTool

func (a *AdmittedAgent) HasTool(name string) bool

func (*AdmittedAgent) ToolCount

func (a *AdmittedAgent) ToolCount() int

func (*AdmittedAgent) ToolNames

func (a *AdmittedAgent) ToolNames() []string

type BaseAgent

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

BaseAgent is a registration builder. It deliberately cannot execute tools; Seal produces an AdmittedAgent pinned to policy and catalog snapshots.

func NewBase

func NewBase(agentType string) BaseAgent

func (*BaseAgent) AgentType

func (a *BaseAgent) AgentType() string

func (*BaseAgent) CatalogSnapshot

func (a *BaseAgent) CatalogSnapshot(version string) (execution.CatalogSnapshot, error)

func (*BaseAgent) HasTool

func (a *BaseAgent) HasTool(name string) bool

func (*BaseAgent) Register

func (a *BaseAgent) Register(spec execution.ToolSpec) error

func (*BaseAgent) Seal

func (a *BaseAgent) Seal(admission Admission) (*AdmittedAgent, error)

func (*BaseAgent) ToolCount

func (a *BaseAgent) ToolCount() int

func (*BaseAgent) ToolNames

func (a *BaseAgent) ToolNames() []string

type ToolAgent

type ToolAgent interface {
	ExecuteTool(context.Context, string, string) (string, error)
	ToolNames() []string
	HasTool(string) bool
	ToolCount() int
	AgentType() string
}

type ToolInvocation

type ToolInvocation struct {
	AttemptID      string
	RequestID      string
	Resource       string
	IdempotencyKey string
	SourceEventIDs []string
}

Jump to

Keyboard shortcuts

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