Class EchoAgent

java.lang.Object
com.techcognita.javachatx.agent.BaseAgent
com.techcognita.javachatx.agent.EchoAgent
All Implemented Interfaces:
Agent

public class EchoAgent extends BaseAgent
A simple echo agent that repeats back any input it receives. Demonstrates the basic structure of an agent implementation.
  • Constructor Details

    • EchoAgent

      public EchoAgent(String id)
  • Method Details

    • process

      public com.google.gson.JsonObject process(com.google.gson.JsonObject input)
      Description copied from interface: Agent
      Process a task or message directed at this agent.
      Parameters:
      input - The input data as a JSON object
      Returns:
      The result of the agent's processing as a JSON object