Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
af94012
added files
Vasilije1990 Jul 26, 2025
84ba0b2
fix cognify
Vasilije1990 Aug 4, 2025
1a15669
Merge branch 'dev' into add_cli
Vasilije1990 Aug 4, 2025
8590194
feat: add top_k input to SearchView and send to backend
Raj2604 Aug 5, 2025
e26c216
Merge branch 'dev' into feature/top_k-input
Raj2604 Aug 5, 2025
ff1614d
format
Vasilije1990 Aug 12, 2025
1de81c8
added fixes
Vasilije1990 Aug 12, 2025
b226595
added fix
Vasilije1990 Aug 12, 2025
e3bd474
git merge
Vasilije1990 Aug 12, 2025
a15cad0
Merge branch 'dev' into add_cli
Vasilije1990 Aug 12, 2025
ed555a7
feat: adds new Exception classes
hajdul88 Aug 13, 2025
0555dd9
Update __init__.py
hajdul88 Aug 13, 2025
1b3898d
feat: updates rel_db exceptions with the new error classes
hajdul88 Aug 13, 2025
b40dbf3
feat: adds new error classes to litellm instructor
hajdul88 Aug 13, 2025
623148e
feat: adds new errors to litellm client
hajdul88 Aug 13, 2025
7bd2660
feat: setting base classes of data exceptions to the new ones
hajdul88 Aug 13, 2025
6870bba
feat: adds new error to delete
hajdul88 Aug 13, 2025
ebd4403
adds new error classes to keywordextration error and defines new error
hajdul88 Aug 13, 2025
657c775
feat: adds configattributeerror
hajdul88 Aug 13, 2025
5bc00f1
feat: adds new search classes to search.py
hajdul88 Aug 13, 2025
9fb9f68
adds new base errors to retrieval exceptions
hajdul88 Aug 13, 2025
91b9c11
changes base class for vectordb exceptions
hajdul88 Aug 13, 2025
6dcd59c
feat: Adds changes to cognee graph part
hajdul88 Aug 13, 2025
32996aa
feat: adds new error classes to llm and databases + introduces loglev…
hajdul88 Aug 13, 2025
bed523a
feat: api error handling restruct
hajdul88 Aug 13, 2025
38329da
Merge branch 'dev' into feature/cog-2717-add-better-error-management-…
hajdul88 Aug 13, 2025
544e089
feat: removing invalidValueErrors
hajdul88 Aug 13, 2025
885f7c3
chore: fixing graph elements tests
hajdul88 Aug 13, 2025
d1bfeaa
fix: fixes search unit test error expectation
hajdul88 Aug 13, 2025
fabbd63
chore: renaming error
hajdul88 Aug 13, 2025
59c9204
Update exceptions.py
hajdul88 Aug 13, 2025
68327d3
chore: Changing base classes for exceptions that were already defined
hajdul88 Aug 13, 2025
da40365
ruff formatting
hajdul88 Aug 13, 2025
7af4775
chore: changed pypdf error base class
hajdul88 Aug 13, 2025
66d2c75
chore: changing docstring
hajdul88 Aug 13, 2025
8bd2416
chore: fixing delete exception import in dataset router
hajdul88 Aug 13, 2025
d14d31a
chore: updating delete_by_id test
hajdul88 Aug 13, 2025
748e9fa
feat: adds s3 file system not found error to ingestion
hajdul88 Aug 13, 2025
dbb967f
chore: updates neptune exception base + ruff
hajdul88 Aug 13, 2025
ca21122
Merge branch 'dev' into feature/cog-2717-add-better-error-management-…
hajdul88 Aug 14, 2025
c75f017
Merge branch 'dev' into feature/cog-2717-add-better-error-management-…
hajdul88 Aug 14, 2025
c99b453
feat: adds WrongDataDocumentError to classify documents
hajdul88 Aug 14, 2025
df3a3df
feat: adds errors to classify, and chunking top level
hajdul88 Aug 14, 2025
9f965c4
feat: adds input checks for extract graph from data
hajdul88 Aug 14, 2025
63d071f
feat: adds input checks for add datapoints and summarization tasks
hajdul88 Aug 14, 2025
affbc55
chore: ruff formatting
hajdul88 Aug 14, 2025
a7d7e12
ruff fix
hajdul88 Aug 14, 2025
dd6e26f
Merge remote-tracking branch 'origin/dev' into feature/cog-2717-add-b…
hajdul88 Aug 14, 2025
d884cc4
Merge branch 'dev' into feature/cog-2717-add-better-error-management-…
hajdul88 Aug 15, 2025
f5eecba
feat: add top_k-input and send it to backend
Raj2604 Aug 10, 2025
c606273
Refactor CI workflows to replace Poetry with uv for dependency manage…
daukadolt Aug 14, 2025
cb5590b
Update installation instructions and replace Poetry with uv across do…
daukadolt Aug 14, 2025
a1edfc9
docs: update README.md with new supported python versions
daukadolt Aug 14, 2025
1ab3328
fix: uv uninstalls rest of packages in some workflows
daukadolt Aug 14, 2025
bcdbadc
fix: unintentionally uninstall required deps when "uv sync"
daukadolt Aug 14, 2025
3941e46
chore: add step to rebuild uv lockfile in CI workflow
daukadolt Aug 15, 2025
4312508
undo: keep poetry-uv change limited to CI/CD fo now
daukadolt Aug 15, 2025
216ffd2
Refactor CI workflows to replace Poetry with uv (#1250)
Vasilije1990 Aug 15, 2025
81a1758
Remove NetworkX from cognee core.
misselvexu Aug 13, 2025
85c7f11
Keep networkx as core dependency
daukadolt Aug 15, 2025
50ebced
fix: natural_language_retriever.py
daukadolt Aug 15, 2025
8d045b9
chore: forgot to remove NetworkX check in NLPRetriever
daukadolt Aug 15, 2025
8825aaa
format: ruff format
daukadolt Aug 15, 2025
1ee697b
fix: Return distributed as part of Cognee build
dexters1 Aug 15, 2025
1e57ac9
fix: Return distributed as part of Cognee build (#1257)
Vasilije1990 Aug 15, 2025
271e7e9
feature: Introduces new error handling (4 base errors + specified hie…
Vasilije1990 Aug 15, 2025
86e5135
chore: Update Cognee version
dexters1 Aug 15, 2025
99a517d
chore: Update Cognee version (#1258)
dexters1 Aug 15, 2025
761bb1b
test: deprecate networkx_metrics_test.py
daukadolt Aug 15, 2025
5f7598d
test: use neo4j_metrics_test in descriptive tests instead of networkx
daukadolt Aug 15, 2025
e4e0512
feat: add reusable GitHub Action to set up Neo4j with Graph Data Scie…
daukadolt Aug 15, 2025
73e1aa7
Merge branch 'dev' into issues/1183
Vasilije1990 Aug 15, 2025
9987e05
Remove NetworkX from cognee core. (#1241)
Vasilije1990 Aug 15, 2025
b0e3f89
move to gpt5
Vasilije1990 Aug 17, 2025
c4ec679
Merge branch 'dev' into move_to_gpt5
Vasilije1990 Aug 17, 2025
1bd40f1
renamed max tokens
Vasilije1990 Aug 17, 2025
693c883
updated deepeval
Vasilije1990 Aug 17, 2025
abbce6e
fix: Move to gpt5 (#1262)
Vasilije1990 Aug 17, 2025
711c805
feat: adds cognee-user interactions to search
hajdul88 Aug 18, 2025
d53ebb2
Merge branch 'dev' into feature/cog-2734-cognee-feedbacks-interaction…
hajdul88 Aug 18, 2025
dc637f7
fix: fixes add datapoints params
hajdul88 Aug 18, 2025
fbb7d72
fix: ruff formatting
hajdul88 Aug 18, 2025
1d63da7
chore: removes duplicated func def
hajdul88 Aug 18, 2025
78fb415
chore: changes context return value in tests
hajdul88 Aug 18, 2025
b6be617
fix: fixes tests
hajdul88 Aug 18, 2025
0529d4b
fix: fixes kuzu and neo4j tests
hajdul88 Aug 18, 2025
9a46d14
chore: fix search db tests
hajdul88 Aug 18, 2025
fc43ac7
feat: adds user feedback search type
hajdul88 Aug 18, 2025
4d021ec
chore: fix openai version (#1266)
hajdul88 Aug 18, 2025
d4ace62
Merge branch 'dev' into feature/cog-2734-cognee-feedbacks-interaction…
hajdul88 Aug 18, 2025
0fbe218
chore: fixes ruff
hajdul88 Aug 18, 2025
fb51131
Merge branch 'dev' into add_cli
Vasilije1990 Aug 18, 2025
9017b63
simplify logging utils and refactor
Vasilije1990 Aug 18, 2025
9a17aa7
added fix
Vasilije1990 Aug 18, 2025
13e3e3b
added fix
Vasilije1990 Aug 18, 2025
cae173b
fix bug
Vasilije1990 Aug 18, 2025
d084d00
added tests
Vasilije1990 Aug 18, 2025
66d7fa9
fix tests
Vasilije1990 Aug 18, 2025
3152368
added fix
Vasilije1990 Aug 18, 2025
f5d702f
added fixes to integraton tests
Vasilije1990 Aug 19, 2025
fe6c900
added fix
Vasilije1990 Aug 19, 2025
372181d
fix: fixes unit test
hajdul88 Aug 19, 2025
fcdee16
feat: adds kuzu and neo4j tests for feedback and interaction features
hajdul88 Aug 19, 2025
4e31ae7
chore: deletes unused var from search test
hajdul88 Aug 19, 2025
e912b6f
fix: ensure connection check before executing checkpoint in KuzuAdapter
daukadolt Aug 19, 2025
c6ec22a
feat: adds scores to Feedback node
hajdul88 Aug 19, 2025
67c7919
fix: ensure connection check before executing checkpoint in KuzuAdapt…
Vasilije1990 Aug 19, 2025
bf1970b
feat: Add top_k Input Control to Search UI for Adjustable Graph Explo…
Vasilije1990 Aug 19, 2025
4a5d5f7
feat: adds feedback weights to edges
hajdul88 Aug 19, 2025
f5d8fc6
chore: ruff ruff
hajdul88 Aug 19, 2025
67d88c4
Merge branch 'dev' into feature/cog-2734-cognee-feedbacks-interaction…
hajdul88 Aug 19, 2025
b8cac4c
feat: adds weight test at the end of test_search_db
hajdul88 Aug 19, 2025
6d9a100
feature: Introduces Cognee-user interactions feature and feedback sea…
Vasilije1990 Aug 19, 2025
d69669b
added ability to send custom prompts to cognify
Vasilije1990 Aug 22, 2025
6d438c8
feat: Add dataset and pipeline status layer
dexters1 Aug 25, 2025
6f230c5
feature: adds environment_setup_and_checks general purpose layer to c…
hajdul88 Aug 25, 2025
a805c64
Fix, remove, improve cli tests.
siillee Aug 25, 2025
573e24f
Remove duplicate test files.
siillee Aug 25, 2025
d4b23aa
feat: Add process_pipeline_check
dexters1 Aug 25, 2025
9a4e8dd
refactor: Make the authorized_user_datasets function more understandable
dexters1 Aug 25, 2025
e85fd35
Fix linter error.
siillee Aug 25, 2025
a3d5164
Fix formatting. Potential fix to invalid api key error.
siillee Aug 25, 2025
66b8bb3
Another potential fix for the invalid API key error.
siillee Aug 25, 2025
31b33a9
Yet another potential fix for the invalid API key.
siillee Aug 25, 2025
4b593aa
And another potential fix for the API error.
siillee Aug 25, 2025
454358e
Solution for the API key error.
siillee Aug 25, 2025
de7a5a1
Fixed yml files
siillee Aug 25, 2025
dce525e
Fix again.
siillee Aug 25, 2025
cf7d41c
Fix
siillee Aug 26, 2025
a6a33e9
Feature/cog 2768 inspect cli tests fix failing ones (#1286)
Vasilije1990 Aug 26, 2025
950d29a
refactor: Update typing
dexters1 Aug 26, 2025
03fc3c8
Merge branch 'dev' into cognee-pipeline-layers
dexters1 Aug 26, 2025
d91b0f6
feature: adds pipeline execution layer to cognify (#1291)
hajdul88 Aug 26, 2025
42d33fc
fix: fixes search test behaviour and adds comments to new pipeline ex…
hajdul88 Aug 26, 2025
5ea3056
refactor: Rename auth layer
dexters1 Aug 26, 2025
0d77649
Merge branch 'cognee-pipeline-layers' of github.com:topoteretes/cogne…
dexters1 Aug 26, 2025
5771b36
feat: cognee pipeline layers (#1287)
dexters1 Aug 26, 2025
ea4f58e
feat: migrate pipeline input validation to a layer (#1284)
borisarzentar Aug 26, 2025
c013499
Fix tests failing for python 3.10
siillee Aug 26, 2025
007399b
feat: migrate pipeline status reset to add pipeline (#1289)
borisarzentar Aug 26, 2025
e5f0c22
Merge branch 'dev' into add_cli
Vasilije1990 Aug 26, 2025
d6e6e87
feat: Add cli (#1197)
Vasilije1990 Aug 26, 2025
8c69653
fix: Resolve issue with Windows path
dexters1 Aug 26, 2025
65542ec
refactor: Make CI/CD faster add more OS tests
dexters1 Aug 26, 2025
229a7a1
refactor: Speed up CI/CD execution time
dexters1 Aug 26, 2025
9c31617
fix: Resovle windows file path issue
dexters1 Aug 26, 2025
58655ca
refactor: Add proper path to test file
dexters1 Aug 26, 2025
6e5acec
refactor: make run_pipeline a high-level api for running pipelines (#…
borisarzentar Aug 27, 2025
23a46e5
Merge branch 'dev' into fix-windows-path
dexters1 Aug 27, 2025
ecc403e
fix: Add binary for python magic for windows os
dexters1 Aug 27, 2025
644116a
Merge branch 'fix-windows-path' of github.com:topoteretes/cognee into…
dexters1 Aug 27, 2025
eb65a89
fix: Resolve integration tests path issue
dexters1 Aug 27, 2025
23ea1c1
Potential fix for code scanning alert no. 187: Workflow does not cont…
dexters1 Aug 27, 2025
e4e1a54
refactor: Add read permissions only for gh token
dexters1 Aug 27, 2025
11934cd
fix: Resolve integration test issue
dexters1 Aug 27, 2025
3a3274b
Update .github/workflows/test_different_operating_systems.yml
dexters1 Aug 27, 2025
24c155b
fix: Resolve issue with Windows path (#1295)
Vasilije1990 Aug 27, 2025
62afced
feat: Added custom prompt to cognify (#1278)
Vasilije1990 Aug 27, 2025
d4ce0e1
Merge branch 'main' into merge-main-vol-6
dexters1 Aug 27, 2025
6ca46f1
refactor: ruff format
dexters1 Aug 27, 2025
328b75a
Merge main vol 6 (#1298)
Vasilije1990 Aug 27, 2025
5e6ada2
fix issue
Vasilije1990 Aug 27, 2025
792452b
added fix
Vasilije1990 Aug 27, 2025
75ea520
fix to cli
Vasilije1990 Aug 27, 2025
c933290
fixes to CLI
Vasilije1990 Aug 27, 2025
9df3466
format
Vasilije1990 Aug 27, 2025
19b59fc
Update Jupyter notebooks: added execution counts, improved logging ou…
daukadolt Aug 27, 2025
9f27402
Update Jupyter notebooks (#1299)
Vasilije1990 Aug 27, 2025
235015b
linter fix
Vasilije1990 Aug 27, 2025
cc5e684
added fix to tests
Vasilije1990 Aug 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
git merge
  • Loading branch information
Vasilije1990 committed Aug 12, 2025
commit e3bd4749cab2d4f21db3c54dde0bd0cbbbf488a6
15 changes: 12 additions & 3 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
################################################################################
# 🧠 LLM Settings
################################################################################
# Currently we support BAML and Instructor(using litellm) for structured outputs
STRUCTURED_OUTPUT_FRAMEWORK="instructor"

LLM_API_KEY="your_api_key"
LLM_MODEL="openai/gpt-4o-mini"
Expand All @@ -29,6 +31,13 @@ EMBEDDING_MAX_TOKENS=8191
# If embedding key is not provided same key set for LLM_API_KEY will be used
#EMBEDDING_API_KEY="your_api_key"

# If using BAML structured output these env variables will be used
BAML_LLM_PROVIDER=openai
BAML_LLM_MODEL="gpt-4o-mini"
BAML_LLM_ENDPOINT=""
BAML_LLM_API_KEY="your_api_key"
BAML_LLM_API_VERSION=""

################################################################################
# 🗄️ Relational database settings
################################################################################
Expand Down Expand Up @@ -62,6 +71,7 @@ GRAPH_DATABASE_PROVIDER="kuzu"
# -- To switch to Neo4j uncomment and fill these: -------------------------------------------------------------------
#GRAPH_DATABASE_PROVIDER="neo4j"
#GRAPH_DATABASE_URL=bolt://localhost:7687
#GRAPH_DATABASE_NAME="neo4j"
#GRAPH_DATABASE_USERNAME=neo4j
#GRAPH_DATABASE_PASSWORD=localneo4j

Expand All @@ -79,9 +89,8 @@ VECTOR_DB_KEY=
# 📂 ROOT DIRECTORY IF USING COGNEE LIB INSIDE A DOCKER
################################################################################
# Set up the Cognee system directory. Cognee will store system files and databases here.
DATA_ROOT_DIRECTORY='/cognee_data/data'
SYSTEM_ROOT_DIRECTORY='/cognee_data/system'

# DATA_ROOT_DIRECTORY='/Users/<user>/Desktop/cognee/.cognee_data/'
# SYSTEM_ROOT_DIRECTORY='/Users/<user>/Desktop/cognee/.cognee_system/'

################################################################################
# 🔄 MIGRATION (RELATIONAL → GRAPH) SETTINGS
Expand Down
38 changes: 36 additions & 2 deletions .github/workflows/basic_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,42 @@ jobs:
- name: Run Simple Examples
run: poetry run python ./examples/python/simple_example.py

simple-examples-baml:
name: Run Simple Examples BAML
runs-on: ubuntu-22.04
env:
STRUCTURED_OUTPUT_FRAMEWORK: "BAML"
BAML_LLM_PROVIDER: azure-openai
BAML_LLM_MODEL: ${{ secrets.LLM_MODEL }}
BAML_LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }}
BAML_LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
BAML_LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }}

LLM_PROVIDER: openai
LLM_MODEL: ${{ secrets.LLM_MODEL }}
LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }}
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }}

EMBEDDING_PROVIDER: openai
EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }}
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Cognee Setup
uses: ./.github/actions/cognee_setup
with:
python-version: ${{ inputs.python-version }}

- name: Run Simple Examples
run: poetry run python ./examples/python/simple_example.py

graph-tests:
name: Run Basic Graph Tests
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -174,5 +210,3 @@ jobs:

- name: Run Graph Tests
run: poetry run python ./examples/python/code_graph_example.py --repo_path ./cognee/tasks/graph


6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,17 @@ python cognee/cognee/tests/test_library.py

## 4. 📤 Submitting Changes

1. Push your changes:
1. Install ruff on your system
2. Run ```ruff format .``` and ``` ruff check ``` and fix the issues
3. Push your changes:
```shell
git add .
git commit -s -m "Description of your changes"
git push origin feature/your-feature-name
```

2. Create a Pull Request:
- Go to the [**cognee** repository](https://github.com/topoteretes/cognee)
- Go to the [**cognee** repository](https://github.com/topoteretes/cognee) or [cognee community repository](https://github.com/topoteretes/cognee-community)
- Click "Compare & Pull Request" and open a PR against dev branch
- Fill in the PR template with details about your changes

Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ COPY alembic/ /app/alembic
# Then, add the rest of the project source code and install it
# Installing separately from its dependencies allows optimal layer caching
COPY ./cognee /app/cognee
COPY ./distributed /app/distributed
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --extra debug --extra api --extra postgres --extra qdrant --extra neo4j --extra llama-index --extra gemini --extra ollama --extra mistral --extra groq --extra anthropic --frozen --no-dev --no-editable

Expand Down
Binary file modified assets/cognee_benefits.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions cognee-mcp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ RUN apt-get update && apt-get install -y \

WORKDIR /app

# Copy the virtual environment from the uv stage
COPY --from=uv /usr/local /usr/local
COPY --from=uv /app /app

Expand Down
6 changes: 3 additions & 3 deletions cognee-mcp/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ if [ "$ENVIRONMENT" = "dev" ] || [ "$ENVIRONMENT" = "local" ]; then
if [ "$DEBUG" = "true" ]; then
echo "Waiting for the debugger to attach..."
if [ "$TRANSPORT_MODE" = "sse" ]; then
exec python -m debugpy --wait-for-client --listen 0.0.0.0:$DEBUG_PORT -m cognee --transport sse --no-migration
exec python -m debugpy --wait-for-client --listen 0.0.0.0:$DEBUG_PORT -m cognee --transport sse --host 0.0.0.0 --port $HTTP_PORT --no-migration
elif [ "$TRANSPORT_MODE" = "http" ]; then
exec python -m debugpy --wait-for-client --listen 0.0.0.0:$DEBUG_PORT -m cognee --transport http --host 0.0.0.0 --port $HTTP_PORT --no-migration
else
exec python -m debugpy --wait-for-client --listen 0.0.0.0:$DEBUG_PORT -m cognee --transport stdio --no-migration
fi
else
if [ "$TRANSPORT_MODE" = "sse" ]; then
exec cognee --transport sse --no-migration
exec cognee --transport sse --host 0.0.0.0 --port $HTTP_PORT --no-migration
elif [ "$TRANSPORT_MODE" = "http" ]; then
exec cognee --transport http --host 0.0.0.0 --port $HTTP_PORT --no-migration
else
Expand All @@ -65,7 +65,7 @@ if [ "$ENVIRONMENT" = "dev" ] || [ "$ENVIRONMENT" = "local" ]; then
fi
else
if [ "$TRANSPORT_MODE" = "sse" ]; then
exec cognee --transport sse --no-migration
exec cognee --transport sse --host 0.0.0.0 --port $HTTP_PORT --no-migration
elif [ "$TRANSPORT_MODE" = "http" ]; then
exec cognee --transport http --host 0.0.0.0 --port $HTTP_PORT --no-migration
else
Expand Down
13 changes: 7 additions & 6 deletions cognee-mcp/src/codingagents/coding_rule_associations.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

from cognee.infrastructure.databases.graph import get_graph_engine
from cognee.infrastructure.databases.vector import get_vector_engine
from cognee.infrastructure.llm.prompts import render_prompt

from cognee.low_level import DataPoint
from cognee.infrastructure.llm.get_llm_client import get_llm_client
from cognee.infrastructure.llm import LLMGateway
from cognee.shared.logging_utils import get_logger
from cognee.modules.engine.models import NodeSet
from cognee.tasks.storage import add_data_points, index_graph_edges
Expand Down Expand Up @@ -91,16 +91,17 @@ async def get_origin_edges(data: str, rules: List[Rule]) -> list[Any]:


async def add_rule_associations(data: str, rules_nodeset_name: str):
llm_client = get_llm_client()
graph_engine = await get_graph_engine()
existing_rules = await get_existing_rules(rules_nodeset_name=rules_nodeset_name)

user_context = {"chat": data, "rules": existing_rules}

user_prompt = render_prompt("coding_rule_association_agent_user.txt", context=user_context)
system_prompt = render_prompt("coding_rule_association_agent_system.txt", context={})
user_prompt = LLMGateway.render_prompt(
"coding_rule_association_agent_user.txt", context=user_context
)
system_prompt = LLMGateway.render_prompt("coding_rule_association_agent_system.txt", context={})

rule_list = await llm_client.acreate_structured_output(
rule_list = await LLMGateway.acreate_structured_output(
text_input=user_prompt, system_prompt=system_prompt, response_model=RuleSet
)

Expand Down
3 changes: 3 additions & 0 deletions cognee-mcp/src/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,9 @@ async def main():

args = parser.parse_args()

mcp.settings.host = args.host
mcp.settings.port = args.port

if not args.no_migration:
# Run Alembic migrations from the main cognee directory where alembic.ini is located
logger.info("Running database migrations...")
Expand Down
Loading
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.