Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterAgentServiceServer(s grpc.ServiceRegistrar, srv AgentServiceServer)
- type AgentServiceClient
- type AgentServiceServer
- type AgentService_BidirectionalStreamClient
- type AgentService_BidirectionalStreamServer
- type AgentService_ProcessStreamClient
- type AgentService_ProcessStreamServer
- type ChunkType
- type Error
- func (*Error) Descriptor() ([]byte, []int)deprecated
- func (x *Error) GetCode() string
- func (x *Error) GetDetails() map[string]string
- func (x *Error) GetMessage() string
- func (*Error) ProtoMessage()
- func (x *Error) ProtoReflect() protoreflect.Message
- func (x *Error) Reset()
- func (x *Error) String() string
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetContent() string
- func (x *Message) GetMetadata() map[string]string
- func (x *Message) GetRole() string
- func (x *Message) GetTimestamp() string
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type Request
- func (*Request) Descriptor() ([]byte, []int)deprecated
- func (x *Request) GetAgentName() string
- func (x *Request) GetId() string
- func (x *Request) GetMessages() []*Message
- func (x *Request) GetMetadata() map[string]string
- func (x *Request) GetMethod() string
- func (x *Request) GetTimestamp() string
- func (x *Request) GetToolCall() *ToolCall
- func (x *Request) GetVersion() string
- func (*Request) ProtoMessage()
- func (x *Request) ProtoReflect() protoreflect.Message
- func (x *Request) Reset()
- func (x *Request) String() string
- type Response
- func (*Response) Descriptor() ([]byte, []int)deprecated
- func (x *Response) GetError() *Error
- func (x *Response) GetId() string
- func (x *Response) GetMessage() *Message
- func (x *Response) GetMetadata() map[string]string
- func (x *Response) GetTimestamp() string
- func (x *Response) GetToolResult() *ToolResult
- func (x *Response) GetType() ResponseType
- func (x *Response) GetVersion() string
- func (*Response) ProtoMessage()
- func (x *Response) ProtoReflect() protoreflect.Message
- func (x *Response) Reset()
- func (x *Response) String() string
- type ResponseType
- func (ResponseType) Descriptor() protoreflect.EnumDescriptor
- func (x ResponseType) Enum() *ResponseType
- func (ResponseType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ResponseType) Number() protoreflect.EnumNumber
- func (x ResponseType) String() string
- func (ResponseType) Type() protoreflect.EnumType
- type StreamChunk
- func (*StreamChunk) Descriptor() ([]byte, []int)deprecated
- func (x *StreamChunk) GetError() *Error
- func (x *StreamChunk) GetId() string
- func (x *StreamChunk) GetMessage() *Message
- func (x *StreamChunk) GetTimestamp() string
- func (x *StreamChunk) GetType() ChunkType
- func (x *StreamChunk) GetVersion() string
- func (*StreamChunk) ProtoMessage()
- func (x *StreamChunk) ProtoReflect() protoreflect.Message
- func (x *StreamChunk) Reset()
- func (x *StreamChunk) String() string
- type ToolCall
- func (*ToolCall) Descriptor() ([]byte, []int)deprecated
- func (x *ToolCall) GetArguments() string
- func (x *ToolCall) GetMetadata() map[string]string
- func (x *ToolCall) GetName() string
- func (*ToolCall) ProtoMessage()
- func (x *ToolCall) ProtoReflect() protoreflect.Message
- func (x *ToolCall) Reset()
- func (x *ToolCall) String() string
- type ToolResult
- func (*ToolResult) Descriptor() ([]byte, []int)deprecated
- func (x *ToolResult) GetData() string
- func (x *ToolResult) GetError() string
- func (x *ToolResult) GetMetadata() map[string]string
- func (x *ToolResult) GetSuccess() bool
- func (*ToolResult) ProtoMessage()
- func (x *ToolResult) ProtoReflect() protoreflect.Message
- func (x *ToolResult) Reset()
- func (x *ToolResult) String() string
- type UnimplementedAgentServiceServer
- func (UnimplementedAgentServiceServer) BidirectionalStream(grpc.BidiStreamingServer[Request, Response]) error
- func (UnimplementedAgentServiceServer) Process(context.Context, *Request) (*Response, error)
- func (UnimplementedAgentServiceServer) ProcessStream(*Request, grpc.ServerStreamingServer[StreamChunk]) error
- type UnsafeAgentServiceServer
Constants ¶
const ( AgentService_Process_FullMethodName = "/agenkit.AgentService/Process" AgentService_ProcessStream_FullMethodName = "/agenkit.AgentService/ProcessStream" AgentService_BidirectionalStream_FullMethodName = "/agenkit.AgentService/BidirectionalStream" )
Variables ¶
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.
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.
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)
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
func NewAgentServiceClient ¶
func NewAgentServiceClient(cc grpc.ClientConnInterface) AgentServiceClient
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
func (ChunkType) Descriptor ¶
func (ChunkType) Descriptor() protoreflect.EnumDescriptor
func (ChunkType) EnumDescriptor
deprecated
func (ChunkType) Number ¶
func (x ChunkType) Number() protoreflect.EnumNumber
func (ChunkType) Type ¶
func (ChunkType) Type() protoreflect.EnumType
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) GetDetails ¶
func (*Error) GetMessage ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
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) GetContent ¶
func (*Message) GetMetadata ¶
func (*Message) GetTimestamp ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
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) GetAgentName ¶
func (*Request) GetMessages ¶
func (*Request) GetMetadata ¶
func (*Request) GetTimestamp ¶
func (*Request) GetToolCall ¶
func (*Request) GetVersion ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
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) GetMessage ¶
func (*Response) GetMetadata ¶
func (*Response) GetTimestamp ¶
func (*Response) GetToolResult ¶
func (x *Response) GetToolResult() *ToolResult
func (*Response) GetType ¶
func (x *Response) GetType() ResponseType
func (*Response) GetVersion ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
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) Descriptor() protoreflect.EnumDescriptor
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 (x ResponseType) Number() protoreflect.EnumNumber
func (ResponseType) String ¶
func (x ResponseType) String() string
func (ResponseType) Type ¶
func (ResponseType) Type() protoreflect.EnumType
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) GetArguments ¶
func (*ToolCall) GetMetadata ¶
func (*ToolCall) ProtoMessage ¶
func (*ToolCall) ProtoMessage()
func (*ToolCall) ProtoReflect ¶
func (x *ToolCall) ProtoReflect() protoreflect.Message
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) BidirectionalStream(grpc.BidiStreamingServer[Request, Response]) error
func (UnimplementedAgentServiceServer) ProcessStream ¶
func (UnimplementedAgentServiceServer) ProcessStream(*Request, grpc.ServerStreamingServer[StreamChunk]) error
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.