Class AISchemaDiscovery
java.lang.Object
neqsim.util.annotation.AISchemaDiscovery
- All Implemented Interfaces:
Serializable
Discovers and documents AI-exposed NeqSim functionality.
This class uses reflection to find methods marked with AIExposable and generates
structured documentation that AI agents can parse.
Usage:
AISchemaDiscovery discovery = new AISchemaDiscovery();
// Discover methods in a class
List<MethodSchema> methods = discovery.discoverMethods(SystemSrkEos.class);
// Generate prompt for AI
String prompt = discovery.generateMethodPrompt(methods);
// Get all core NeqSim APIs
Map<String, List<MethodSchema>> coreAPIs = discovery.discoverCoreAPIs();
- Version:
- 1.0
- Author:
- NeqSim
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSchema for a discovered method.static classSchema for a method parameter. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate StringcamelToSpaces(String camel) Convert camelCase to spaces.private AISchemaDiscovery.MethodSchemacreateMethodSchema(Class<?> clazz, Method method, AIExposable annotation) Create MethodSchema from annotation.private AISchemaDiscovery.MethodSchemacreateMethodSchemaFromMethod(Class<?> clazz, Method method) Create MethodSchema from method without annotation.discoverCommonMethods(Class<?> clazz) Discover common NeqSim methods even without annotations.Discover core NeqSim APIs by scanning common classes.discoverMethods(Class<?> clazz) Discover all AI-exposed methods in a class.private StringgenerateDescriptionFromName(String methodName) Generate a basic description from method name.Generate a prompt containing discovered methods.Get a quick-start prompt for AI agents.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
AISchemaDiscovery
public AISchemaDiscovery()
-
-
Method Details
-
discoverMethods
Discover all AI-exposed methods in a class.- Parameters:
clazz- class to scan- Returns:
- list of method schemas
-
discoverCommonMethods
Discover common NeqSim methods even without annotations.This provides a basic discovery of frequently-used methods for AI consumption.
- Parameters:
clazz- class to scan- Returns:
- list of common method schemas
-
createMethodSchema
private AISchemaDiscovery.MethodSchema createMethodSchema(Class<?> clazz, Method method, AIExposable annotation) Create MethodSchema from annotation. -
createMethodSchemaFromMethod
Create MethodSchema from method without annotation. -
generateDescriptionFromName
-
camelToSpaces
-
generateMethodPrompt
Generate a prompt containing discovered methods.- Parameters:
methods- list of method schemas- Returns:
- formatted prompt text
-
discoverCoreAPIs
Discover core NeqSim APIs by scanning common classes.- Returns:
- map of class name to method schemas
-
getQuickStartPrompt
Get a quick-start prompt for AI agents.- Returns:
- formatted quick-start prompt
-