application

package
v0.183.2 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package application holds agent-context orchestration contracts that touch external A2A (adk) types; they are deliberately outside the pure domain.

Index

Constants

View Source
const (
	// AgentContainerPrefix is the naming prefix for agent containers
	AgentContainerPrefix = "inference-agent-"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type A2AAgentService

type A2AAgentService interface {
	GetAgentCards(ctx context.Context) ([]*CachedAgentCard, error)
	GetConfiguredAgents() []string
}

A2AAgentService manages A2A agent operations

type A2AAgentServiceImpl added in v0.178.1

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

func NewA2AAgentService added in v0.178.1

func NewA2AAgentService(cfg *config.Config) *A2AAgentServiceImpl

func (*A2AAgentServiceImpl) GetAgentCard added in v0.178.1

func (s *A2AAgentServiceImpl) GetAgentCard(ctx context.Context, agentURL string) (*adk.AgentCard, error)

func (*A2AAgentServiceImpl) GetAgentCards added in v0.178.1

func (s *A2AAgentServiceImpl) GetAgentCards(ctx context.Context) ([]*CachedAgentCard, error)

func (*A2AAgentServiceImpl) GetConfiguredAgents added in v0.178.1

func (s *A2AAgentServiceImpl) GetConfiguredAgents() []string

type AgentManager added in v0.178.1

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

AgentManager manages the lifecycle of A2A agent containers (local and external)

func NewAgentManager added in v0.178.1

func NewAgentManager(sessionID convdomain.SessionID, cfg *config.Config, agentsConfig *config.AgentsConfig, runtime containerruntime.ContainerRuntime, a2aService A2AAgentService) *AgentManager

NewAgentManager creates a new agent manager

func (*AgentManager) IsRunning added in v0.178.1

func (am *AgentManager) IsRunning() bool

IsRunning returns whether any agents are running

func (*AgentManager) SetPullProgressCallback added in v0.178.1

func (am *AgentManager) SetPullProgressCallback(callback func(agentName string, done, total int))

SetPullProgressCallback sets the callback function for image pull progress updates

func (*AgentManager) SetStatusCallback added in v0.178.1

func (am *AgentManager) SetStatusCallback(callback func(agentName string, state agentdomain.AgentState, message string, url string, image string))

SetStatusCallback sets the callback function for agent status updates

func (*AgentManager) StartAgent added in v0.178.1

func (am *AgentManager) StartAgent(ctx context.Context, agent config.AgentEntry) error

StartAgent starts a single agent container with status updates

func (*AgentManager) StartAgents added in v0.178.1

func (am *AgentManager) StartAgents(ctx context.Context) error

StartAgents starts all local agents (run: true) and monitors external agents

func (*AgentManager) StopAgent added in v0.178.1

func (am *AgentManager) StopAgent(ctx context.Context, agentName string) error

StopAgent stops a single agent container

func (*AgentManager) StopAgents added in v0.178.1

func (am *AgentManager) StopAgents(ctx context.Context) error

StopAgents stops all running agent containers, cancels liveness probes, and cleans up the network

func (*AgentManager) WaitForAgentsReady added in v0.178.1

func (am *AgentManager) WaitForAgentsReady(ctx context.Context)

WaitForAgentsReady blocks until every run:true agent started by StartAgents has settled (ready or failed), or ctx is done. Headless mode calls this before the first LLM turn so the model never races an agent whose 3GB image is still pulling; failed agents settle too, so a broken agent can't block forever. Chat mode never calls it (the TUI streams status instead).

type CachedAgentCard

type CachedAgentCard struct {
	Card      *adk.AgentCard `json:"card"`
	URL       string         `json:"url"`
	FetchedAt time.Time      `json:"fetched_at"`
}

CachedAgentCard represents a cached agent card with metadata

Directories

Path Synopsis
Package agentrunner centralizes spawning `infer headless` as a subprocess and streaming its stdout.
Package agentrunner centralizes spawning `infer headless` as a subprocess and streaming its stdout.

Jump to

Keyboard shortcuts

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