Class AsiContainer
java.lang.Object
uno.anahata.asi.agi.tool.ToolContext
uno.anahata.asi.agi.tool.AnahataToolkit
uno.anahata.asi.toolkit.AsiContainer
- All Implemented Interfaces:
ContextProvider, PropertyChangeSource, Rebindable
The definitive toolkit for managing and inspecting the ASI container and its
active sessions. This toolkit provides deep visibility into the 'Working
Memory' and 'Long-Term Context' of the ASI across all sessions.
- Author:
- anahata
-
Field Summary
Fields inherited from class AnahataToolkit
childrenProviders, propertyChangeSupportFields inherited from class ToolContext
toolkit -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCloses the UI tab/window of a specific active AGI session without disposing it.createNewAgi(boolean open, boolean autoReplyTools, String nickName, String aiProviderUUID, String modelID, List<String> toolkitFqns, List<String> resourceURIs, String initialMessage, Map<String, ToolPermission> toolPermissions, ThinkingLevel thinkingLevel) Creates a new AGI session with comprehensive configuration options.disposeAgi(String sessionId) Permanently disposes of an active AGI session, closing its UI, shutting down its executors, and archiving its session file.dumpHistory(String sessionId) Returns a plain text dump of the entire conversation history for a session.getAgiDetails(String sessionId) Returns detailed metadata for a specific AGI session, including its enabled toolkits, context providers, and managed resources.Gets a list of system instruction strings provided by this context provider.Returns a Markdown table of all active AGI sessions in the container.listAiModels(String providerUuid) Returns a Markdown table of available models for a specific AI provider or all providers if providerUuid is null.listAiProviders(boolean includeModelIds) Returns a Markdown table of all configured AI providers, including their UUIDs, enabled status, class FQNs, endpoints, API key statuses, and model counts or model IDs.voidpopulateMessage(RagMessage ragMessage) Populates the givenRagMessagewith dynamic, just-in-time context parts.Methods inherited from class AnahataToolkit
getChildrenProviders, getDescription, getId, getName, getParentProvider, getPropertyChangeSupport, initialize, isEffectivelyProviding, postActivate, rebindMethods inherited from class ToolContext
addAttachment, addAttachment, addAttachment, error, error, getAgi, getApplicationMap, getAsiContainer, getAsiContainerMap, getCall, getExecutorService, getModelId, getModelMessage, getResourceManager, getResponse, getSessionMap, getThreadSafeLogger, getTool, getToolContext, getToolkit, getToolManager, getTurnMap, isToolExecution, log, peekResponse, runAsyncMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContextProvider
getAgi, getContextPosition, getFlattenedHierarchy, getFullyQualifiedId, getHeader, getIconId, getInstructionsTokenCount, getRagTokenCount, isProviding, setParentProvider, setProviding
-
Constructor Details
-
AsiContainer
public AsiContainer()
-
-
Method Details
-
getSystemInstructions
Gets a list of system instruction strings provided by this context provider. These are typically prepended to the conversation as high-level guidance.Provides core instructions on how to programmatically query the container's AI providers and API keys from within NbJava scripts.
- Returns:
- A list of system instruction strings.
- Throws:
Exception- if an error occurs during instruction generation.
-
populateMessage
Populates the givenRagMessagewith dynamic, just-in-time context parts. These parts are appended to the end of the user's prompt (RAG).Populates the RAG message with container-level overview metadata, including host application ID, working directory, default template configuration, configured AI providers (summarized model counts), and active AGI sessions.
- Parameters:
ragMessage- The target RAG message to populate.- Throws:
Exception- If an error occurs during message population.
-
listActiveAgis
Returns a Markdown table of all active AGI sessions in the container.- Returns:
- A Markdown table listing sessions.
-
listAiProviders
Returns a Markdown table of all configured AI providers, including their UUIDs, enabled status, class FQNs, endpoints, API key statuses, and model counts or model IDs.- Parameters:
includeModelIds- Whether to include the full comma-separated list of model IDs (true) or just the total count (false).- Returns:
- A Markdown formatted table summarizing the container's AI providers.
-
listAiModels
Returns a Markdown table of available models for a specific AI provider or all providers if providerUuid is null.- Parameters:
providerUuid- Optional unique UUID of the AI provider. If null or empty, lists models across all providers.- Returns:
- A Markdown table of models.
-
getAgiDetails
-
createNewAgi
public String createNewAgi(boolean open, boolean autoReplyTools, String nickName, String aiProviderUUID, String modelID, List<String> toolkitFqns, List<String> resourceURIs, String initialMessage, Map<String, ToolPermission> toolPermissions, ThinkingLevel thinkingLevel) Creates a new AGI session with comprehensive configuration options.- Parameters:
open- Whether to open the new AGI session in the host UI.autoReplyTools- Whether to automatically execute tool calls for the new session without waiting for manual user intervention.nickName- the nickname for the new AGIaiProviderUUID- Optional UUID of the AI provider to use. Will use container default if null.modelID- Optional ID of the AI model to select. Will use container default if null.toolkitFqns- Optional list of fully qualified toolkit class names to enable.resourceURIs- Optional list of resource URIs to register in the new session.initialMessage- Optional message to send to the new AGI immediately after creation.toolPermissions- Optional map of tool permission overrides for this session (e.g. tool name -> PROMPT, APPROVE_ALWAYS, DENY).thinkingLevel- the startup thinking level for the new AGI- Returns:
- A confirmation message with the new session ID.
-
closeAgi
-
disposeAgi
-
dumpHistory
-

