Class Host

All Implemented Interfaces:
ContextProvider, PropertyChangeSource, Rebindable

public class Host extends AnahataToolkit
A toolkit for interacting with the host operating system and JVM.

This toolkit provides tools for process management, system information, and environment introspection.

Author:
anahata
  • Constructor Details

    • Host

      public Host()
  • Method Details

    • populateMessage

      public void populateMessage(RagMessage ragMessage)
      Populates the given RagMessage with dynamic, just-in-time context parts. These parts are appended to the end of the user's prompt (RAG).
      Parameters:
      ragMessage - The message to be augmented with context.
    • listProcesses

      public List<String> listProcesses()
      Lists all active processes on the host system.
      Returns:
      A list of process information strings.
    • killProcess

      public String killProcess(long pid, boolean force)
      Terminates a specific process by its PID.
      Parameters:
      pid - The process ID to terminate.
      force - Whether to use a forced shutdown (kill -9).
      Returns:
      A status message.