Commit graph

119 commits

Author SHA1 Message Date
Boris Arzentar
af8c55e82b
version: 0.5.0.dev0 2025-11-24 16:16:47 +01:00
Daulet Amirkhanov
056424f244
feat: fs-cache (#1645)
<!-- .github/pull_request_template.md -->

## Description
<!--
Please provide a clear, human-generated description of the changes in
this PR.
DO NOT use AI-generated descriptions. We want to understand your thought
process and reasoning.
-->

Implement File-Based Version of the Redis Cache Adapter

Description and acceptance criteria:

This PR introduces a file-based cache adapter as an alternative to the
existing Redis-based adapter. It provides the same core functionality
for caching session data and maintaining context across multiple user
interactions but stores data locally in files instead of Redis.

Because the shared Kùzu lock mechanism relies on Redis, it is not
supported in this implementation. If a lock is configured, the adapter
will raise an error to prevent misconfiguration.

You can test this adapter by enabling caching with the following
settings:

caching=True
cache_backend="fs"

When running multiple searches in a session, the system should correctly
maintain conversational context. For example:

- What is XY?
- Are you sure?
- What was my first question?

In this case, the adapter should preserve previous user–Cognee
interactions within the cache file so that follow-up queries remain
context-aware.


## Type of Change
<!-- Please check the relevant option -->
- [ ] Bug fix (non-breaking change that fixes an issue)
- [x] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Other (please specify):

## Screenshots/Videos (if applicable)
<!-- Add screenshots or videos to help explain your changes -->

## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [x] **I have tested my changes thoroughly before submitting this PR**
- [x] **This PR contains minimal changes necessary to address the
issue/feature**
- [x] My code follows the project's coding standards and style
guidelines
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have added necessary documentation (if applicable)
- [x] All new and existing tests pass
- [x] I have searched existing PRs to ensure this change hasn't been
submitted already
- [x] I have linked any relevant issues in the description
- [x] My commits have clear and descriptive messages

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.

---------

Co-authored-by: Vasilije <8619304+Vasilije1990@users.noreply.github.com>
Co-authored-by: hajdul88 <52442977+hajdul88@users.noreply.github.com>
2025-11-12 15:34:30 +01:00
Igor Ilic
9951d16fd7 chore: Update version and lock files 2025-10-30 15:46:19 +01:00
Igor Ilic
e4019b3984 chore: Update cognee version 2025-10-29 20:56:02 +01:00
Igor Ilic
b2641b45cd chore: Update version and lock files 2025-10-27 16:52:53 +01:00
vasilije
74b14d82f7 uv lock 2025-10-22 22:27:21 +02:00
Daulet Amirkhanov
629f672af9 chore: bump fastapi minimum version to 0.116.2 2025-10-22 20:34:52 +01:00
hajdul88
8d9ee07083 chore: regenerating lock files 2025-10-22 15:31:57 +02:00
vasilije
0402619ed7 add merge 2025-10-21 07:24:12 +02:00
hajdul88
9821a01a47
feat: Redis lock integration and Kuzu agentic access fix (#1504)
<!-- .github/pull_request_template.md -->

## Description
This PR introduces a shared locked mechanism in KuzuAdapter to avoid use
case when multiple subprocesses from different environments are trying
to use the same Kuzu adatabase.

## Type of Change
<!-- Please check the relevant option -->
- [ ] Bug fix (non-breaking change that fixes an issue)
- [x] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [x] Performance improvement
- [ ] Other (please specify):

## Screenshots/Videos (if applicable)
None

## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [x] **I have tested my changes thoroughly before submitting this PR**
- [x] **This PR contains minimal changes necessary to address the
issue/feature**
- [x] My code follows the project's coding standards and style
guidelines
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have added necessary documentation (if applicable)
- [x] All new and existing tests pass
- [x] I have searched existing PRs to ensure this change hasn't been
submitted already
- [x] I have linked any relevant issues in the description
- [x] My commits have clear and descriptive messages

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.
2025-10-16 15:48:20 +02:00
Igor Ilic
417015d9a9 Merge branch 'dev' into embedding-rate-limiter 2025-10-14 20:39:10 +02:00
Igor Ilic
98daadbb04 refactor: Add tenacity retry mechanism 2025-10-14 20:29:55 +02:00
Daulet Amirkhanov
3fb241bd23 Merge remote-tracking branch 'origin/main' into merge-main-into-dev 2025-10-14 13:34:29 +01:00
Igor Ilic
255def5ba9 chore: Update poetry lock 2025-10-14 13:38:41 +02:00
Daulet Amirkhanov
612827b742 fix: bump kuzu to 0.11.3 2025-10-14 12:25:39 +01:00
Daulet Amirkhanov
10b35e0c3f Bump kuzu to 0.11.3 2025-10-14 12:12:26 +01:00
Igor Ilic
2b04a35309
chore: Update lock files (#1511)
<!-- .github/pull_request_template.md -->

## Description
update lock files

## Type of Change
<!-- Please check the relevant option -->
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Other (please specify):

## Screenshots/Videos (if applicable)
<!-- Add screenshots or videos to help explain your changes -->

## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [ ] **I have tested my changes thoroughly before submitting this PR**
- [ ] **This PR contains minimal changes necessary to address the
issue/feature**
- [ ] My code follows the project's coding standards and style
guidelines
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added necessary documentation (if applicable)
- [ ] All new and existing tests pass
- [ ] I have searched existing PRs to ensure this change hasn't been
submitted already
- [ ] I have linked any relevant issues in the description
- [ ] My commits have clear and descriptive messages

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.
2025-10-07 21:16:43 +02:00
Igor Ilic
e7709f7bd0
fix: Resolve issue with Kuzu graph database persistence on our local … (#1490)
…Docker

<!-- .github/pull_request_template.md -->

## Description
Resolves issue with kuzu graph data persistence for Cognee backend
docker

## Type of Change
<!-- Please check the relevant option -->
- [x] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Other (please specify):

## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [ ] **I have tested my changes thoroughly before submitting this PR**
- [ ] **This PR contains minimal changes necessary to address the
issue/feature**
- [ ] My code follows the project's coding standards and style
guidelines
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added necessary documentation (if applicable)
- [ ] All new and existing tests pass
- [ ] I have searched existing PRs to ensure this change hasn't been
submitted already
- [ ] I have linked any relevant issues in the description
- [ ] My commits have clear and descriptive messages

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.

---------

Co-authored-by: Boris <boris@topoteretes.com>
2025-10-07 20:38:43 +02:00
Igor Ilic
3b8b839057
fix: Resolve pydantic issue regarding deprecation (#1508)
<!-- .github/pull_request_template.md -->

## Description
Fix latest pydantic version issues

## Type of Change
<!-- Please check the relevant option -->
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Other (please specify):

## Screenshots/Videos (if applicable)
<!-- Add screenshots or videos to help explain your changes -->

## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [ ] **I have tested my changes thoroughly before submitting this PR**
- [ ] **This PR contains minimal changes necessary to address the
issue/feature**
- [ ] My code follows the project's coding standards and style
guidelines
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added necessary documentation (if applicable)
- [ ] All new and existing tests pass
- [ ] I have searched existing PRs to ensure this change hasn't been
submitted already
- [ ] I have linked any relevant issues in the description
- [ ] My commits have clear and descriptive messages

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.
2025-10-07 19:54:59 +02:00
Igor Ilic
38cdacbcb6
fix: Resolve issue with Gemini adapter (#1494)
<!-- .github/pull_request_template.md -->

## Description
Resolve Gemini Adapter issues:
 1. resolve embedding batch issue,
2. Resolve slowness because gemini tokenizer was sending word per word
to Googles API to count tokens (using OpenAI's local tokenizer to count
tokens for Gemini now)
 3. Update deprecated library and move to instructor

## Type of Change
<!-- Please check the relevant option -->
- [x] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Other (please specify):

## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [ ] **I have tested my changes thoroughly before submitting this PR**
- [ ] **This PR contains minimal changes necessary to address the
issue/feature**
- [ ] My code follows the project's coding standards and style
guidelines
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added necessary documentation (if applicable)
- [ ] All new and existing tests pass
- [ ] I have searched existing PRs to ensure this change hasn't been
submitted already
- [ ] I have linked any relevant issues in the description
- [ ] My commits have clear and descriptive messages

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.
2025-10-07 18:04:18 +02:00
Aniruddha Mandal
4412495d67 chore: update dependency specifications in pyproject.toml
- Changed "mistralai==1.9.10" to "mistralai>=1.9.10" for more flexible versioning.
- Removed "mistralai" from the optional dependencies under "mistral".
- Expanded the "docs" dependency to include "pdf" support.
2025-10-01 00:33:05 +05:30
Aniruddha Mandal
fedb945365 chore: remove uv.lock file
- Deleted the uv.lock file to streamline dependency management.
- This change may require regeneration of the lock file in future dependency updates.
2025-10-01 00:26:59 +05:30
Aniruddha Mandal
4e96e04405 chore: update dependencies in pyproject.toml and uv.lock
- Added "mistralai==1.9.10" to the dependencies in pyproject.toml.
- Updated sdist entries in uv.lock to remove unnecessary upload-time fields for various packages.
- Ensured consistency in package specifications across the project files.
2025-10-01 00:22:28 +05:30
EricXiao
4938ad9fe9 Merge branch 'dev' into feat/add-pdfproloader
Signed-off-by: EricXiao <taoiaox@gmail.com>
2025-09-30 17:08:28 +08:00
Aniruddha Mandal
3b57a3fcfe Merge branch 'dev' into feature/mistral_llm_provider 2025-09-29 13:08:08 +05:30
Igor Ilic
5528097e29 Merge branch 'main' into merge-main-vol6 2025-09-27 00:06:33 +02:00
Boris Arzentar
1deab2d54e
fix: limit onnxruntime version 2025-09-26 09:57:53 +02:00
Igor Ilic
f2edfaa9b9 refactor: Add scikit learn for evals 2025-09-25 17:23:14 +02:00
Igor Ilic
88655031ff chore: Remove scikit dependency 2025-09-25 17:14:56 +02:00
Igor Ilic
71e1070820 Merge branch 'dev' into pylance-fix 2025-09-25 17:08:28 +02:00
Igor Ilic
bb0ae06a0a Merge branch 'dev' of github.com:topoteretes/cognee into dev 2025-09-25 17:04:50 +02:00
Igor Ilic
bcc1747ab8 chore: resolve ruff v0.13.2 support issue 2025-09-25 17:02:58 +02:00
Igor Ilic
cf3f5945e7 chore: Limit pylance to 0.36 for MacOS13 2025-09-25 16:44:55 +02:00
Igor Ilic
61ef6fa444 chore: Update pyproject 2025-09-25 15:26:10 +02:00
Igor Ilic
8cbc3eb877 Merge branch 'dev' into COG-2826 2025-09-25 13:31:21 +02:00
Igor Ilic
e951a7956d fix: Resolve issue with MCP on main branch 2025-09-23 19:16:40 +02:00
Aniruddha Mandal
415f9fd0be Added Mistral support as LLM provider using litellm 2025-09-23 13:16:44 +05:30
EricXiao
86d40f1db9 Merge branch 'dev' into feat/add-pdfproloader
Signed-off-by: EricXiao <taoiaox@gmail.com>
2025-09-22 21:00:23 +08:00
Igor Ilic
023f5ea632 Merge branch 'dev' into baml-refactor 2025-09-22 11:25:59 +02:00
EricXiao
7fae75d020 make advanced pdf loader optional
Signed-off-by: EricXiao <taoiaox@gmail.com>
2025-09-22 15:07:58 +08:00
EricXiao
d12ec0bc4f Merge branch 'dev' into feat/add-pdfproloader
Signed-off-by: EricXiao <taoiaox@gmail.com>
2025-09-20 17:26:03 +08:00
EricXiao
6107cb47ca Implement Advanced PDF Loader with unstructured library support
- Added AdvancedPdfLoader class for enhanced PDF processing using the unstructured library.
- Integrated fallback mechanism to PyPdfLoader in case of unstructured library import failure or exceptions.
- Updated supported loaders to include AdvancedPdfLoader.
- Added unit tests for AdvancedPdfLoader to ensure functionality and error handling.
- Updated poetry.lock and pyproject.toml to include new dependencies and versions.

Signed-off-by: EricXiao <taoiaox@gmail.com>
2025-09-20 17:03:00 +08:00
Boris
88507cf903
Merge branch 'main' into dev 2025-09-19 17:27:48 +02:00
Boris Arzentar
6821f900ee
version: v0.3.4 2025-09-19 17:27:17 +02:00
Boris Arzentar
1a4061a009
version: v0.3.4.dev4 2025-09-18 20:00:05 +02:00
Boris Arzentar
236a84dd65
version: v0.3.4.dev3 2025-09-18 18:08:22 +02:00
Daulet Amirkhanov
f58ba86e7c
feat: add welcome tutorial notebook for new users (#1425)
<!-- .github/pull_request_template.md -->

## Description
<!-- 
Please provide a clear, human-generated description of the changes in
this PR.
DO NOT use AI-generated descriptions. We want to understand your thought
process and reasoning.
-->

Update default tutorial:
1. Use tutorial from [notebook_tutorial
branch](https://github.com/topoteretes/cognee/blob/notebook_tutorial/notebooks/tutorial.ipynb),
specifically - it's .zip version with all necessary data files
2. Use Jupyter Notebook `Notebook` abstractions to read, and map `ipynb`
into our Notebook model
3. Dynamically update starter notebook code blocks that reference
starter data files, and swap them with local paths to downloaded copies
4. Test coverage



| Before | After (storage backend = local) | After (s3) |
|--------|---------------------------------|------------|
| <img width="613" height="546" alt="Screenshot 2025-09-17 at 01 00 58"
src="https://github.com/user-attachments/assets/20b59021-96c1-4a83-977f-e064324bd758"
/> | <img width="1480" height="262" alt="Screenshot 2025-09-18 at 13 01
57"
src="https://github.com/user-attachments/assets/bd56ea78-7c6a-42e3-ae3f-4157da231b2d"
/> | <img width="1485" height="307" alt="Screenshot 2025-09-18 at 12 56
08"
src="https://github.com/user-attachments/assets/248ae720-4c78-445a-ba8b-8a2991ed3f80"
/> |



## File Replacements

### S3 Demo  

https://github.com/user-attachments/assets/bd46eec9-ef77-4f69-9ef0-e7d1612ff9b3

---

### Local FS Demo  

https://github.com/user-attachments/assets/8251cea0-81b3-4cac-a968-9576c358f334


## Type of Change
<!-- Please check the relevant option -->
- [ ] Bug fix (non-breaking change that fixes an issue)
- [x] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Other (please specify):

## Changes Made
<!-- List the specific changes made in this PR -->
- 
- 
- 

## Testing
<!-- Describe how you tested your changes -->

## Screenshots/Videos (if applicable)
<!-- Add screenshots or videos to help explain your changes -->

## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [ ] **I have tested my changes thoroughly before submitting this PR**
- [ ] **This PR contains minimal changes necessary to address the
issue/feature**
- [ ] My code follows the project's coding standards and style
guidelines
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added necessary documentation (if applicable)
- [ ] All new and existing tests pass
- [ ] I have searched existing PRs to ensure this change hasn't been
submitted already
- [ ] I have linked any relevant issues in the description
- [ ] My commits have clear and descriptive messages

## Related Issues
<!-- Link any related issues using "Fixes #issue_number" or "Relates to
#issue_number" -->

## Additional Notes
<!-- Add any additional notes, concerns, or context for reviewers -->

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.
2025-09-18 18:07:05 +02:00
Daulet Amirkhanov
9883c097ab
fix: make cognee -ui dependencies (api) part of core deps (#1439)
<!-- .github/pull_request_template.md -->

## Description
<!-- 
Please provide a clear, human-generated description of the changes in
this PR.
DO NOT use AI-generated descriptions. We want to understand your thought
process and reasoning.
-->

## Type of Change
<!-- Please check the relevant option -->
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Other (please specify):

## Changes Made
<!-- List the specific changes made in this PR -->
- 
- 
- 

## Testing
<!-- Describe how you tested your changes -->

## Screenshots/Videos (if applicable)
<!-- Add screenshots or videos to help explain your changes -->

## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [ ] **I have tested my changes thoroughly before submitting this PR**
- [ ] **This PR contains minimal changes necessary to address the
issue/feature**
- [ ] My code follows the project's coding standards and style
guidelines
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added necessary documentation (if applicable)
- [ ] All new and existing tests pass
- [ ] I have searched existing PRs to ensure this change hasn't been
submitted already
- [ ] I have linked any relevant issues in the description
- [ ] My commits have clear and descriptive messages

## Related Issues
<!-- Link any related issues using "Fixes #issue_number" or "Relates to
#issue_number" -->

## Additional Notes
<!-- Add any additional notes, concerns, or context for reviewers -->

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.
2025-09-18 17:37:08 +02:00
Boris Arzentar
bb124494c1
version: v0.3.4.dev2 2025-09-18 14:13:55 +02:00
Boris Arzentar
eefeae2460
chore: update lock file 2025-09-17 12:41:02 +02:00