- Agent
The Agent service is responsible for managing an AI agent. AI agents are self-contained actors which emit messages to a subscriber, which may be a human or another AI agent.
- Bundler
Builder for Fabric-based applications.
- Clock :
Object
Simple clock. Emits
tick
events at a specified interval.- Queue
A
Queue
is a simple job queue for managing asynchronous tasks.- Site
Implements a full-capacity (Native + Edge nodes) for a Fabric Site.
- SPA
Fully-managed HTML application.
- Trainer
Implements document ingestion.
- Worker
Worker service.
- FabricNetwork
Defines the Fabric interface for Sensemaker.
- Sensemaker :
Object
Sensemaker is the primary instance of the AI.
The Agent service is responsible for managing an AI agent. AI agents are self-contained actors which emit messages to a subscriber, which may be a human or another AI agent.
Kind: global class
- Agent
- new Agent([settings])
- .query(request) ⇒
AgentResponse
Create an instance of an Agent.
Returns: Agent
- Instance of the Agent.
Param | Type | Description |
---|---|---|
[settings] | Object |
Settings for the Agent. |
[settings.name] | String |
The name of the agent. |
[settings.type] | String |
The type of the agent. |
[settings.description] | String |
The description of the agent. |
[settings.frequency] | Number |
The frequency at which the agent operates. |
[settings.database] | Object |
The database settings for the agent. |
[settings.fabric] | Object |
The Fabric settings for the agent. |
[settings.parameters] | Object |
The parameters for the agent. |
[settings.model] | String |
The model for the agent. |
Query the agent with some text.
Kind: instance method of Agent
Returns: AgentResponse
- Response object.
Param | Type | Description |
---|---|---|
request | Object |
Request object. |
request.query | String |
The query to send to the agent. |
Builder for Fabric-based applications.
Create an instance of the bundler.
Param | Type | Description |
---|---|---|
[settings] | Object |
Map of settings. |
[settings.document] | HTTPComponent |
Document to use. |
Simple clock. Emits tick
events at a specified interval.
A Queue
is a simple job queue for managing asynchronous tasks.
Register a method with the queue.
Kind: instance method of Queue
Returns: function
- The registered method.
Param | Type | Description |
---|---|---|
name | String |
Name of the method to register. |
contract | function |
Function to execute when the method is called. |
context | Object |
Context in which to execute the method. |
Implements a full-capacity (Native + Edge nodes) for a Fabric Site.
Creates an instance of the Site, which provides general statistics covering a target Fabric node.
Returns: Site
- Instance of the Site. Call render(state)
to derive a new DOM element.
Param | Type | Description |
---|---|---|
[settings] | Object |
Configuration values for the Site. |
Fully-managed HTML application.
Implements document ingestion.
Kind: global class
- Trainer
- .ingestDirectory(directory) ⇒
Promise
- .ingestDocument(document, type) ⇒
Promise
- .search(request) ⇒
Promise
- .ingestDirectory(directory) ⇒
Ingest a directory of files.
Kind: instance method of Trainer
Returns: Promise
- Resolves with the result of the operation.
Param | Type | Description |
---|---|---|
directory | String |
Path to ingest. |
Ingest a well-formed document.
Kind: instance method of Trainer
Returns: Promise
- Resolves with the result of the operation.
Param | Type | Default | Description |
---|---|---|---|
document | Object |
Well-formed document object. | |
type | String |
text |
Name of the document type. |
Search the document store.
Kind: instance method of Trainer
Returns: Promise
- Resolves with the result of the operation.
Param | Type | Description |
---|---|---|
request | Object |
Search object. |
Worker service.
Defines the Fabric interface for Sensemaker.
Create an instance of the service.
Returns: FabricService
- A new instance of the service.
Param | Type | Description |
---|---|---|
[settings] | Object |
Settings for the service. |
Sensemaker is the primary instance of the AI.
Kind: global class
Extends: Service
- Sensemaker :
Object
- new Sensemaker([settings])
- .combinationsOf(tokens, prefix) ⇒
Array
- .createAgent(configuration) ⇒
Agent
- .estimateTokens(input) ⇒
Number
- .importantPhrases(input, limit) ⇒
Array
- .importantWords(input, limit) ⇒
Array
- .properNouns(input) ⇒
Array
- .uniqueWords(input) ⇒
Array
- .alert(message) ⇒
Boolean
- .handleTextRequest(request) ⇒
Promise
- .retrieveFile(id) ⇒
Object
- .start() ⇒
Promise
- .stop() ⇒
Promise
- ._getRoomMessages() ⇒
Array
- ._handleRequest(request) ⇒
SensemakerResponse
Constructor for the Sensemaker instance.
Returns: Sensemaker
- Resulting instance of Sensemaker.
Param | Type | Default | Description |
---|---|---|---|
[settings] | Object |
{} |
Map of configuration values. |
[settings.seed] | Number |
12 or 24 word mnemonic seed. | |
[settings.port] | Number |
7777 |
Fabric messaging port. |
Extracts a list of possible combinations of a given array.
Kind: instance method of Sensemaker
Returns: Array
- List of possible combinations.
Param | Type | Description |
---|---|---|
tokens | Array |
List of tokens to combine. |
prefix | String |
Additional prefix to add to each combination. |
sensemaker.createAgent(configuration) ⇒ Agent
Creates (and registers) a new Agent instance.
Kind: instance method of Sensemaker
Returns: Agent
- Instance of the Agent.
Param | Type | Description |
---|---|---|
configuration | Object |
Settings for the Agent. |
Provides a function to estimate the number of tokens in a given input string.
Kind: instance method of Sensemaker
Returns: Number
- Estimated number of tokens.
Param | Type | Description |
---|---|---|
input | String |
Input string to estimate. |
Extracts a list of important phrases from a given input string.
Kind: instance method of Sensemaker
Returns: Array
- List of important phrases in order of rank.
Param | Type | Default | Description |
---|---|---|---|
input | String |
Input string to analyze. | |
limit | Number |
5 |
Maximum number of phrases to return. |
Extracts a list of important words from a given input string.
Kind: instance method of Sensemaker
Returns: Array
- List of important words in order of rank.
Param | Type | Default | Description |
---|---|---|---|
input | String |
Input string to analyze. | |
limit | Number |
5 |
Maximum number of words to return. |
Extract a list of proper nouns from a given input string.
Kind: instance method of Sensemaker
Returns: Array
- List of proper nouns.
Param | Type | Description |
---|---|---|
input | String |
Input string to analyze. |
Extract a list of unique words from a given input string.
Kind: instance method of Sensemaker
Returns: Array
- List of unique words.
Param | Type | Description |
---|---|---|
input | String |
Input string to analyze. |
Sends a system-wide alert.
Kind: instance method of Sensemaker
Returns: Boolean
- Returns true
if the alert sent, false
otherwise.
Param | Type | Description |
---|---|---|
message | String |
Message to send in the alert. |
Generate a response to a given request.
Kind: instance method of Sensemaker
Returns: Promise
- Resolves with the response to the request.
Param | Type | Description |
---|---|---|
request | Object |
Request object. |
request.query | String |
Query text. |
[request.conversation_id] | String |
Unique identifier for the conversation. |
Retrieve a file by its database ID.
Kind: instance method of Sensemaker
Returns: Object
- File object.
Param | Type | Description |
---|---|---|
id | Number |
Database ID of the file. |
Start the process.
Kind: instance method of Sensemaker
Returns: Promise
- Resolves once the process has been started.
Stop the process.
Kind: instance method of Sensemaker
Returns: Promise
- Resolves once the process has been stopped.
Retrieve a conversation's messages.
Kind: instance method of Sensemaker
Returns: Array
- List of the conversation's messages.
Generate a response to a request.
Kind: instance method of Sensemaker
Param | Type | Description |
---|---|---|
request | SensemakerRequest |
The request. |
[request.room] | String |
Matrix room to retrieve conversation history from. |