agentpb

package
v0.30.0-cpp Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	AgentService_Process_FullMethodName             = "/agenkit.AgentService/Process"
	AgentService_ProcessStream_FullMethodName       = "/agenkit.AgentService/ProcessStream"
	AgentService_BidirectionalStream_FullMethodName = "/agenkit.AgentService/BidirectionalStream"
)

Variables

View Source
var (
	ResponseType_name = map[int32]string{
		0: "RESPONSE_TYPE_UNSPECIFIED",
		1: "RESPONSE_TYPE_MESSAGE",
		2: "RESPONSE_TYPE_TOOL_RESULT",
		3: "RESPONSE_TYPE_ERROR",
	}
	ResponseType_value = map[string]int32{
		"RESPONSE_TYPE_UNSPECIFIED": 0,
		"RESPONSE_TYPE_MESSAGE":     1,
		"RESPONSE_TYPE_TOOL_RESULT": 2,
		"RESPONSE_TYPE_ERROR":       3,
	}
)

Enum value maps for ResponseType.

View Source
var (
	ChunkType_name = map[int32]string{
		0: "CHUNK_TYPE_UNSPECIFIED",
		1: "CHUNK_TYPE_MESSAGE",
		2: "CHUNK_TYPE_END",
		3: "CHUNK_TYPE_ERROR",
	}
	ChunkType_value = map[string]int32{
		"CHUNK_TYPE_UNSPECIFIED": 0,
		"CHUNK_TYPE_MESSAGE":     1,
		"CHUNK_TYPE_END":         2,
		"CHUNK_TYPE_ERROR":       3,
	}
)

Enum value maps for ChunkType.

View Source
var AgentService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "agenkit.AgentService",
	HandlerType: (*AgentServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Process",
			Handler:    _AgentService_Process_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ProcessStream",
			Handler:       _AgentService_ProcessStream_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "BidirectionalStream",
			Handler:       _AgentService_BidirectionalStream_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "proto/agent.proto",
}

AgentService_ServiceDesc is the grpc.ServiceDesc for AgentService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_proto_agent_proto protoreflect.FileDescriptor

Functions

func RegisterAgentServiceServer

func RegisterAgentServiceServer(s grpc.ServiceRegistrar, srv AgentServiceServer)

Types

type AgentServiceClient

type AgentServiceClient interface {
	// Process sends a request and receives a single response
	Process(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
	// ProcessStream sends a request and receives a stream of response chunks
	ProcessStream(ctx context.Context, in *Request, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamChunk], error)
	// BidirectionalStream enables full-duplex streaming
	BidirectionalStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[Request, Response], error)
}

AgentServiceClient is the client API for AgentService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

AgentService defines the gRPC service for agent communication

type AgentServiceServer

type AgentServiceServer interface {
	// Process sends a request and receives a single response
	Process(context.Context, *Request) (*Response, error)
	// ProcessStream sends a request and receives a stream of response chunks
	ProcessStream(*Request, grpc.ServerStreamingServer[StreamChunk]) error
	// BidirectionalStream enables full-duplex streaming
	BidirectionalStream(grpc.BidiStreamingServer[Request, Response]) error
	// contains filtered or unexported methods
}

AgentServiceServer is the server API for AgentService service. All implementations must embed UnimplementedAgentServiceServer for forward compatibility.

AgentService defines the gRPC service for agent communication

type AgentService_BidirectionalStreamClient

type AgentService_BidirectionalStreamClient = grpc.BidiStreamingClient[Request, Response]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type AgentService_BidirectionalStreamServer

type AgentService_BidirectionalStreamServer = grpc.BidiStreamingServer[Request, Response]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type AgentService_ProcessStreamClient

type AgentService_ProcessStreamClient = grpc.ServerStreamingClient[StreamChunk]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type AgentService_ProcessStreamServer

type AgentService_ProcessStreamServer = grpc.ServerStreamingServer[StreamChunk]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type ChunkType

type ChunkType int32

ChunkType indicates what kind of chunk this is

const (
	ChunkType_CHUNK_TYPE_UNSPECIFIED ChunkType = 0
	ChunkType_CHUNK_TYPE_MESSAGE     ChunkType = 1 // Message chunk
	ChunkType_CHUNK_TYPE_END         ChunkType = 2 // End of stream
	ChunkType_CHUNK_TYPE_ERROR       ChunkType = 3 // Error chunk
)

func (ChunkType) Descriptor

func (ChunkType) Descriptor() protoreflect.EnumDescriptor

func (ChunkType) Enum

func (x ChunkType) Enum() *ChunkType

func (ChunkType) EnumDescriptor deprecated

