- Key Concepts
- Programming with Artificial Intelligence Using mimik ai
Programming with Artificial Intelligence Using mimik ai
Purpose
The purpose of this document is to provide the key concepts as well as an overview of how mimik ai can be used to incorporate artificial intelligence into mim OE programming.
Intended Readers
The intended readers of this document are software developers, system engineers, application architects, deployment and security personnel as well as other technical professionals who want to understand the details of incorporating artificial intelligence into the mimik ai programming experience.
What You Will Learn from this Document
After reading this document, you will:
- Understand the general framework of mimik ai, what it is and how it works.
- Understand the nature and use of a Coordinator Machine and Agent Machines
- The various ways that mimik ai implements support for artificial intelligence models.
- The purpose and use of the various edge microservices that interact with artificial intelligence models.
What You Need to Know Before You Start
In order to get the full benefit from reading this document, you need to have:
- A general understanding of what mim OE Runtime is and how it works.
- A general understanding of the edge Service Mesh and how it works.
- A general understanding of how artificial intelligence models work and how they are used in software applications.
Also, it's useful to have read the introduction article How Does mimik ai Integrate Artificial Intelligence with the mim OE Runtime.
Understanding the mimik ai Architecture and microservices
mimik ai is an enhancement to the mimik technology that allows for the incorporation of artificial intelligence models into mim OE programming. mimik ai publishes a number of microservices that can be used to interact with artificial intelligence models. These microservices are mILM
, mAIChain
, mModelStore
and mKB
. (The details of these microservices are described in sections to come.)
mimk ai uses the Coordinator Machine/Agent Machines design pattern.
A Coordinator Machine is a device running the mim OE Runtime. The Coordinator Machine will have an LLM installed as well as both the mILM
and mAIChain
edge microservices installed and running.
The purpose of the Coordinator Machine is to accept prompts from a user/client and then pass that prompt onto the Agent Machines are part of the mimik ai organizational unit called an Agent Collection.
An Agent Collection is a logical grouping of Agent Machines according to the model(s) running on the given machine. It is a named organizational unit. Thus, an Agent Collection is identified on a Coordinator Machine according to its name. The figure below describes three Agent Collections named single-agent-collection
, standard-node-nvidia-collection
and multi-agent-collection
.
A Coordinator Machine can be configured to declare one or many Agent Collections. The Coordinator will use a Agent Collection according to the collection's name.
An Agent Machine is a device running the mim OE Runtime. An Agent Machine will have a Large Language Model (LLM) installed. Also, an Agent Machine will have the mILM
edge microservice installed and running.
A developer deploys a number of constituent Agent Machines that are running the mim OE Runtime. As mentioned previously, each device will have one or more of the edge microservices installed. A device can have a given artificial intelligence model or vector database installed on it directly or the device can be configured to use a remote artificial intelligence accessed via an API hosted in the cloud. The devices are then connected to the edge Service Mesh by default. The devices can then interact with each other to share AI models and data.
After the constituent Agent Machines are deployed, the developer deploys the Coordinator Machine that has a edge microservice that sends information to and retrieves from the constituent Agent Machines. This information is then aggregated by the Coordinator Machine to create the "best possible response" to a given prompt. (See the diagram below.)
mimik ai provides developers with the capability to fine tune prompting behavior among constituent Agent Machines thus enabling analytic behavior that is focused to the knowledge domain of a particular use case and more sophisticated than what is possible with a single AI model.
The following table provides the details about the microservices that are published by mimik ai.
The edge Microservices delivered by mimik ai
Microservice | Description | |
---|---|---|
mILM | A microservice that exposes a discoverable API interacting with an LLM. The implementation can either be done by exposing an API of an LLM that runs in the same process or acting as a proxy for an LLM that runs in a different process and exposes a non-discoverable API. | Go to the release page HERE |
mAI (aka mAIChain) | An implementation of an AI chain as a microservice. mAI acts as a coordination agent in a collection of AI agents that perform specific tasks. mAI has no hardware constraints and can run on machines that also run other agents. There can be more than one mAI per collection of agents; mAI defines a specific goal when dealing with multiple agents. When the AI chain is well-defined, it is possible to have a configuration-based microservice. However, when dealing with complex interactions, the mAI will have a specific code to implement the AI chain. | Go to the release page HERE |
mKB | A microservice that uses a vector database to implement an augmented generation system. Documents are chunked and indexed by creating vector representations (embeddings) of the document. The result of the indexation is stored in a vector database. mKB is used in a collection of agents as an agent that has specific knowledge about a subject | Go to the release page HERE |
mModelStore | A microservice that stores AI models and exposes discoverable API to allow other components (mILM, for example) to fetch the model for its consumption. The component that fetches the model can be on the same machine or a different machine. | Go to the release page HERE |
mInsight | A microservice that allows a developer to access the context in which the node running mInsight is. It provides insights into AI agents’ interactions and their operating context. The context is based on three scopes: network, proximity, and account, and it contains the list of nodes with their attributes and the microservices (mKB, mAI, mILM, mModelStore, and others) running on each node. | Go to the release page HERE |
The Essential Benefits of mimik ai
In a general sense, mimik ai offers 5 key benefits. These are:
- Offline first
- AI to AI Discovery
- Zero Configuration AI Service Mesh
- Security and Privacy First
- On Device API Access
The details of these benefits are discussed in the following sections.
Offline first
mimik ai has the capability to run artificial intelligence models directly on standard computers or edge devices. This means that users can enjoy the benefits of doing AI processing on a local machine or local area network while not incurring the costs that go with using an online service. Also, devices running mim OE can use online AI APIs hosted in the cloud as well.
AI to AI Discovery
All devices enabled to use mim OE are part of the edge Service Mesh by default. This means that mim OE can support a variety of AI models that are distributed across the network. This allows for AI models to be discovered and used by other devices on the network. AI to AI discovery enables applications to use a cluster of AI models to determine the "best possible response" to a particular prompt.
Zero Configuration AI Service Mesh
All devices enabled to run mim OE are part of the edge Service Mesh by default. Other than doing the configuration tasks typically performed on device running within the edge Service Mesh, no additional configuration is required. This means that applications can interact with other devices on the edge Service Mesh according to proximity, network boundaries or account definition.
Security and Privacy First
Applications that run using mim OE enabled devices that are part of the edge Service Mesh are secure by default. This is because the edge Service Mesh is designed to be secure and private. This means that AI models can be shared and used across the network without compromising the security and privacy of the data that is being processed. All operations can be executed within a local area network and all communication between nodes is encrypted using mim OE's secure communication protocols.
On Device API Access
As mentioned above,a mim OE configured device can be configured to use an external AI API hosted in the cloud. This means that the device can use the AI API to perform AI processing on the device. This is useful when the device is not capable of running the AI model locally or when the device is not connected to the network
Key Takeaways
The import thing to understand about the mimik ai Key Concepts is the following:
- mimik ai enables programmers to create AI enabled applications that run within the edge Service Mesh
- Once the mim OE Runtime is installed on a computing device, after some basic configuration is executed, that device will automatically join the edge Service Mesh and be discoverable on the edge Service Mesh
- As long as a device is running the mim OE Runtime it can be a Coordinator Machine that interacts with one or many Agent Collections declared on the Coordinator Machine. Or the device can be an Agent Machine that is part of the one or many Agent Collections.
- The role of a Coordinator Machine is submit a prompt to an Agent Collection and then synthesize the prompt response from all the Agent Machines in an Agent Collection into a "best possible response".
- The role of an Agent Machine is to process a prompt received from a Coordinator Machine. An Agent Machine can run the
mILM
microservice which submits a prompt to an LLM stored locally on the Agent Machine. Or, the Agent Machine can runmKB
microservice which executes a prompt against a vector database stored on the Agent Machine. - mimik ai publishes the following microservices that enable AI capabilities on a give device. These microservices are: