Cogni is a new open-source AI memory framework that enables large language models to retain and connect information across multiple documents and sessions, overcoming the limitations of standard RAG by building a knowledge graph for persistent, intelligent context.
Mind Map
انقر للتوسيع
انقر لاستعراض خريطة الذهن التفاعلية الكاملة
We all know the challenges large
language models face when it comes to
context retention. Most of the time they
struggle to remember important details
over extended interactions. But now
there's a new and extremely fast way for
anyone to build AI agents with reliable
long-term memory. Not just standard RAG.
It's an AI memory framework that enables
large language models to remember,
understand, and connect information
across multiple documents. Instead of
treating each prompt as an isolated
request, it builds a memory layer
powered by a knowledge graph that
captures relationships, entities, and
[music] context. And this is where I
would like to introduce Cognney, the
next generation framework that
redefineses how AI memory truly works.
In essence, Cogni brings persistent
memory to AI agents that allows
applications to maintain context across
sessions while seamlessly interacting
with existing features, which is going
to make it intelligent contextware
systems that are easier to build than
ever before. What's also great is that
Cogni introduces advanced features that
make AI memory truly intelligent.
Starting with me, which automatically
structures your data into meaningful
concepts. There's temporal awareness.
This is where it helps your AI
understand how information evolves over
time, giving it context beyond a single
session. And with the new feedback
mechanism, your agent learns
continuously from your inputs, refining
its understanding just like a human. And
the best part is is that Cognney is an
open-source tool that you can easily get
started with with less than six lines of
code. This is something that you can
easily get started by having it
self-hosted or you can access it through
the cloud. Now, another way is simply
accessing it through Google Collab. And
that way you can test it out to see how
it performs with a couple of different
sorts of examples that they have. Just
take a look at this example as to how
Cognney brings semantic memory to AI
agents. We start by installing Cogni and
setting up a helper class to manage the
files, preview data, and handle the
visualizations. Then we create a small
developer data set which combines a
short intro coding conversations as well
as the Zen of Python principles. It also
includes an ontology file. Next, we
reset the memory with the prune command.
And then you can add your data using the
add command. And then with this, Cognney
then builds a knowledge graph with
Cognify. It is going to link the related
ideas through embeddings. We can also
visualize the graph to see how our data
connects, how it searches using natural
language, and even provide feedback. So,
Cognney learns and strengthens its
memory over time. In short, the notebook
is going to showcase how Cognney turns
plain text into dynamic variable
knowledge graphs, giving your AI agent
real context and recall. This is
something that you can get started with
today. And what's nice is that this
framework has a UI which is featuring
local and cloud notebooks and a built-in
graph explorer. So you can easily add
data, build memory graphs, and query
your AI memory. So it's easier to work
with the core ideas for your AI agent
with this userfriendly UI. But like I'd
mentioned, if you want to use the cloud
version, you can easily click on Cogni
Cloud and then you can sign up with
account and you can get started with it
on the web. But say if you want to use
the self-hosted method, which is
something that I'll be showcasing, we
will need to now work on making sure we
have all the prerequisites fulfilled.
Make sure you have Python 3.10 to 3.12
installed. And you can install it using
UV so it's contained in an environment.
Then simply go ahead and open up your
command prompt. And what you can now do
is copy this command with uv. And then
you can use the pip install command to
install all the packages for cogni to be
functional on your computer. After
installing, you can then set up the
basic usage where you set your open AI
API key or you can use other supported
providers from Azour open AAI to Google
Gemini or even local models through
Olama. Before we get started, I just
want to mention that you should
definitely go ahead and subscribe to the
world of AI newsletter. I'm constantly
posting different newsletters on a
weekly basis. So, this is where you can
easily get up-to-date knowledge about
what is happening in the AI space. So,
definitely go ahead and subscribe as
this is completely for free. But now we
can start working with Cognney via CLI
or through the UI which is something
that we'll showcase in a second. For
example, we can get started with the
basic commands like Cognney CLI and then
the next function which is to add
something to the memory layer. So for
example, you're giving Cogni some text
or some documents to remember. You can
use the add function for that and then
you can paste this within your terminal
and you can click on enter. This will
only work if you have Cogni installed as
well as have it linked to an API. So
right now it is adding it to the
database storage and you can see that it
has now ingested that context. Now what
you can also do is use the cognify
command. This is where cogni will
process the data that you have added and
it will build a structured knowledge
graph. This is where the relationships
between concepts are inferred and
stored. So now we can go back into the
terminal and paste this cognify command
within and it'll work on processing the
data for us. Now what we can do is use
the search function and this is where we
can actually query the knowledge graph
and return relevant information. It's
super simple guys. This is how easy
Cogni is. You can now have a fully
functional memory layer that is able to
refer with in-depth context and
afterwards you can then delete all the
context by refreshing it with the delete
all command. But now let's actually get
started with the UI cuz I believe it'll
be a lot easier for you to work with
Cognney's memory layer through this UI
and you will be able to now open it up
within your local host and it's super
easy to get started. This is the Cogni
local dashboard and essentially on the
left hand side is where you can add data
to Cognney. You can see there is an
example reference of a Python
development file with Cogni tutorial
that has been uploaded and it is
something that has listed down all the
different code cells, the markdown cells
and it gives you a good reference of
this document. There's also other
Cognney instances like the local Cognney
instance that you have it connected
with. You can add different data sets as
well to Cognney. You have the main data
set. You can also have it linked to the
cloud and this is where you can provide
your API key from their platform so that
you can connect it to the cloud. To get
started, we're going to add new data to
the data set. This is where we're adding
large amounts of context about the
channel and this is entailing a lot of
information of what the channel is
about, strategies of videos, thumbnails,
and etc. So we can go ahead and add the
selected files and it'll take a couple
of minutes to process and ingest it
within the memory system. So it looks
like my data has been uploaded. Now what
we can do is upload a new notebook. So
we can create one from scratch. We can
give it a name and within the main
notebook. We can go ahead and query our
data by simply running this first cell
of code. This is where it is going to be
able to use the knowledge graph based
off the memory layer that we have
configured and it is going to be able to
query it by running it. So within a
couple seconds that you can see that it
is able to run our knowledge base which
is the YouTube channel data set and you
can see that it is providing us the
context which talks about what our
YouTube channel is about and it also
creates the knowledge graph for us. If
you like this video and would love to
support the channel, you can consider
donating to my channel through the super
thanks option below. Or you can consider
joining our private Discord where you
can access multiple subscriptions to
different AI tools for free on a monthly
basis, plus daily AI news and exclusive
content, plus a lot more. This is just
one simple way for you to access the
memory layer using the UI. It is
something that goes further and beyond
as you can have it so that you can unify
your data files, code, docs and
conversations into searchable
intelligent memory. And not just that,
you can incorporate it within chat bots.
You can use it within coding assistance,
documentation intelligence, human
resources and so many other types of
methods. It is going to let you query in
natural language. You can uncover
patterns. You can align your work with
the best practices or expert
contributions. You can even ingest data,
build a knowledge graph, you can even
infer rules and you can have a
continuous improved result through
feedback. And for practical use cases,
like we had mentioned, you have so many
other methods where you can even ingest
it within an AI agent. So it has inbuilt
memory and it's able to query knowledge
bases research and it can even make your
project so much smarter, more consistent
and more context aware. Now I'll leave
all these links in the description below
so that you can easily get started. This
is a remarkable open-source tool.
There's a lot of resources that they
have that will showcase how you can
easily get started. But this is the
capability of Cognney. It is something
that will easily and greatly elevate
your project. But that's basically it,
guys. Thank you guys so much for
watching. Make sure you go ahead and
subscribe to the second channel, join
the newsletter, join our private
Discord, follow me on Twitter, and
lastly, make sure you guys subscribe,
turn on notification bell, like this
video, and please take a look at our
previous videos because there's a lot of
content that you'll truly benefit from.
With that thought, guys, have an amazing
day. Drop positivity, and I'll see you
انقر على أي نص أو طابع زمني للانتقال إلى تلك اللحظة في الفيديو
مشاركة:
معظم النصوص تصبح جاهزة في أقل من 5 ثوانٍ
نسخ بنقرة واحدة125+ لغةالبحث في المحتوىالانتقال إلى الطوابع الزمنية
الصق رابط YouTube
أدخل رابط أي فيديو YouTube للحصول على نصه الكامل
نموذج استخراج النص
معظم النصوص تصبح جاهزة في أقل من 5 ثوانٍ
احصل على إضافة Chrome
احصل على النصوص فوراً دون مغادرة YouTube. ثبّت إضافة Chrome للوصول بنقرة واحدة إلى نص أي فيديو مباشرةً من صفحة المشاهدة.