In working on AI systems and experiences and leveraging LLMs to rapidly create few-shot learning systems for a variety of purposes, we started trying to connect outputs from one model to the inputs of another. However, chaining and combining these systems is hard and complicated in code. This inspired Thoth, a node-based programming environment for connecting and building interconnected AI systems and data pipelines. It allows individuals to combine and program AI systems for a variety of use cases, and makes it easy to run these pipelines, which we call ‘spells, anywhere.
Many companies are now looking to use Thoth to build systems that they can leverage it as a primary value proposition for their companies. By putting Thoth onto the IC, we solve the deployment problem for all of these individuals and companies, and we make the tool more accessible for others. We can allow individuals and businesses to focus on creating their Spells which create value rather than worrying about maintaining and building the infrastructure required to power a tool like Thoth. It opens the way for DApps to leverage truly world class AI.
What it does
Thoth is a node-based flow programming environment designed to chain together AI systems with business logic and other service integrations. Thoth will be deployed to the IC and enable people to mint “spells”. A Spell is a graph that represents the totality of the work and can be run in a multitude of environments. Thoth provides a backend where spells can be run, calling external AI systems and other services, to accomplish almost any kind of task, such as AI data processing, pipelines, AI brains for Metaverse characters, etc. These spells can work off a normal REST call/response model, or they can also be modelled and deployed as streaming pipelines for real-time event processing and signalling.
This phase of the project consists of the following features:
- Thoth react front-end hosted directly on a canister
- Plug wallet sign-in for user authentication
- metadata “Spells” minted as DIP721v2 NFTs and registered with DAB
- loading NFT spells back into the client
How we built it
The program is built using mainly react and TypeScript and the open-source graph library called Rete js. Thoth can export a JSON object which represents the work to be done. These spells can be minted into NFTs and sent to other users to load into their Thoth session. It leverages a variety of plug, DAB, and DIP721v2 functions in order to work. A canister needed to be registered to the DAB registry in order to have full functionality. Mint functions needed to be done using DIP721v2 so we had to upgrade to that. Overall it was built by team effort and effective collaboration.
Challenges we ran into
1) Larger package sizes from Webpack bundles created a load issue from canisters. We had to shrink the bundles to get loading working
2) Interaction with a traditional backend and loading NFT spells up was time-consuming, and would be improved
Accomplishments that we're proud of
We are proud that we have DIP721v2 functions and minting functions working from the UI. The ability to mint and share spells with others gives a wider degree of usability of Thoth by people to share their creations and leverage the work of other people in the network.
What we learned
We learned that the Internet Computer has some limitations that will require further development to solve. Through our work together, we were able to identify these limitations and develop strategies to overcome them. This experience has taught us the value of collaboration in problem-solving and we will carry this lesson forward into future endeavours.
What's next for Thoth Spell Minter
This is only the beginning for Thoth on the IC. The long-term goal is to create a layer 2 on top of the IC where users can register Agent Runners. These runners will be able to host deployed spells to do any kind of AI work. Spells cost of running would be auto computed from the spell graph so runners could be paid for the work they do. These runners would then be used to power the metaverse with AI, including as Autonomous AI Agents. These agents not only connect to the metaverse but all across social media and other communications channels to create a network of agent-centric services. These Agents would then be sold and distributed on a decentralized marketplace to provide computing through agent runners, individual components for Thoth, services of various kinds, and AI brains.