- Built on a cognitive architecture
- Functions as the brain 🧠 of your own agent
- It has human-like short-term and long-term memory
- The memory is represented as a knowledge graph
- A graph database (JanusGraph + Cassandra) is used for persistence and fastgraph traversal
- The user does not have to know graph query languages, e.g., Gremlin, since HumemAI handles read from / write to the database
- The interface of HumemAI is natural language, just like a chatbot.
- This requires the Text2Graph and Graph2Text modules, which are part of HumemAI
- Everything is open-sourced, including the database
The humemai
Python package is available on the PyPI server. You can install it using pip
:
pip install humemai
For development purposes, use:
pip install 'humemai[dev]'
Supported Python Versions: Python >= 3.10
To set up Docker Compose, follow these steps:
sudo apt-get update
sudo apt-get install -y docker-compose
These two modules are critical in HumemAI. At the moment, they are achieved with LLM prompting, which is not ideal. They'll be replaced with Transformer and GNN based neural networks.
example-janus-agent.ipynb
: This Jupyter Notebook reads the Harry Potter book paragraph by paragraph and turns it into a knowledge graph. Text2Graph and Graph2Text are achieved with LLM prompting.- More to come ...
This project uses a docker-compose-cql-es.yml
file to set up a JanusGraph instance with Cassandra, Elasticsearch, and other supporting services.
- Unless you instantiate the
Humemai
class with a specifiedcompose_file_path
, it will always use the defaultdocker-compose-cql-es.yml
provided in the repository. - Port numbers, container names, and other configurations are currently fixed. Future updates will make these configurable for running multiple instances on the same machine.
- The Docker Compose file starts four Docker containers:
janusgraph
: The main JanusGraph instance.cassandra
: The backend storage for JanusGraph.elasticsearch
: The index/search backend for JanusGraph.janusgraph-visualizer
: A visualization tool for JanusGraph.
- Not all Docker images are the latest versions. Future work includes updating to the latest compatible versions.
Run the following command in the same directory as the docker-compose-cql-es.yml
file:
docker-compose -f docker-compose-cql-es.yml up -d
Verify the running containers:
docker ps
You should see containers named:
jce-janusgraph
jce-cassandra
jce-elastic
jce-visualizer
- JanusGraph Gremlin Server: Accessible at
localhost:8182
. - Elasticsearch: Accessible at
localhost:9200
. - Visualizer: Accessible at
http://localhost:3000
.
To stop the services:
docker-compose -f docker-compose-cql-es.yml down
If you want to remove the containers and associated volumes:
docker-compose -f docker-compose-cql-es.yml down --volumes
- Make port numbers, container names, and other configurations customizable.
- Update Docker images to the latest compatible versions.
- Add support for running multiple instances on the same machine.
HumemAI runs four docker containers with docker-compose and one of them is visualizer.
Open your browser and type http://localhost:3001/
. Rename "host" to jce-janusgraph
and query the graph.
Currently this is a one-man job. Click here to see the current progress.
Click on this link to see the HTML rendered docstrings
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Run
make test && make style && make quality
in the root repo directory, to ensure code quality. - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request