func (ChunkType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ChunkType.Descriptor instead.

func (ChunkType) Number

func (x ChunkType) Number() protoreflect.EnumNumber

func (ChunkType) String

func (x ChunkType) String() string

func (ChunkType) Type

type Error

type Error struct {
	Code    string            `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`       // Error code
	Message string            `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // Human-readable error message
	Details map[string]string ``                                                                    // Additional error details
	/* 141-byte string literal not displayed */
	// contains filtered or unexported fields
}

Error represents an error response

func (*Error) Descriptor deprecated

func (*Error) Descriptor() ([]byte, []int)

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetCode

func (x *Error) GetCode() string

func (*Error) GetDetails

func (x *Error) GetDetails() map[string]string

func (*Error) GetMessage

func (x *Error) GetMessage() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

func (x *Error) ProtoReflect() protoreflect.Message

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type Message

type Message struct {
	Role     string            `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`       // Message role (user, assistant, system, tool)
	Content  string            `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` // Message content (text or JSON)
	Metadata map[string]string ``                                                                    // Additional metadata
	/* 143-byte string literal not displayed */
	Timestamp string `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // ISO 8601 timestamp
	// contains filtered or unexported fields
}

Message represents a conversational message

func (*Message) Descriptor deprecated

func (*Message) Descriptor() ([]byte, []int)

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetContent

func (x *Message) GetContent() string

func (*Message) GetMetadata

func (x *Message) GetMetadata() map[string]string

func (*Message) GetRole

func (x *Message) GetRole() string

func (*Message) GetTimestamp

func (x *Message) GetTimestamp() string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

func (x *Message) ProtoReflect() protoreflect.Message

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type Request

type Request struct {
	Version   string            `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`                      // Protocol version (e.g., "1.0")
	Id        string            `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`                                // Unique request ID (UUID)
	Timestamp string            `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`                  // ISO 8601 timestamp
	Method    string            `protobuf:"bytes,4,opt,name=method,proto3" json:"method,omitempty"`                        // Method name ("process", "execute", "stream")
	AgentName string            `protobuf:"bytes,5,opt,name=agent_name,json=agentName,proto3" json:"agent_name,omitempty"` // Target agent name (optional)
	Messages  []*Message        `protobuf:"bytes,6,rep,name=messages,proto3" json:"messages,omitempty"`                    // Messages for processing
	Metadata  map[string]string ``                                                                                         // Additional metadata
	/* 143-byte string literal not displayed */
	ToolCall *ToolCall `protobuf:"bytes,8,opt,name=tool_call,json=toolCall,proto3" json:"tool_call,omitempty"` // Tool execution request (optional)
	// contains filtered or unexported fields
}

Request represents a client request to the agent

func (*Request) Descriptor deprecated

func (*Request) Descriptor() ([]byte, []int)

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetAgentName

func (x *Request) GetAgentName() string

func (*Request) GetId

func (x *Request) GetId() string

func (*Request) GetMessages

func (x *Request) GetMessages() []*Message

func (*Request) GetMetadata

func (x *Request) GetMetadata() map[string]string

func (*Request) GetMethod

func (x *Request) GetMethod() string

func (*Request) GetTimestamp

func (x *Request) GetTimestamp() string

func (*Request) GetToolCall

func (x *Request) GetToolCall() *ToolCall

func (*Request) GetVersion

func (x *Request) GetVersion() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

func (x *Request) ProtoReflect() protoreflect.Message

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {
	Version    string            `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`                         // Protocol version
	Id         string            `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`                                   // Request ID being responded to
	Timestamp  string            `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`                     // ISO 8601 timestamp
	Type       ResponseType      `protobuf:"varint,4,opt,name=type,proto3,enum=agenkit.ResponseType" json:"type,omitempty"`    // Response type
	Message    *Message          `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"`                         // Response message (for process)
	ToolResult *ToolResult       `protobuf:"bytes,6,opt,name=tool_result,json=toolResult,proto3" json:"tool_result,omitempty"` // Tool execution result (for execute)
	Error      *Error            `protobuf:"bytes,7,opt,name=error,proto3" json:"error,omitempty"`                             // Error details (if failed)
	Metadata   map[string]string ``                                                                                            // Additional metadata
	/* 143-byte string literal not displayed */
	// contains filtered or unexported fields
}

Response represents a server response

func (*Response) Descriptor deprecated

func (*Response) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetError

func (x *Response) GetError() *Error

func (*Response) GetId

func (x *Response) GetId() string

func (*Response) GetMessage

func (x *Response) GetMessage() *Message

func (*Response) GetMetadata

func (x *Response) GetMetadata() map[string]string

func (*Response) GetTimestamp

func (x *Response) GetTimestamp() string

func (*Response) GetToolResult

func (x *Response) GetToolResult() *ToolResult

func (*Response) GetType

func (x *Response) GetType() ResponseType

func (*Response) GetVersion

func (x *Response) GetVersion() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type ResponseType

type ResponseType int32

ResponseType indicates what kind of response this is

const (
	ResponseType_RESPONSE_TYPE_UNSPECIFIED ResponseType = 0
	ResponseType_RESPONSE_TYPE_MESSAGE     ResponseType = 1 // Normal message response
	ResponseType_RESPONSE_TYPE_TOOL_RESULT ResponseType = 2 // Tool execution result
	ResponseType_RESPONSE_TYPE_ERROR       ResponseType = 3 // Error response
)

func (ResponseType) Descriptor

func (ResponseType) Enum

func (x ResponseType) Enum() *ResponseType

func (ResponseType) EnumDescriptor deprecated

func (ResponseType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ResponseType.Descriptor instead.

func (ResponseType) Number

func (ResponseType) String

func (x ResponseType) String() string

func (ResponseType) Type

type StreamChunk

type StreamChunk struct {
	Version   string    `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`                   // Protocol version
	Id        string    `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`                             // Request ID
	Timestamp string    `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`               // ISO 8601 timestamp
	Type      ChunkType `protobuf:"varint,4,opt,name=type,proto3,enum=agenkit.ChunkType" json:"type,omitempty"` // Chunk type
	Message   *Message  `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"`                   // Message chunk (optional)
	Error     *Error    `protobuf:"bytes,6,opt,name=error,proto3" json:"error,omitempty"`                       // Error (optional)
	// contains filtered or unexported fields
}

StreamChunk represents a chunk in a streaming response

func (*StreamChunk) Descriptor deprecated

func (*StreamChunk) Descriptor() ([]byte, []int)

Deprecated: Use StreamChunk.ProtoReflect.Descriptor instead.

func (*StreamChunk) GetError

func (x *StreamChunk) GetError() *Error

func (*StreamChunk) GetId

func (x *StreamChunk) GetId() string

func (*StreamChunk) GetMessage

func (x *StreamChunk) GetMessage() *Message

func (*StreamChunk) GetTimestamp

func (x *StreamChunk) GetTimestamp() string

func (*StreamChunk) GetType

func (x *StreamChunk) GetType() ChunkType

func (*StreamChunk) GetVersion

func (x *StreamChunk) GetVersion() string

func (*StreamChunk) ProtoMessage

func (*StreamChunk) ProtoMessage()

func (*StreamChunk) ProtoReflect

func (x *StreamChunk) ProtoReflect() protoreflect.Message

func (*StreamChunk) Reset

func (x *StreamChunk) Reset()

func (*StreamChunk) String

func (x *StreamChunk) String() string

type ToolCall

type ToolCall struct {
	Name      string            `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`           // Tool name
	Arguments string            `protobuf:"bytes,2,opt,name=arguments,proto3" json:"arguments,omitempty"` // Tool arguments (JSON string)
	Metadata  map[string]string ``                                                                        // Additional metadata
	/* 143-byte string literal not displayed */
	// contains filtered or unexported fields
}

ToolCall represents a request to execute a tool

func (*ToolCall) Descriptor deprecated

func (*ToolCall) Descriptor() ([]byte, []int)

Deprecated: Use ToolCall.ProtoReflect.Descriptor instead.

func (*ToolCall) GetArguments

func (x *ToolCall) GetArguments() string

func (*ToolCall) GetMetadata

func (x *ToolCall) GetMetadata() map[string]string

func (*ToolCall) GetName

func (x *ToolCall) GetName() string

func (*ToolCall) ProtoMessage

func (*ToolCall) ProtoMessage()

func (*ToolCall) ProtoReflect

func (x *ToolCall) ProtoReflect() protoreflect.Message

func (*ToolCall) Reset

func (x *ToolCall) Reset()

func (*ToolCall) String

func (x *ToolCall) String() string

type ToolResult

type ToolResult struct {
	Success  bool              `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // Whether execution succeeded
	Data     string            `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`        // Result data (JSON string)
	Error    string            `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`      // Error message (if failed)
	Metadata map[string]string ``                                                                     // Additional metadata
	/* 143-byte string literal not displayed */
	// contains filtered or unexported fields
}

ToolResult represents the result of tool execution

func (*ToolResult) Descriptor deprecated

func (*ToolResult) Descriptor() ([]byte, []int)

Deprecated: Use ToolResult.ProtoReflect.Descriptor instead.

func (*ToolResult) GetData

func (x *ToolResult) GetData() string

func (*ToolResult) GetError

func (x *ToolResult) GetError() string

func (*ToolResult) GetMetadata

func (x *ToolResult) GetMetadata() map[string]string

func (*ToolResult) GetSuccess

func (x *ToolResult) GetSuccess() bool

func (*ToolResult) ProtoMessage

func (*ToolResult) ProtoMessage()

func (*ToolResult) ProtoReflect

func (x *ToolResult) ProtoReflect() protoreflect.Message

func (*ToolResult) Reset

func (x *ToolResult) Reset()

func (*ToolResult) String

func (x *ToolResult) String() string

type UnimplementedAgentServiceServer

type UnimplementedAgentServiceServer struct{}

UnimplementedAgentServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedAgentServiceServer) BidirectionalStream

func (UnimplementedAgentServiceServer) Process

func (UnimplementedAgentServiceServer) ProcessStream

type UnsafeAgentServiceServer

type UnsafeAgentServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeAgentServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AgentServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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