syntax = "proto3";

package prompits.plugs.protos;

// Agent service definition
service Agent {
  // Send a message to the agent
  rpc SendMessage (Message) returns (MessageResponse) {}
  
  // Echo a message back to the sender
  rpc Echo (Message) returns (Message) {}
  
  // Get agent information
  rpc GetAgentInfo (Empty) returns (AgentInfo) {}
  
  // List available practices
  rpc ListPractices (Empty) returns (PracticeList) {}
  
  // Execute a practice
  rpc ExecutePractice (PracticeRequest) returns (PracticeResponse) {}
}

// Empty message for requests that don't need parameters
message Empty {}

// Message for communication between agents
message Message {
  string id = 1;
  string type = 2;
  string content = 3;
  int64 timestamp = 4;
}

// Response to a message
message MessageResponse {
  bool success = 1;
  string message = 2;
}

// Agent information
message AgentInfo {
  string agent_id = 1;
  string agent_name = 2;
  string description = 3;
  repeated string capabilities = 4;
}

// List of practices
message PracticeList {
  repeated Practice practices = 1;
}

// Practice information
message Practice {
  string name = 1;
  string description = 2;
  repeated Parameter parameters = 3;
}

// Parameter information
message Parameter {
  string name = 1;
  string type = 2;
  bool required = 3;
  string default_value = 4;
}

// Request to execute a practice
message PracticeRequest {
  string practice_name = 1;
  map<string, string> parameters = 2;
}

// Response from executing a practice
message PracticeResponse {
  bool success = 1;
  string result = 2;
  string error = 3;
} 