Package com.rpl.agentorama
Interface AgentManager
- All Superinterfaces:
AutoCloseable,Closeable,com.rpl.agentorama.impl.IFetchAgentClient
Manager for interacting with deployed agents on a Rama cluster.
The agent manager provides access to agent clients, dataset management,
and evaluation capabilities for a specific module deployed on a cluster.
Example:
AgentManager manager = AgentManager.create(cluster, "MyModule");
Set<String> agentNames = manager.getAgentNames();
AgentClient client = manager.getAgentClient("my-agent");
String result = client.invoke("Hello world");
-
Method Summary
Modifier and TypeMethodDescriptionaddDatasetExample(UUID datasetId, Object input, AddDatasetExampleOptions options) Adds an example to a dataset for testing and evaluation.addDatasetExampleAsync(UUID datasetId, Object input, AddDatasetExampleOptions options) Asynchronously adds an example to a dataset.voidaddDatasetExampleTag(UUID datasetId, String snapshotName, UUID exampleId, String tag) Adds a tag to a specific dataset example for categorization.static AgentManagerCreates an agent manager for managing and interacting with deployed agents on a Rama cluster.createDataset(String name, String description, String inputJsonSchema, String outputJsonSchema) Creates a new dataset for agent testing and evaluation.voidcreateEvaluator(String name, String builderName, Map params, String description, CreateEvaluatorOptions options) Creates an evaluator instance from a builder for measuring agent performance in experiments or actions.voiddestroyDataset(UUID datasetId) Permanently deletes a dataset and all its examples.Gets the names of all available agents in the module.voidremoveDatasetExample(UUID datasetId, String snapshotName, UUID exampleId) Removes a specific example from a dataset.voidremoveDatasetExampleTag(UUID datasetId, String snapshotName, UUID exampleId, String tag) Removes a tag from a specific dataset example.voidremoveDatasetSnapshot(UUID datasetId, String snapshotName) Removes a specific snapshot from a dataset.voidremoveEvaluator(String name) Removes an evaluator from the system.searchDatasets(String searchString, int limit) Searches for datasets by name or description.searchEvaluators(String searchString) Searches for evaluators by name or description.voidsetDatasetDescription(UUID datasetId, String description) Updates the description of an existing dataset.voidsetDatasetExampleInput(UUID datasetId, String snapshotName, UUID exampleId, Object input) Updates the input data for a specific dataset example.voidsetDatasetExampleReferenceOutput(UUID datasetId, String snapshotName, UUID exampleId, Object referenceOutput) Updates the reference output for a specific dataset example.voidsetDatasetName(UUID datasetId, String name) Updates the name of an existing dataset.voidsnapshotDataset(UUID datasetId, String fromSnapshotName, String toSnapshotName) Creates a snapshot of a dataset at its current state.Tests a comparative evaluator on multiple outputs.tryEvaluator(String name, Object input, Object referenceOutput, Object output) Tests an evaluator on a single sample input / reference output / output.trySummaryEvaluator(String name, List<ExampleRun> exampleRuns) Tests a summary evaluator on a collection of example runs.Methods inherited from interface com.rpl.agentorama.impl.IFetchAgentClient
getAgentClient
-
Method Details
-
create
Creates an agent manager for managing and interacting with deployed agents on a Rama cluster.- Parameters:
cluster- the Rama cluster instance (IPC or remote cluster)moduleName- the name of the deployed module- Returns:
- interface for managing agents and datasets
-
getAgentNames
Gets the names of all available agents in the module.- Returns:
- set of agent names available in the module
-
createDataset
UUID createDataset(String name, String description, String inputJsonSchema, String outputJsonSchema) Creates a new dataset for agent testing and evaluation. Datasets are collections of input/output examples used for testing agent performance, running experiments, and regression testing.- Parameters:
name- the name of the datasetdescription- description of what the dataset containsinputJsonSchema- JSON schema for input validationoutputJsonSchema- JSON schema for output validation- Returns:
- UUID of the created dataset
-
setDatasetName
Updates the name of an existing dataset.- Parameters:
datasetId- UUID of the datasetname- new name for the dataset
-
setDatasetDescription
Updates the description of an existing dataset.- Parameters:
datasetId- UUID of the datasetdescription- new description for the dataset
-
destroyDataset
Permanently deletes a dataset and all its examples.- Parameters:
datasetId- UUID of the dataset to delete
-
addDatasetExampleAsync
CompletableFuture<Void> addDatasetExampleAsync(UUID datasetId, Object input, AddDatasetExampleOptions options) Asynchronously adds an example to a dataset.- Parameters:
datasetId- UUID of the datasetinput- input data for the exampleoptions- configuration options for the example- Returns:
- future that completes when the example is added
-
addDatasetExample
Adds an example to a dataset for testing and evaluation.- Parameters:
datasetId- UUID of the datasetinput- input data for the exampleoptions- configuration options for the example- Returns:
- UUID of the added example
-
setDatasetExampleInput
Updates the input data for a specific dataset example.- Parameters:
datasetId- UUID of the datasetsnapshotName- name of the snapshot (or null for current)exampleId- UUID of the exampleinput- new input data for the example
-
setDatasetExampleReferenceOutput
void setDatasetExampleReferenceOutput(UUID datasetId, String snapshotName, UUID exampleId, Object referenceOutput) Updates the reference output for a specific dataset example.- Parameters:
datasetId- UUID of the datasetsnapshotName- name of the snapshot (or null for current)exampleId- UUID of the examplereferenceOutput- new reference output for the example
-
removeDatasetExample
Removes a specific example from a dataset.- Parameters:
datasetId- UUID of the datasetsnapshotName- name of the snapshot (or null for current)exampleId- UUID of the example to remove
-
addDatasetExampleTag
Adds a tag to a specific dataset example for categorization.- Parameters:
datasetId- UUID of the datasetsnapshotName- name of the snapshot (or null for current)exampleId- UUID of the exampletag- tag to add
-
removeDatasetExampleTag
Removes a tag from a specific dataset example.- Parameters:
datasetId- UUID of the datasetsnapshotName- name of the snapshot (or null for current)exampleId- UUID of the exampletag- tag to remove
-
snapshotDataset
Creates a snapshot of a dataset at its current state.- Parameters:
datasetId- UUID of the datasetfromSnapshotName- name of the source snapshot (or null for current)toSnapshotName- name for the new snapshot
-
removeDatasetSnapshot
Removes a specific snapshot from a dataset.- Parameters:
datasetId- UUID of the datasetsnapshotName- name of the snapshot to remove
-
searchDatasets
Searches for datasets by name or description.- Parameters:
searchString- string to search for in names and descriptionslimit- maximum number of results to return- Returns:
- map from dataset UUID to dataset name
-
createEvaluator
void createEvaluator(String name, String builderName, Map params, String description, CreateEvaluatorOptions options) Creates an evaluator instance from a builder for measuring agent performance in experiments or actions.- Parameters:
name- name for the evaluatorbuilderName- name of the evaluator builder (declared in topology or built-in)params- map of parameters for the evaluator. Parameters are a map from parameter name to parameter value, both strings.description- description of what the evaluator measuresoptions- configuration options for the evaluator
-
removeEvaluator
Removes an evaluator from the system.- Parameters:
name- name of the evaluator to remove
-
searchEvaluators
Searches for evaluators by name or description.- Parameters:
searchString- string to search for in evaluator names- Returns:
- set of matching evaluator names
-
tryEvaluator
Tests an evaluator on a single sample input / reference output / output.- Parameters:
name- name of the evaluatorinput- input data for the evaluationreferenceOutput- reference output for comparisonoutput- actual output to evaluate- Returns:
- result scores from score name to score value
-
tryComparativeEvaluator
Map tryComparativeEvaluator(String name, Object input, Object referenceOutput, List<Object> outputs) Tests a comparative evaluator on multiple outputs.- Parameters:
name- name of the evaluatorinput- input data for the evaluationreferenceOutput- reference output for comparisonoutputs- collection of actual outputs to compare- Returns:
- comparative evaluation result, a map of score name to score value
-
trySummaryEvaluator
Tests a summary evaluator on a collection of example runs.- Parameters:
name- name of the evaluatorexampleRuns- collection of example runs created with ExampleRun.create()- Returns:
- summary evaluation result with aggregate metrics, a map from score name to score value
-