Phantasm offers open-source toolkits that allows you to create human-in-the-loop (HITL) workflows for modern AI agents. Phantasm comes with 3 main components that work together to create a seamless HITL experience:
Phantasm allows you to have an approval layer on top of your AI agents. This means, you're free to use any AI framework or model you see fit. By using Phantasm, you can delay the execution of certain business critical actions by your AI agents until a human approves them.
This is particularly useful in scenarios where the AI agent is not 100% accurate or the cost of making a mistake is high. For example, an AI agent that can automate calendar scheduling. In this case, you can use Phantasm to make sure that the AI agent schedules the right meetings at the right time.
Here's how it works under the hood:
Phantasm can also relay the action parameters to the approvers. This parameters can be modified by the approvers before approving the action. This is useful if there is only a slight mistake in the action parameters that can be corrected by the approvers. This way the action can be approved with some modifications instead of rejected.
The easiest way to get started with Phantasm is by using Docker. There are 2 components that you need to run before you can start using Phantasm: Server and Dashboard. To run these components, first, you need to pull the Docker images of these components.
These Docker images are hosted on GitHub Container Registry: Packages
docker pull ghcr.io/phantasmlabs/phantasm/dashboard:latest
docker pull ghcr.io/phantasmlabs/phantasm/server:latest
After pulling the images, you can run the components with these commands:
docker run -d -p 2515:2515 ghcr.io/phantasmlabs/phantasm/dashboard:latest
docker run -d -p 2505:2505 -p 2510:2510 ghcr.io/phantasmlabs/phantasm/server:latest start
After running the components, you will have access to:
You can use the dashboard to manage the approval workflows by adding a connection to Phantasm's Coordinator Server. The Receiver Server is used to receive the approval requests from the AI agents via Phantasm's client library. Depending on the programming language you use, you can choose the appropriate client library from the list below:
Phantasm is designed for real-time approval workflows for AI agents with some non-technical dependencies that could be unpredictable such as the availability of the approvers. Therefore, it is important to have good error handling and fallback mechanisms in place. Here are some edge cases that you should consider before using Phantasm in production:
To handle these edge cases, you can use the following strategies:
When sending an approval request using Phantasm, you can also send the action parameters and context to be relayed to the approvers. Most of the time, you want to use this feature to help the approvers make an informed decision. Parameters are usually the input values of the action while the context is the additional information that can help the approvers understand the action better.
Here are some best practices when sending parameters and context:
The easiest way to contribute to Phantasm is by starring the repository and sharing it with your colleagues. By doing so, you help us reach a wider audience and grow the community. If you are interested in contributing to the project in the form of code, design, or documentation, please read our Contributing Guidelines.
Other than the clients, which is licensed under the MIT License, Phantasm is licensed under the GNU General Public License v3.0. By contributing to the project, you agree to license your contributions under the applicable license. For more information, please read our licenses:
Phantasm is still in its early stages of development. Therefore, use it at your own risk. With that being said, we are actively working on improving the toolkits and adding essential features to make it more robust and secure. We will be happy if you actually use it and provide us with feedback to make it better.