Documentation
¶
Overview ¶
Package server implements the AgentRuntime gRPC service defined in proto/agent/runtime/v1. This is a runnable skeleton: Run / RunStream / RunAgent / RunAgentStream / HealthCheck are backed by an eino chat model, while Resume / Stop return Unimplemented until the full engine lands.
Index ¶
- func StreamTraceInterceptor() grpc.StreamServerInterceptor
- func UnaryTraceInterceptor() grpc.UnaryServerInterceptor
- type Config
- type Server
- func (s *Server) GenerateMedia(ctx context.Context, req *runtimev1.MediaGenerationRequest) (*runtimev1.MediaGenerationResponse, error)
- func (s *Server) HealthCheck(ctx context.Context, req *runtimev1.HealthCheckRequest) (*runtimev1.HealthCheckResponse, error)
- func (s *Server) Resume(ctx context.Context, req *runtimev1.ResumeRequest) (*runtimev1.ResumeResponse, error)
- func (s *Server) Run(ctx context.Context, req *runtimev1.RunRequest) (*runtimev1.RunResponse, error)
- func (s *Server) RunAgent(ctx context.Context, req *runtimev1.AgentRequest) (*runtimev1.AgentResponse, error)
- func (s *Server) RunAgentStream(req *runtimev1.AgentRequest, ...) error
- func (s *Server) RunStream(req *runtimev1.RunRequest, stream runtimev1.AgentRuntime_RunStreamServer) error
- func (s *Server) Stop(ctx context.Context, req *runtimev1.StopRequest) (*runtimev1.StopResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StreamTraceInterceptor ¶
func StreamTraceInterceptor() grpc.StreamServerInterceptor
StreamTraceInterceptor binds inbound gRPC trace metadata to server-streaming contexts before service handlers run.
func UnaryTraceInterceptor ¶
func UnaryTraceInterceptor() grpc.UnaryServerInterceptor
UnaryTraceInterceptor binds inbound gRPC trace metadata to the request context before service handlers run.
Types ¶
type Config ¶
type Config struct {
DefaultModel eino.ModelConfig
// Memory is optional. When Store is non-nil the server injects memory into
// the system prompt and mines new memories after each response.
Store *memory.MemStore
Reviewer *memory.BackgroundReviewer
InjectMemory bool
// Dispatch carries operator-level defaults (sandbox / skills) into each run.
Dispatch dispatcher.Config
}
Config configures the server's default model (used when a request omits models).
type Server ¶
type Server struct {
runtimev1.UnimplementedAgentRuntimeServer
// contains filtered or unexported fields
}
Server implements runtimev1.AgentRuntimeServer.
func (*Server) GenerateMedia ¶
func (s *Server) GenerateMedia(ctx context.Context, req *runtimev1.MediaGenerationRequest) (*runtimev1.MediaGenerationResponse, error)
GenerateMedia invokes a user-selected media model directly, without an LLM deciding whether or how to call the model.
func (*Server) HealthCheck ¶
func (s *Server) HealthCheck(ctx context.Context, req *runtimev1.HealthCheckRequest) (*runtimev1.HealthCheckResponse, error)
HealthCheck reports serving status.
func (*Server) Resume ¶
func (s *Server) Resume(ctx context.Context, req *runtimev1.ResumeRequest) (*runtimev1.ResumeResponse, error)
Resume is not yet implemented (approval/checkpoint engine pending).
func (*Server) Run ¶
func (s *Server) Run(ctx context.Context, req *runtimev1.RunRequest) (*runtimev1.RunResponse, error)
Run performs a non-streaming completion.
func (*Server) RunAgent ¶
func (s *Server) RunAgent(ctx context.Context, req *runtimev1.AgentRequest) (*runtimev1.AgentResponse, error)
RunAgent performs a non-streaming autonomous task (natural language input).
func (*Server) RunAgentStream ¶
func (s *Server) RunAgentStream(req *runtimev1.AgentRequest, stream runtimev1.AgentRuntime_RunAgentStreamServer) error
RunAgentStream streams an autonomous task response.
func (*Server) RunStream ¶
func (s *Server) RunStream(req *runtimev1.RunRequest, stream runtimev1.AgentRuntime_RunStreamServer) error
RunStream streams a completion for a configured Run request.
func (*Server) Stop ¶
func (s *Server) Stop(ctx context.Context, req *runtimev1.StopRequest) (*runtimev1.StopResponse, error)
Stop is not yet implemented (run registry pending).