Commit graph

57 commits

Author SHA1 Message Date
Daniel Chalef
bddd469167
Disable issue triage and daily maintenance workflows (#1089)
Remove automated issue triage and duplicate detection workflows to reduce
automated issue management.

- Remove .github/workflows/issue-triage.yml
- Remove .github/workflows/daily_issue_maintenance.yml

🤖 Generated with Claude Code

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-02 15:50:07 -08:00
Daniel Chalef
50659cc805
Disable fork PR comment job in workflow (#1047)
Disable fork PR comment job in Claude Code review workflow

The notify-external-contributor job fails with "Resource not accessible by integration" error when triggered by PRs from forks. GitHub security restrictions limit fork PRs to read-only GITHUB_TOKEN, preventing comment creation despite having pull-requests:write permissions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-05 08:31:06 -08:00
Daniel Chalef
9cc04e61c9
Fix MCP server release workflow to build all Dockerfile variants (#1037)
* conductor-checkpoint-start

* conductor-checkpoint-msg_0121yRVkMGS2UzMazKiZkgi4

* conductor-checkpoint-msg_01NvLs9EFt8qNiQqtYY8V9WV

* conductor-checkpoint-msg_013iKczSUmjtzPEdcgciXJUd

* conductor-checkpoint-msg_01BFgirbgmehsEGCMWjgSsnv

* conductor-checkpoint-msg_01TA4DYecHTJ36ndBsU9ooyf

* Fix critical issues in MCP release workflow

Address all critical review comments:

1. Fix malformed Docker tags
   - Change tag suffixes from colons to hyphens
   - standalone: 1.0.0-standalone (not 1.0.0:standalone)
   - combined: 1.0.0 and latest (not :latest)

2. Add checkout ref for manual triggers
   - Use inputs.tag for workflow_dispatch events
   - Ensures manual builds use correct tag ref

3. Add tag input validation
   - Validate tag format (mcp-vX.Y.Z) before processing
   - Provide clear error messages for invalid input

4. Fix release summary overwriting
   - Both matrix jobs now append to summary correctly
   - Each variant creates distinct summary section

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* conductor-checkpoint-msg_01H4GqBSkLiPgUfHGD57nq5V

* conductor-checkpoint-msg_01T2zdZLAZpVSip6EaiYa66k

* Address code review findings - fix critical checkout ref bug

Fix all critical and high-priority issues from code review:

1. Fix checkout ref logic (CRITICAL)
   - Simplified to: ref: ${{ inputs.tag || github.ref }}
   - Works correctly for both workflow_dispatch and push events
   - Removes conditional logic that would fail for manual triggers

2. Consolidate tag validation
   - Remove duplicate validation logic
   - Single validation path for both trigger types
   - Clearer error messages with received value

3. Add PyPI error handling
   - Use curl -sf for proper error codes
   - Validate GRAPHITI_VERSION is not empty
   - Exit with clear error if PyPI fetch fails

4. Improve docker-compose comments
   - Add concrete version tag examples
   - Show users how to pin specific versions
   - Clarify when local build vs registry pull is used

5. Update workflow_dispatch description
   - Clarify tag must already exist in repo
   - Prevent user confusion about tag creation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* conductor-checkpoint-msg_01KgG6FyiqNNdc51BCehNBjm

* Fix error handling bug in PyPI version fetch

The previous error handling was broken due to set -e causing
immediate exit, making the $? check unreachable.

Changes:
- Use set -eo pipefail for proper pipeline error handling
- Check command success with if ! command; then pattern
- Separate check for empty version string
- Both checks now properly reachable and functional

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-30 23:47:19 -07:00
Daniel Chalef
375023b9e8
feat: MCP Server v1.0.0 - Modular architecture with multi-provider support (#1024)
* feat: MCP Server v1.0.0rc0 - Complete refactoring with modular architecture

This is a major refactoring of the MCP Server to support multiple providers
through a YAML-based configuration system with factory pattern implementation.

## Key Changes

### Architecture Improvements
- Modular configuration system with YAML-based settings
- Factory pattern for LLM, Embedder, and Database providers
- Support for multiple database backends (Neo4j, FalkorDB, KuzuDB)
- Clean separation of concerns with dedicated service modules

### Provider Support
- **LLM**: OpenAI, Anthropic, Gemini, Groq
- **Embedders**: OpenAI, Voyage, Gemini, Anthropic, Sentence Transformers
- **Databases**: Neo4j, FalkorDB, KuzuDB (new default)
- Azure OpenAI support with AD authentication

### Configuration
- YAML configuration with environment variable expansion
- CLI argument overrides for runtime configuration
- Multiple pre-configured Docker Compose setups
- Proper boolean handling in environment variables

### Testing & CI
- Comprehensive test suite with unit and integration tests
- GitHub Actions workflows for linting and testing
- Multi-database testing support

### Docker Support
- Updated Docker images with multi-stage builds
- Database-specific docker-compose configurations
- Persistent volume support for all databases

### Bug Fixes
- Fixed KuzuDB connectivity checks
- Corrected Docker command paths
- Improved error handling and logging
- Fixed boolean environment variable expansion

Co-authored-by: Claude <noreply@anthropic.com>

* conductor-checkpoint-msg_01PmXwij9S976CQk798DJ4PH

* fix: Improve MCP server configuration and initialization

- Fix API key detection: Remove hardcoded OpenAI checks, let factories handle provider-specific validation
- Fix .env file loading: Search for .env in mcp_server directory first
- Change default transport to SSE for broader compatibility (was stdio)
- Add proper error handling with warnings for failed client initialization
- Model already defaults to gpt-4o as requested

These changes ensure the MCP server properly loads API keys from .env files
and creates the appropriate LLM/embedder clients based on configuration.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* conductor-checkpoint-msg_01PCGAWzQUbmh7hAKBvadbYN

* chore: Update default transport from SSE to HTTP

- Changed default transport to 'http' as SSE is deprecated
- Updated all configuration files to use HTTP transport
- Updated Docker compose commands to use HTTP transport
- Updated comments to reflect HTTP transport usage

This change ensures the MCP server uses the recommended HTTP transport
instead of the deprecated SSE transport.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* conductor-checkpoint-msg_01FErZjFG5iWrvbdUD2acQwQ

* chore: Update default OpenAI model to gpt-4o-mini

Changed the default LLM model from gpt-4o to gpt-4o-mini across all
configuration files for better cost efficiency while maintaining quality.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* conductor-checkpoint-msg_01FETp6u9mWAMjJAeT6WFgAf

* conductor-checkpoint-msg_01AJJ48RbkPaZ99G2GmE6HUi

* fix: Correct default OpenAI model to gpt-4.1

Changed the default LLM model from gpt-4o-mini to gpt-4.1 as requested.
This is the latest GPT-4 series model.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* conductor-checkpoint-msg_013HP1MYHKZ5wdTHHxrpBaT9

* fix: Update hardcoded default model to gpt-4.1 and fix config path

- Changed hardcoded default in schema.py from gpt-4o to gpt-4.1
- Fixed default config path to look in config/config.yaml relative to mcp_server directory
- This ensures the server uses gpt-4.1 as the default model everywhere

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* conductor-checkpoint-msg_01EaN8GZtehm8LV3a7CdWJ8u

* feat: Add detailed server URL logging and improve access information

- Added comprehensive logging showing exact URLs to access the MCP server
- Display localhost instead of 0.0.0.0 for better usability
- Show MCP endpoint, transport type, and status endpoint information
- Added visual separators to make server info stand out in logs

This helps users understand exactly how to connect to the MCP server
and troubleshoot connection issues.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* conductor-checkpoint-msg_01SNpbaZMdxWbefo2zsLprcW

* fix: Correct MCP HTTP endpoint path from / to /mcp/

- Remove incorrect /status endpoint reference
- Update logging to show correct MCP endpoint at /mcp/
- Align with FastMCP documentation standards

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* conductor-checkpoint-msg_01417YVh3s6afJadN5AM5Ahk

* fix: Configure consistent logging format between uvicorn and MCP server

- Use simplified format matching uvicorn's default (LEVEL message)
- Remove timestamps from custom logger format
- Suppress verbose MCP and uvicorn access logs
- Improve readability of server startup output

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* conductor-checkpoint-msg_014BF6Kzdy7qXc5AgC7eeVa5

* conductor-checkpoint-msg_01TscHXmijzkqcTJX5sGTYP8

* conductor-checkpoint-msg_01Q7VLFTJrtmpkaB7hfUzZLP

* fix: Improve test runner to load API keys from .env file

- Add dotenv loading support in test runner
- Fix duplicate os import issue
- Improve prerequisite checking with helpful hints
- Update error messages to guide users

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* conductor-checkpoint-msg_01NfviLNeAhFDA1G5841YKCS

* conductor-checkpoint-msg_015EewQhKbqAGSQkasWtRQjp

* fix: Fix all linting errors in test suite

- Replace bare except with except Exception
- Remove unused imports and variables
- Fix type hints to use modern syntax
- Apply ruff formatting for line length
- Ensure all tests pass linting checks

* conductor-checkpoint-msg_01RedNheKT4yWyXcM83o3Nmv

* fix: Use contextlib.suppress instead of try-except-pass (SIM105)

- Replace try-except-pass with contextlib.suppress in test_async_operations.py
- Replace try-except-pass with contextlib.suppress in test_fixtures.py
- Fixes ruff SIM105 linting errors

* conductor-checkpoint-msg_01GuBj69k2CsqgojBsGJ2zFT

* fix: Move README back to mcp_server root folder

The main README for the MCP server should be in the root of the mcp_server folder for better discoverability

* conductor-checkpoint-msg_01VsJQ3MgDxPwyb4ynvswZfb

* docs: Update README with comprehensive features and database options

- Add comprehensive features list including all supported databases, LLM providers, and transports
- Document Kuzu as the default database with explanation of its benefits and archived status
- Add detailed instructions for running with different databases (Kuzu, Neo4j, FalkorDB)
- Update transport references from SSE to HTTP (default transport)
- Add database-specific Docker Compose instructions
- Update MCP client configurations to use /mcp/ endpoint
- Clarify prerequisites to reflect optional nature of external databases
- Add detailed database configuration examples for all supported backends

* conductor-checkpoint-msg_018Z7AjbTkuDfhqdjB9iGbbD

* docs: Address README review comments

- Shorten Kuzu database description to be more concise
- Update Ollama model example to use 'gpt-oss:120b'
- Restore Azure OpenAI environment variables documentation
- Remove implementation details from Docker section (irrelevant to container users)
- Clarify mcp-remote supports both HTTP and SSE transports

Addresses review comments #1-7 on the PR

* conductor-checkpoint-msg_01QMeMEMe9rTVDgd8Ce5hmXp

* docs: Remove SSE transport reference from Claude Desktop section

Since the MCP server no longer supports SSE transport, removed the
mention of SSE from the mcp-remote description. The server only
uses HTTP transport.

Addresses review comment on line 514

* conductor-checkpoint-msg_01DNn76rvpx7rmTBwsUQd1De

* docs: Remove telemetry from features list

Telemetry is not a feature but a notice about data collection,
so it shouldn't be listed as a feature.

Addresses review comment on line 29

* conductor-checkpoint-msg_01Jcb8sm9bpqB9Ksz1W6YrSz

* feat: Update default embedding model to text-embedding-3-small

Replace outdated text-embedding-ada-002 with the newer, more efficient
text-embedding-3-small model as the default embedder. The new model
offers better performance and is more cost-effective.

Updated:
- config/config.yaml: Changed default model
- README.md: Updated documentation to reflect new default

* conductor-checkpoint-msg_016AXAH98nYKTj5WCueBubmA

* fix: Resolve database connection and episode processing errors

Fixed two critical runtime errors:

1. Database connection check for KuzuDB
   - KuzuDB session.run() returns None, causing async iteration error
   - Added special handling for KuzuDB (in-memory, no query needed)
   - Other databases (Neo4j, FalkorDB) still perform connection test

2. Episode processing parameter error
   - Changed 'episode_type' parameter to 'source' to match Graphiti API
   - Added required 'reference_time' parameter with current timestamp
   - Added datetime imports (UTC, datetime)

Errors fixed:
- 'async for' requires an object with __aiter__ method, got NoneType
- Graphiti.add_episode() got an unexpected keyword argument 'episode_type'

* conductor-checkpoint-msg_01JvcW97a4s3icDWFkhF3kEJ

* fix: Use timezone.utc instead of UTC for Python 3.10 compatibility

The UTC constant was added in Python 3.11. Changed to use
timezone.utc which is available in Python 3.10+.

Fixed ImportError: cannot import name 'UTC' from 'datetime'

* conductor-checkpoint-msg_01Br69UnYf8QXvtAhJVTuDGD

* fix: Convert entity_types from list to dict for Graphiti API

The Graphiti add_episode() API expects entity_types as a
dict[str, type[BaseModel]], not a list. Changed entity type
building to create a dictionary mapping entity names to their
Pydantic model classes.

Fixed error: 'list' object has no attribute 'items'

Changes:
- Build entity_types as dict instead of list in config processing
- Add fallback to convert ENTITY_TYPES list to dict if needed
- Map entity type names to their model classes

* conductor-checkpoint-msg_0173SR9CxbBH9jVWp8tLooRp

* conductor-checkpoint-msg_0169v3hqZG1Sqb13Kp1Vijms

* fix: Remove protected 'name' attribute from entity type models

Pydantic BaseModel reserves 'name' as a protected attribute. Removed
the 'name' attribute from dynamically created entity type models as
it's not needed - the entity type name is already stored as the class
name and dict key.

Fixed error: name cannot be used as an attribute for Requirement as
it is a protected attribute name.

* conductor-checkpoint-msg_0118QJWvZLyoZfwb1UWZqrRa

* conductor-checkpoint-msg_01B78jtT59YDt1Xm5hJpoqQw

* conductor-checkpoint-msg_01MsqeFGoCEXpoNMiDRM3Gjh

* conductor-checkpoint-msg_01SwJkCDAScffk8116KPVpTd

* conductor-checkpoint-msg_01EBWwDRC8bZ7oLYxsrmVnLH

* conductor-checkpoint-msg_01SAcxuF3eqtP4exA47CBqAi

* conductor-checkpoint-msg_011dRKwJM31K3ob9Gy4JCmae

* conductor-checkpoint-msg_018d52yUXdPF48UBWPQdiB4W

* conductor-checkpoint-msg_01MGFAenMDnTX3H9HSZEbj2T

* conductor-checkpoint-msg_01MHw4g8TicrXegSK9phncfw

* conductor-checkpoint-msg_018YrqWa3c2ZpkxemiiaE9tA

* conductor-checkpoint-msg_01SNsax9AwiCBFrC7Fpo7BNe

* conductor-checkpoint-msg_01K7QC1X8iPiYaMdvbi7WtR5

* conductor-checkpoint-msg_01KgGgzpbiuM31KWKxQhNBfY

* conductor-checkpoint-msg_01KL3wzQUn3gekDmznXVgXne

* conductor-checkpoint-msg_016GKc3DYwYUjngGw8pArRJK

* conductor-checkpoint-msg_01QLbhPMGDeB5EHbMq5KT86U

* conductor-checkpoint-msg_01Qdskq96hJ6Q9DPg1h5Jjgg

* conductor-checkpoint-msg_01JhPXYdc6HGsoEW2f1USSyd

* conductor-checkpoint-msg_018NLrtFxs5zfcNwQnNCfvNg

* conductor-checkpoint-msg_01G1G9J7cbupmLkyiQufj335

* conductor-checkpoint-msg_01BHEPsv2EML14gFa6vkn1NP

* conductor-checkpoint-msg_0127MeSvxWk8BLXjB5k3wDJY

* conductor-checkpoint-msg_018dRGHW6fPNqJDN6eV6SpoH

* conductor-checkpoint-msg_01CPPZ9JKakjsmHpzzoFVhaM

* conductor-checkpoint-msg_014jJQ4FkGU4485gF41K2suG

* conductor-checkpoint-msg_01MS72hQDCrr1rB6GSd3zy4h

* conductor-checkpoint-msg_01P7ur6mQEusfHTYpBrBnpk3

* conductor-checkpoint-msg_01JiEiEuJN3sQXheqMzCa6hX

* conductor-checkpoint-msg_01D7XfEJqzTeKGyuE5EFmjND

* conductor-checkpoint-msg_01Gn6qZrD3DZd8c6a6fmMap7

* conductor-checkpoint-msg_01Ji7gxCG4jR145rBAupwU49

* conductor-checkpoint-msg_01CYzyiAtLo95iVLeqWSuYiR

* conductor-checkpoint-msg_017fAeUG21Ym1EeofanFzFGa

* conductor-checkpoint-msg_013rt24pyzMHbrmEQein2dJJ

* conductor-checkpoint-msg_016bN3uyAxN28Rh8uvDpExit

* conductor-checkpoint-msg_017QV6m73ShaMBdQi7L3kmhP

* conductor-checkpoint-msg_01LUZ9XS7C1LCG6A1VFNcRL2

* conductor-checkpoint-msg_0136b9tNU5ko18T3PmRkW3LJ

* conductor-checkpoint-msg_018FX6Mibr66cKLnpL84f2Js

* conductor-checkpoint-msg_01WRZxPMQYjNEjcFNTMzWYeL

* conductor-checkpoint-msg_015Tbxjxrj6dynf7TbZscFD3

* conductor-checkpoint-msg_01ELC9AyZZGry9tN4XKrwEM6

* conductor-checkpoint-msg_01Jk4ugkAqMs4iRYWwnaNAHR

* conductor-checkpoint-msg_01NLStrCDq7HZJy3pKyGSqxM

* conductor-checkpoint-msg_01BFZEVpXbdxuXJguFH3caek

* Remove User and Assistant exception from Preference prioritization

* conductor-checkpoint-msg_01JP4eGXZfEjoSXWUwTHNYoJ

* Add combined FalkorDB + MCP server Docker image

- Created Dockerfile.falkordb-combined extending official FalkorDB image
- Added startup script to run both FalkorDB daemon and MCP server
- Created docker-compose-falkordb-combined.yml for simplified deployment
- Added comprehensive README-falkordb-combined.md documentation
- Updated main README with Option 4 for combined image
- Single container solution for development and single-node deployments

* conductor-checkpoint-msg_01PRJ1fre9d6J4qgBmCBQhCu

* Fix Dockerfile syntax version and Python compatibility

- Set Dockerfile syntax to version 1 as requested
- Use Python 3.11 from Debian Bookworm instead of 3.12
- Add comment explaining Bookworm ships with Python 3.11
- Python 3.11 meets project requirement of >=3.10
- Build tested successfully

* conductor-checkpoint-msg_011Thrsv6CjZKRCXvordMWeb

* Fix combined FalkorDB image to run both services successfully

- Override FalkorDB ENTRYPOINT to use custom startup script
- Use correct FalkorDB module path: /var/lib/falkordb/bin/falkordb.so
- Create config-docker-falkordb-combined.yaml with localhost URI
- Create /var/lib/falkordb/data directory for persistence
- Both FalkorDB and MCP server now start successfully
- Tested: FalkorDB ready, MCP server running on port 8000

* conductor-checkpoint-msg_01FT3bsTuv7466EvCeRtgDsD

* Fix health check to eliminate 404 errors

- Changed health check to only verify FalkorDB (redis-cli ping)
- Removed non-existent /health endpoint check
- MCP server startup is visible in logs
- Container now runs without health check errors

* conductor-checkpoint-msg_01KWBc5S8vWzyovUTWLvPYNw

* Replace Kuzu with FalkorDB as default database

BREAKING CHANGE: Kuzu is no longer supported. FalkorDB is now the default.

- Renamed Dockerfile.falkordb-combined to Dockerfile (default)
- Renamed docker-compose-falkordb-combined.yml to docker-compose.yml (default)
- Updated config.yaml to use FalkorDB with localhost:6379 as default
- Removed Kuzu from pyproject.toml dependencies (now only falkordb extra)
- Updated Dockerfile to use graphiti-core[falkordb] instead of [kuzu,falkordb]
- Completely removed all Kuzu references from README
- Updated README to document FalkorDB combined container as default
- Docker Compose now starts single container with FalkorDB + MCP server
- Prerequisites now require Docker instead of Python for default setup
- Removed old Kuzu docker-compose files

Running from command line now requires external FalkorDB instance at localhost:6379

* conductor-checkpoint-msg_014wBY9WG9GRXP7cUZ2JiqGz

* Complete Kuzu removal from MCP server

Removed all remaining Kuzu references from:
- Test fixtures (test_fixtures.py): Changed default database to falkordb, removed kuzu configuration
- Test runner (run_tests.py): Removed kuzu from database choices, checks, and markers
- Integration tests (test_comprehensive_integration.py): Removed kuzu from parameterized tests and environment setup
- Test README: Updated all examples and documentation to reflect falkordb as default
- Docker README: Completely rewrote to remove KuzuDB section, updated with FalkorDB combined image as default

All Kuzu support has been completely removed from the MCP server codebase. FalkorDB (via combined container) is now the default database backend.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* conductor-checkpoint-msg_01FAgmoDFBPETezbBr18Bpir

* Fix Anthropic client temperature type error

Fixed pyright type error where temperature parameter (float | None) was being passed directly to Anthropic's messages.create() method which expects (float | Omit).

Changes:
- Build message creation parameters as a dictionary
- Conditionally include temperature only when not None
- Use dictionary unpacking to pass parameters

This allows temperature to be properly omitted when None, rather than passing None as a value.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* conductor-checkpoint-msg_01KEuAQucnvsH94BwFgCAQXg

* Fix critical PR review issues

Fixed high-impact issues from PR #1024 code review:

1. **Boolean conversion bug (schema.py)**
   - Fixed _expand_env_vars returning strings 'true'/'false' instead of booleans
   - Now properly converts boolean-like strings (true/false/1/0/yes/no/on/off) to actual booleans
   - Simplified logic by removing redundant string-to-string conversions
   - Added support for common boolean string variations

2. **Dependency management (pyproject.toml)**
   - Removed pytest from main dependencies (now only in dev dependencies)
   - Moved azure-identity to optional dependencies under new [azure] group
   - Prevents forcing Azure and testing dependencies on all users

3. **Conditional Azure imports (utils.py)**
   - Made azure-identity import conditional in create_azure_credential_token_provider()
   - Raises helpful ImportError with installation instructions if not available
   - Follows lazy-import pattern for optional dependencies

4. **Documentation fix (graphiti_mcp_server.py)**
   - Fixed confusing JSON escaping in add_memory docstring example
   - Changed from triple-backslash escaping to standard JSON string
   - Updated comment to clarify standard JSON escaping is used

Issues verified as already fixed:
- Docker build context (all docker-compose files use context: ..)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* conductor-checkpoint-msg_013aEa7tUV8rEmfw38BzJatc

* Add comprehensive SEMAPHORE_LIMIT documentation

Added detailed documentation for SEMAPHORE_LIMIT configuration to help users optimize episode processing concurrency based on their LLM provider's rate limits.

Changes:

1. **graphiti_mcp_server.py**
   - Expanded inline comments from 3 lines to 26 lines
   - Added provider-specific tuning guidelines (OpenAI, Anthropic, Azure, Ollama)
   - Documented symptoms of too-high/too-low settings
   - Added monitoring recommendations

2. **README.md**
   - Expanded "Concurrency and LLM Provider 429 Rate Limit Errors" section
   - Added tier-specific recommendations for each provider
   - Explained relationship between episode concurrency and LLM request rates
   - Added troubleshooting symptoms and monitoring guidance
   - Included example .env configuration

3. **config.yaml**
   - Added header comment referencing detailed documentation
   - Noted default value and suitable use case

4. **.env.example**
   - Added SEMAPHORE_LIMIT with inline tuning guidelines
   - Quick reference for all major LLM provider tiers
   - Cross-reference to README for full details

Benefits:
- Users can now make informed decisions about concurrency settings
- Reduces likelihood of 429 rate limit errors from misconfiguration
- Helps users maximize throughput within their rate limits
- Provides clear troubleshooting guidance

Addresses PR #1024 review comment about magic number documentation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* conductor-checkpoint-msg_017netxNYzmam5Cu8PM2uQXW

* conductor-checkpoint-msg_012B8ESfBFcMeG3tFimpjbce

* conductor-checkpoint-msg_01Xe46bzgCGV4c8g4piPtSMQ

* conductor-checkpoint-start

* conductor-checkpoint-msg_01QPZK2pa2vUMpURRFmX93Jt

* conductor-checkpoint-msg_01UU5jQcfrW5btRJB3zy5KQZ

* conductor-checkpoint-msg_01884eN3wprtCkrEgEaRDzko

* conductor-checkpoint-msg_01GC2fQiu9gLGPGf8SvG5VW8

* conductor-checkpoint-msg_018ZD567wd4skoiAz7oML7WX

* conductor-checkpoint-msg_01C3AxzcQQSNZxJcuVxAMYpG

* conductor-checkpoint-msg_014w5iHAnv7mVkKfTroeNkuM

* docs: Add current LLM model reference to CLAUDE.md

Added comprehensive model reference section documenting valid model names for OpenAI, Anthropic, and Google Gemini as of January 2025.

OpenAI Models:
- GPT-5 family (reasoning models): gpt-5-mini, gpt-5-nano
- GPT-4.1 family (standard models): gpt-4.1, gpt-4.1-mini, gpt-4.1-nano
- Legacy models: gpt-4o, gpt-4o-mini

Anthropic Models:
- Claude 3.7 family (latest)
- Claude 3.5 family
- Legacy Claude 3 models

Google Gemini Models:
- Gemini 2.5 family (latest)
- Gemini 2.0 family (experimental)
- Gemini 1.5 family (stable)

This documents that model names like gpt-5-mini, gpt-4.1, and gpt-4.1-mini used throughout the codebase are valid OpenAI model identifiers, not errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* conductor-checkpoint-msg_014JsovjGyTM1mGwR1nVWLvX

* conductor-checkpoint-msg_013ooHLBEhPccaSY4cFse8vK

* conductor-checkpoint-msg_01WfmUCwXhWxEFtV7R3zJLwT

* conductor-checkpoint-msg_01SbjZ9mm9YwqeJHTDUDoKU8

* conductor-checkpoint-msg_01T2cR1aXUjNSegqzXQcW2jC

* conductor-checkpoint-msg_01EnQy5A9dMFD8F11hWKvzGo

* conductor-checkpoint-msg_01R1zsLmxvwjZ9SwKNhSnQAv

* refactor: Remove duplicate is_reasoning_model calculation in factories.py

* conductor-checkpoint-msg_015oLk8qck3TbfaCryY9gngJ

* conductor-checkpoint-msg_018YAxG5GsLq1dBMuGE6kwEJ

* conductor-checkpoint-msg_014fda5sUsvofb537BvqkuBY

* fix: Change default transport to http, mark SSE as deprecated

* conductor-checkpoint-msg_01S3x8oHkFTM2x4ZiT81QetV

* conductor-checkpoint-msg_01AVxUgejEA9piS6narw4omz

* conductor-checkpoint-msg_019W9KoNBmkobBguViYUj18s

* conductor-checkpoint-msg_01S2mYUmqLohxEmoZaNqsm2f

* conductor-checkpoint-msg_013ZGKfZjdDsqiCkAjAiuEk7

* fix: Handle default config path and empty env vars correctly

- Change default config path from 'config.yaml' to 'config/config.yaml'
- Fix env var expansion to return None for empty strings instead of False
- Prevents validation errors when optional string fields have unset env vars

* conductor-checkpoint-msg_01Bx1BqH3BaBxHMrnsbUQXww

* fix: Allow None for episode_id_prefix and convert to empty string

- Change episode_id_prefix type to str | None to accept None from YAML
- Add model_post_init to convert None to empty string for backward compatibility

* conductor-checkpoint-msg_01CXVkHJC8gp5i395MQMhp6D

* feat: Add helpful error message for database connection failures

- Catch Redis/database connection errors during initialization
- Provide clear, formatted error messages with startup instructions
- Include provider-specific guidance (FalkorDB vs Neo4j)
- Improves developer experience when database is not running

* conductor-checkpoint-msg_01Cd9u1z7pqmX1EG7vXXo4GA

* feat: Add specific Neo4j connection error message with startup instructions

* conductor-checkpoint-msg_01XgbmgFaUMPopni4Q8EhG23

* fix: Remove obsolete KuzuDB check from status endpoint

- Remove dead code checking for 'kuzu' provider (was removed)
- Simplify status check to use configured database provider directly
- Status now correctly reports neo4j or falkordb based on config

* conductor-checkpoint-msg_01WLjwygBwfvbJcVoUMDV3h6

* fix: Use service config instead of global config in status endpoint

- Changed status check to use graphiti_service.config.database.provider
- Ensures status reports the actual running database, not potentially stale global
- Fixes issue where status always reported falkordb regardless of config

* conductor-checkpoint-msg_01DoLD51xqrrdFvq3AgkYuQi

* conductor-checkpoint-msg_01EUW7ArnNM6kHCgFDrQZrro

* conductor-checkpoint-msg_01LqYK6nj1ZFfRNBRP15FMLo

* feat: Add standalone Dockerfile for external database deployments

- Create Dockerfile.standalone for MCP server without embedded FalkorDB
- Supports both Neo4j and FalkorDB via DATABASE_PROVIDER build arg
- Update docker-compose-neo4j.yml to use standalone Dockerfile
- Update docker-compose-falkordb.yml to use standalone Dockerfile
- Fixes issue where Neo4j compose was starting embedded FalkorDB
- Separate images: standalone-neo4j and standalone-falkordb

* conductor-checkpoint-msg_01QSHNgVZvF1id5UtLhpzuUa

* refactor: Unified standalone image with both Neo4j and FalkorDB drivers

- Modified Dockerfile.standalone to install both neo4j and falkordb extras
- Both compose files now use the same standalone image
- Config file determines which database to connect to at runtime
- Added build-standalone.sh script for building and pushing to DockerHub
- Image tags: standalone, {version}-standalone, {version}-graphiti-{core}-standalone

* conductor-checkpoint-msg_01H4isP3oHK25sGpVWzXq9kX

* fix: Correct config file paths in compose files

- Fix CONFIG_PATH env var: /app/config/config.yaml -> /app/mcp/config/config.yaml
- Fix volume mount path: /app/config/config.yaml -> /app/mcp/config/config.yaml
- Matches WORKDIR /app/mcp in Dockerfile.standalone
- Fixes issue where wrong config was being loaded

* conductor-checkpoint-msg_01Pv3Qj9UJJat288xZTsfCm3

* conductor-checkpoint-msg_01DkBq4kQA5Fdmxfikm8aBYG

* conductor-checkpoint-msg_01EBqphY68KNzRWei4QNpcYg

* feat: Add /health endpoint for Docker healthchecks

- Add @mcp.custom_route for /health endpoint using FastMCP
- Returns {status: 'healthy', service: 'graphiti-mcp'}
- Update Dockerfile.standalone healthcheck to use /health instead of /
- Eliminates 404 errors in logs from healthcheck pings
- Follows FastMCP best practices for operational monitoring

* conductor-checkpoint-msg_01UpNeurS45bREPEeGkV3uCx

* feat: Add logging to verify entity types are loaded from config

Added INFO level logging during GraphitiService initialization to confirm
that custom entity types from the configuration file are properly loaded.
This helps debug issues where the entity ontology may not be applied.

Logs the entity type names when custom types are present:
  INFO - Using custom entity types: Preference, Requirement, Procedure, ...

* fix: Correct logging message for entity types and add embedder logging

Fixed copy-paste error where entity types else clause was logging about
embedder client. Also added missing else clause for embedder client logging
for consistency.

- Fixed: "No Embedder client configured" -> "Using default entity types"
- Added: Missing embedder client else clause logging

* conductor-checkpoint-msg_01WMuxAzUnkpsa5WSXKMyLLP

* fix: Return JSONResponse from health check endpoint

Fixed TypeError in health check endpoint by returning a proper Starlette
JSONResponse object instead of a plain dict. Starlette custom routes require
ASGI-compatible response objects.

Error was: TypeError: 'dict' object is not callable

* conductor-checkpoint-msg_01CSgKFQaLsKVrBJAYCFoSGa

* conductor-checkpoint-msg_01SFY9xCnHxeCFGf53FESncs

* feat: Return complete node properties and exclude all embeddings

Enhanced node search results to include all relevant properties:
- Added `attributes` dict for custom entity properties
- Changed from single `type` to full `labels` array
- Added `group_id` for partition information
- Added safety filter to strip any keys containing "embedding" from attributes

Added format_node_result() helper function for consistent node formatting
that excludes name_embedding vectors, matching the pattern used for edges.

Embeddings are now explicitly excluded in all data returns:
- EntityNode: name_embedding excluded + attributes filtered
- EntityEdge: fact_embedding excluded (existing)
- EpisodicNode: No embeddings to exclude

This ensures clients receive complete metadata while keeping payload
sizes manageable and avoiding exposure of internal vector representations.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-30 22:59:01 -07:00
Daniel Chalef
c5714bb3b2
Potential fix for code scanning alert no. 24: Workflow does not contain permissions (#1036)
* Potential fix for code scanning alert no. 24: Workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Update .github/workflows/claude-code-review.yml

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-10-30 19:49:48 -07:00
Daniel Chalef
56694a6dea
Add automated FastAPI server container release workflow (#1031)
* conductor-checkpoint-start

* conductor-checkpoint-msg_01VhH9TifDw4FVprrPE6tss4

* conductor-checkpoint-msg_018cUkkzZNp3RFrut99UPoAJ

* conductor-checkpoint-msg_01S8GCTw5bowCWq4G2jATJ5s

* conductor-checkpoint-msg_01NoAtvCjfekKvenbTgGZtzt

* Fix critical issues in server container release workflow

Address all issues identified by code review:

1. **Dockerfile now installs from PyPI** - Changed from building local source to installing graphiti-core from PyPI, ensuring container matches published package
2. **Fixed version extraction** - Handle workflow_run context where tags aren't available, with pyproject.toml fallback
3. **Added BUILD_DATE and VCS_REF** - Pass all required build arguments to populate OCI labels
4. **Improved pre-release detection** - Enhanced regex to catch all Python patterns (a1, b2, dev0, etc.)
5. **Fixed checkout configuration** - Added fetch-depth: 0 and proper ref for workflow_run trigger

The container now truly uses the PyPI package, making the PyPI availability check meaningful.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* conductor-checkpoint-msg_01AuTTSKLm6XPqV4C5C2GL28

* Fix dependency installation order and optimize FalkorDB install

Address additional review concerns:

1. **Fix dependency installation order** - Install server deps first with uv sync, then upgrade graphiti-core to desired PyPI version using --upgrade flag. This prevents stale uv.lock (pinned to 0.13.2) from downgrading our target version.

2. **Optimize FalkorDB installation** - Combine graphiti-core installation with FalkorDB extra in single command, avoiding redundant package reinstall.

3. **Add --upgrade flag** - Ensures the specific PyPI version takes precedence over lockfile version.

The installation sequence is now:
- uv sync (server deps + graphiti-core 0.13.2 from lock)
- uv pip install --upgrade graphiti-core==TARGET_VERSION (upgrades to desired version)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-29 19:24:12 -07:00
Daniel Chalef
56f6d09df0
Add MCP server release workflow (#1025)
* conductor-checkpoint-start

* conductor-checkpoint-msg_01B1n4yHQFoVrWWdKcqPQ4Qa

* conductor-checkpoint-msg_01LS1v8ok5qtzAofv1TFRDHt

* conductor-checkpoint-msg_01H5pxrRKDpizF4wv1irnvRz

* conductor-checkpoint-msg_01EFo2gQBKSFkGcJoJ4bUWNS

* conductor-checkpoint-msg_01QW92pnqMv17sfV4CxFKn7Y

* conductor-checkpoint-msg_01VqPRMaBRGpBf9E8sdpPeFa

* Fix critical issues in MCP server release workflow

- Fix Docker tag format: use version only (0.4.0) instead of mcp-v0.4.0
- Add Python 3.11 setup for tomllib compatibility
- Add workflow_dispatch trigger for testing without creating tags
- Add conditional push logic for manual testing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Remove workflow_dispatch trigger from MCP server release

Simplify workflow to only trigger on mcp-v*.*.* tags.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* conductor-checkpoint-msg_019AX8ymwf9eec2KF979CJCM

* conductor-checkpoint-msg_01LMofTLUNkicSq5vpFmsd1C

* Add semantic version validation to MCP server release

Validate tag follows X.Y.Z format before processing.
Rejects malformed tags like mcp-v1.0 or mcp-v1.0.0.0.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* conductor-checkpoint-msg_01Ndj59qcprSNRfe3vuciwwA

* conductor-checkpoint-msg_01PmA8bfCLKv7yHiaBz2MypS

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-27 12:06:38 -07:00
Daniel Chalef
37a9ea65a2
Remove integration markers from database tests (#1000)
* Remove integration markers from database tests

Removed @pytest.mark.integration from database tests to allow them to run
while excluding API integration tests that call external services.

Database tests (now run):
- tests/test_edge_int.py
- tests/test_graphiti_int.py
- tests/test_node_int.py
- tests/test_entity_exclusion_int.py
- tests/cross_encoder/test_bge_reranker_client_int.py
- tests/driver/test_falkordb_driver.py

API integration tests (excluded):
- tests/llm_client/test_anthropic_client_int.py
- tests/utils/maintenance/test_temporal_operations_int.py

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Apply ruff formatting to falkordb driver and node queries

- Quote style fixes in falkordb_driver.py
- Trailing whitespace cleanup in node_db_queries.py
- Update uv.lock

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Remove api-integration-tests job from CI workflow

The api-integration-tests job has been removed since API integration tests
are now excluded via @pytest.mark.integration marker.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix database-integration-tests to run all database tests

Previously only ran test_graphiti_mock.py, now runs all database tests:
- tests/test_graphiti_mock.py
- tests/test_graphiti_int.py
- tests/test_node_int.py
- tests/test_edge_int.py
- tests/test_entity_exclusion_int.py
- tests/cross_encoder/test_bge_reranker_client_int.py
- tests/driver/test_falkordb_driver.py

The -m "not integration" filter excludes API integration tests that call
external services (Anthropic, OpenAI, etc).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Restore integration markers for tests that call LLM APIs

test_graphiti_int.py and test_entity_exclusion_int.py call graphiti.add_episode()
and graphiti.search_() which require LLM API calls, so they are API integration
tests, not pure database tests.

Final categorization:

Pure unit tests (no external dependencies):
- tests/llm_client/test_*.py (except test_anthropic_client_int.py)
- tests/embedder/test_*.py
- tests/utils/maintenance/test_*.py (except test_temporal_operations_int.py)
- tests/utils/search/search_utils_test.py
- tests/test_text_utils.py

Database tests (require Neo4j/FalkorDB, no API calls):
- tests/test_graphiti_mock.py
- tests/test_node_int.py
- tests/test_edge_int.py
- tests/cross_encoder/test_bge_reranker_client_int.py
- tests/driver/test_falkordb_driver.py

API integration tests (excluded via @pytest.mark.integration):
- tests/test_graphiti_int.py
- tests/test_entity_exclusion_int.py
- tests/llm_client/test_anthropic_client_int.py
- tests/utils/maintenance/test_temporal_operations_int.py

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-12 10:16:34 -07:00
Daniel Chalef
b7358e52eb
Secure Claude PR reviews with two-workflow approach (#999)
Fixes permission errors for fork PRs while maintaining security.

Changes:
- Split into automatic (internal) and manual (fork) workflows
- Add fork detection to prevent auto-review of external PRs
- Add security-hardened prompts preventing secret disclosure
- Create manual workflow for maintainer-triggered fork reviews
- Add friendly notification for external contributors

Security model:
- Internal PRs: Auto-reviewed (trusted contributors)
- Fork PRs: Human gate-keeping required before optional Claude review
- Prevents prompt injection attacks via untrusted PR content

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-12 09:41:13 -07:00
Daniel Chalef
e72f81092e
Separate unit, database, and API integration tests (#997)
* Separate unit and integration tests to allow external contributors

This change addresses the issue where external contributor PRs fail unit
tests because GitHub secrets (API keys) are unavailable to external PRs
for security reasons.

Changes:
- Split GitHub Actions workflow into two jobs:
  - unit-tests: Runs without API keys or database connections (all PRs)
  - integration-tests: Runs only for internal contributors with API keys
- Renamed test_bge_reranker_client.py to test_bge_reranker_client_int.py
  to follow naming convention for integration tests
- Unit tests now skip all tests requiring databases or API keys
- Integration tests properly separated into:
  - Database integration tests (no API keys)
  - API integration tests (requires OPENAI_API_KEY, etc.)

The unit-tests job now:
- Runs for all PRs (internal and external)
- Requires no GitHub secrets
- Disables all database drivers
- Excludes all integration test files
- Passes 93 tests successfully

The integration-tests job:
- Only runs for internal contributors (same repo PRs or pushes to main)
- Has access to GitHub secrets
- Tests database operations and API integrations
- Uses conditional: github.event.pull_request.head.repo.full_name == github.repository

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Separate database tests from API integration tests

Restructured the workflow into three distinct jobs:

1. unit-tests: Runs on all PRs, no external dependencies (93 tests)
   - No API keys required
   - No database connections required
   - Fast execution

2. database-integration-tests: Runs on all PRs with databases (NEW)
   - Requires Neo4j and FalkorDB services
   - No API keys required
   - Tests database operations without external API calls
   - Includes: test_graphiti_mock.py, test_falkordb_driver.py,
     and utils/maintenance tests

3. api-integration-tests: Runs only for internal contributors
   - Requires API keys (OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.)
   - Conditional execution for same-repo PRs only
   - Tests that make actual API calls to LLM providers

This ensures external contributor PRs can run both unit tests and
database integration tests successfully, while API integration tests
requiring secrets only run for internal contributors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Disable Kuzu in CI database integration tests

Kuzu requires downloading extensions from external URLs which fails in CI
environment due to network restrictions. Disable Kuzu for database and API
integration tests.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Use pytest -k filter to skip Kuzu tests instead of DISABLE_KUZU

The original workflow used -k "neo4j" to filter tests. Kuzu requires
downloading FTS extensions from external URLs which fails in CI. Use
-k "neo4j or falkordb" to run tests against available databases while
skipping Kuzu parametrized tests.

This maintains the same test coverage as the original workflow while
properly separating unit, database, and API integration tests.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Upgrade Kuzu to v0.11.3+ to fix FTS extension download issue

Kuzu v0.11.3+ has FTS extension pre-installed, eliminating the need to
download it from external URLs. This fixes the "Could not establish
connection" error when trying to download libfts.kuzu_extension in CI.

Changes:
- Upgrade kuzu dependency from >=0.11.2 to >=0.11.3
- Remove pytest -k filters to run all database tests (Neo4j, FalkorDB, Kuzu)
- FTS extension is now available immediately without network calls

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Move pure unit tests from database integration to unit test job

The reviewer correctly identified that test_bulk_utils.py,
test_edge_operations.py, and test_node_operations.py are pure unit tests
using only mocks - they don't require database connections.

Changes:
- Removed tests/utils/maintenance/ from ignore list (too broad)
- Added specific ignore for test_temporal_operations_int.py (true integration test)
- Moved test_bulk_utils.py, test_edge_operations.py, test_node_operations.py to unit tests
- Kept test_graphiti_mock.py in database integration (uses real graph_driver fixture)

This reduces database integration test time and properly categorizes tests.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Skip flaky LLM-based tests in test_temporal_operations_int.py

- test_get_edge_contradictions_multiple_existing
- test_invalidate_edges_partial_update

These tests rely on OpenAI LLM responses for edge contradiction detection and produce non-deterministic results.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Use pytest -k filter for API integration tests

Replace explicit file listing with `pytest tests/ -k "_int"` to automatically discover all integration tests in any subdirectory. This improves maintainability by eliminating the need to manually update the workflow when adding new integration test files.

Excludes:
- tests/driver/ (runs separately in database-integration-tests)
- tests/test_graphiti_mock.py (runs separately in database-integration-tests)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Rename workflow from "Unit Tests" to "Tests"

The workflow now runs multiple test types (unit, database integration, and API integration), so "Tests" is a more accurate name.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-12 09:07:24 -07:00
Daniel Chalef
35857fa211
Update issue triage workflow to allow non-write users for duplicate checks (#974) 2025-10-03 09:20:28 -07:00
Daniel Chalef
443f972f45
Refactor issue workflows for improved automation (#964)
- Consolidate issue-triage.yml and issue-deduplication.yml into single workflow with sequential jobs
- Create daily_issue_maintenance.yml with three jobs:
  - find-legacy-duplicates: Manual job to scan all open issues for duplicates
  - check-stale-issues: Daily job to request confirmation on issues >60 days old
  - close-unconfirmed-issues: Daily job to close issues without confirmation after 14 days
- Update triage to use gh CLI tools with database-specific labels (neo4j, falkordb, neptune)
- Separate deduplication into dedicated job using MCP GitHub tools
- Add "duplicate" label to both real-time and batch deduplication workflows
- Update claude-code-review.yml to use latest Sonnet model

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-02 11:37:19 -07:00
Daniel Chalef
4a9bcd5b10
Update Claude review prompt to focus on critical feedback (#960)
chore: Update Claude review prompt to focus on critical feedback only

Added instruction to eliminate positive feedback from code reviews, reducing noise and focusing on actionable improvements.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-01 13:31:05 -07:00
Daniel Chalef
119a43b8e4
Update cla.yml (#884) 2025-08-30 08:23:53 -07:00
Daniel Chalef
2541215698
Update claude-code-review.yml (#883) 2025-08-30 08:21:46 -07:00
Daniel Chalef
3dc2857077
Update claude-code-review.yml (#880) 2025-08-29 08:52:10 -07:00
Daniel Chalef
c5df6b591f
Update claude.yml (#877) 2025-08-28 20:58:00 -07:00
Daniel Chalef
9b14a110d3
Update claude-code-review.yml (#876) 2025-08-28 20:46:17 -07:00
Siddhartha Sahu
8802b7db13
Add support for Kuzu as the graph driver (#799)
* Fix FalkoDB tests

* Add support for graph memory using Kuzu

* Fix lints

* Fix queries

* Add tests

* Add comments

* Add more test coverage

* Add mocked tests

* Format

* Add mocked tests II

* Refactor community queries

* Add more mocked tests

* Refactor tests to always cleanup

* Add more mocked tests

* Update kuzu

* Refactor how filters are built

* Add more mocked tests

* Refactor and cleanup

* Fix tests

* Fix lints

* Refactor tests

* Disable neptune

* Fix

* Update kuzu version

* Update kuzu to latest release

* Fix filter

* Fix query

* Fix Neptune query

* Fix bulk queries

* Fix lints

* Fix deletes

* Comments and format

* Add Kuzu to the README

* Fix bulk queries

* Test all fields of nodes and edges

* Fix lints

* Update search_utils.py

---------

Co-authored-by: Preston Rasmussen <109292228+prasmussen15@users.noreply.github.com>
2025-08-27 11:45:21 -04:00
Daniel Chalef
b31e74e5d2
feat: Add GitHub AI Moderator for automated spam detection (#856)
feat: Add GitHub AI Moderator workflow

Add simple workflow configuration for GitHub's AI Moderator action to automatically detect spam in issues and comments.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-25 07:25:07 -07:00
Daniel Chalef
dcc9da3f68
chore/prepare kuzu integration (#762)
* Prepare code

* Fix tests

* As -> AS, remove trailing spaces

* Enable more tests for FalkorDB

* Fix more cypher queries

* Return all created nodes and edges

* Add Neo4j service to unit tests workflow

- Introduced Neo4j as a service in the GitHub Actions workflow for unit tests.
- Configured Neo4j with appropriate ports, authentication, and health checks.
- Updated test steps to include waiting for Neo4j and running integration tests against it.
- Set environment variables for Neo4j connection in both non-integration and integration test steps.

* Update Neo4j authentication in unit tests workflow

- Changed Neo4j authentication password from 'test' to 'testpass' in the GitHub Actions workflow.
- Updated health check command to reflect the new password.
- Ensured consistency across all test steps that utilize Neo4j credentials.

* fix health check

* Fix Neo4j integration tests in CI workflow

Remove reference to non-existent test_neo4j_driver.py file from test command.
Integration tests now run via parametrized tests using the drivers list.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add OPENAI_API_KEY to Neo4j integration tests

Neo4j integration tests require OpenAI API access for LLM functionality.
Add the secret environment variable to enable these tests to run properly.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix Neo4j Cypher syntax error in BFS search queries

Replace parameter substitution in relationship pattern ranges (*1..$depth)
with direct string interpolation (*1..{bfs_max_depth}). Neo4j doesn't allow
parameter maps in MATCH pattern ranges - they must be literal values.

Fixed in both node_bfs_search and edge_bfs_search functions.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix variable name mismatch in edge_bfs_search query

Change relationship variable from 'r' to 'e' to match ENTITY_EDGE_RETURN
constant expectations. The ENTITY_EDGE_RETURN constant references variable
'e' for relationships, but the query was using 'r', causing "Variable e
not defined" errors.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Isolate database tests in CI workflow

- FalkorDB tests: Add DISABLE_NEO4J=1 and remove Neo4j env vars
- Neo4j tests: Keep current setup without DISABLE_NEO4J flag

This ensures proper test isolation where each test suite only runs
against its intended database backend.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Siddhartha Sahu <sid@kuzudb.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-29 09:07:34 -04:00
Daniel Chalef
94df836396
Fix Claude actions (#693)
fix actions
2025-07-09 08:21:44 -07:00
Daniel Chalef
6b50f1eaab
Add Claude Code GitHub Workflow (#690)
* Claude PR Assistant workflow

* Claude Code Review workflow
2025-07-08 23:20:56 -07:00
Daniel Chalef
4652161c92
Add GitHub Actions workflow for building and pushing MCP Server Docker image (#656)
* Add GitHub Actions workflow for building and pushing MCP Server Docker image

This commit introduces a new workflow that triggers on changes to the pyproject.toml file in the main branch. It builds and pushes the Docker image to Docker Hub, extracting the version from the pyproject.toml and setting up necessary permissions and steps for the process.

* Add workflow_dispatch input to MCP Server Docker workflow

This commit adds an optional input parameter, `push_image`, to the GitHub Actions workflow for the MCP Server Docker image. This allows users to control whether to push the image to the registry during manual workflow dispatch, enhancing flexibility for testing purposes.

* Update Docker workflow conditions and increment version to 0.2.0

This commit modifies the MCP Server Docker workflow to include the `push_image` input conditionally for both pull requests and manual dispatches. Additionally, the version in `pyproject.toml` is updated from 0.1.0 to 0.2.0 to reflect the changes made.

* Remove unnecessary package write permission from MCP Server Docker workflow

* Add permissions for packages, actions, and security events in MCP Server Docker workflow

* Update MCP Server Docker workflow to use Ubuntu 24.04 for build environment

* Update MCP Server Docker workflow permissions to include id-token write access

* Remove unused cache configuration from MCP Server Docker workflow
2025-07-01 15:55:08 -07:00
Daniel Chalef
b3cd3e3206
Potential fix for code scanning alert no. 17: Workflow does not contain permissions (#651)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-06-30 13:04:58 -07:00
Daniel Chalef
c4bb1f6ef6
Potential fix for code scanning alert no. 18: Workflow does not contain permissions (#648)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-06-30 13:01:42 -07:00
Daniel Chalef
8213d10d44
migrate to pyright (#646)
* migrate to pyright

* Refactor type checking to use Pyright, update dependencies, and clean up code.

- Replaced MyPy with Pyright in configuration files and CI workflows.
- Updated `pyproject.toml` and `uv.lock` to reflect new dependencies and versions.
- Adjusted type hints and fixed minor code issues across various modules for better compatibility with Pyright.
- Added new packages `backoff` and `posthog` to the project dependencies.

* Update CI workflows to install all extra dependencies for type checking and unit tests

* Update dependencies in uv.lock to replace MyPy with Pyright and add nodeenv package. Adjust type hinting in config.py for compatibility with Pyright.
2025-06-30 12:04:21 -07:00
Gal Shubeli
6e6115c134
FalkorDB Integration: Bug Fixes and Unit Tests (#607)
* fixes-and-tests

* update-workflow

* lint-fixes

* mypy-fixes

* fix-falkor-tests

* Update poetry.lock after pyproject.toml changes

* update-yml

* fix-tests

* comp-tests

* typo

* fix-tests

---------

Co-authored-by: Guy Korland <gkorland@gmail.com>
2025-06-30 11:01:44 -04:00
Daniel Chalef
5e85337c82
Update release-graphiti-core.yml to python 3.11 (#639) 2025-06-27 14:27:21 -07:00
Daniel Chalef
a7ca777af5
migrate to uv (#634) 2025-06-27 12:12:49 -07:00
Daniel Chalef
efb185e347
Create codeql.yml (#580) 2025-06-12 19:04:34 -07:00
Pavlo Paliychuk
3f2ce765fe
chore: remove GitHub workflows for service build and release (#425)
Remove GitHub Actions workflows for building and releasing service images
2025-04-30 18:30:21 -04:00
Pavlo Paliychuk
5b24f591b1
chore: Do not build/start docker image on PRs (#386) 2025-04-21 21:37:25 -04:00
Pavlo Paliychuk
0661db0759
chore: clean up whitespace and cache settings in release-service-image.yml (#367)
Remove Docker cache config and fix formatting in GitHub Actions workflow
2025-04-16 19:27:36 -04:00
Daniel Chalef
aab53d6e73
chore: update CLA Assistant action and token in workflow (#364)
Update CLA workflow to use new GitHub Action version and adjust token usage to user PAT
2025-04-16 12:27:37 -07:00
Daniel Chalef
0f6ac57dab
chore: update version to 0.9.3 and restructure dependencies (#338)
* Bump version from 0.9.0 to 0.9.1 in pyproject.toml and update google-genai dependency to >=0.1.0

* Bump version from 0.9.1 to 0.9.2 in pyproject.toml

* Update google-genai dependency version to >=0.8.0 in pyproject.toml

* loc file

* Update pyproject.toml to version 0.9.3, restructure dependencies, and modify author format. Remove outdated Google API key note from README.md.

* upgrade poetry and ruff
2025-04-08 20:47:38 -07:00
Pavlo Paliychuk
8b72250f0b
chore: Add missing permissions in release image workflow (#194) 2024-10-21 10:07:51 -04:00
Pavlo Paliychuk
f52b45b9b2
Fix release workflow (#183)
* fix: Release workflow for service image

* fix: Add a on:workflow call trigger to build and start svc workflow
2024-10-08 17:48:15 -04:00
Pavlo Paliychuk
edfc7ac524
fix: Release workflow for service image (#182) 2024-10-08 17:40:17 -04:00
Pavlo Paliychuk
50f9418a30
chore: Add build and start CI workflow (#164)
* chore: Add build and start CI workflow

* chore: Fix docker-compose command

* chore: Fix healthcheck port

* fix: test docker compose setup

* chore: Simulate container start error

* chore: Always log service logs

* revert dev version changes, and simulate error in the healthcheck

* chore: Log docker logs only on failure, revert simulated error

* chore: Make release workflows depend on build and start workflow
2024-10-01 10:25:12 -04:00
Pavlo Paliychuk
790c37de38
chore: simplify Docker image release workflow (#158)
chore: Remove manual release trigger and set correct permissions on release action
2024-09-26 18:47:18 -04:00
Pavlo Paliychuk
66111a66db
chore: Update service readme (#93)
* chore: Update service readme

* Update README.md

* point to the image in server readme

* chore: Update readme + rename image to graphiti
2024-09-06 16:11:04 -04:00
Pavlo Paliychuk
c7fc057106
Fix manual image release workflow (#91)
* test

* test

* add latest tag

* chore: Remove debug statements

* fix push as latest manual dispatch option

* update

* add extract version from tag step
2024-09-06 12:31:19 -04:00
Pavlo Paliychuk
dbad8f4c78
Fix manual image release workflow (#90)
* test

* test

* add latest tag

* chore: Remove debug statements
2024-09-06 12:19:06 -04:00
Pavlo Paliychuk
ba48f64492
Add Fastapi graph service (#88)
* chore: Folder rearrangement

* chore: Remove unused deps, and add mypy step in CI for graph-service

* fix: Mypy errors

* fix: linter

* fix mypy

* fix mypy

* chore: Update docker setup

* chore: Reduce graph service image size

* chore: Install graph service deps on CI

* remove cache from typecheck

* chore: install graph-service deps on typecheck action

* update graph service mypy direction

* feat: Add release service image step

* chore: Update depot configuration

* chore: Update release image job to run on releases

* chore: Test depot multiplatform build

* update release action tag

* chore: Update action to be in accordance with zep image publish

* test

* test

* revert

* chore: Update python slim image used in service docker

* chore: Remove unused endpoints and dtos
2024-09-06 11:07:45 -04:00
Daniel Chalef
bcbdf31664
Update cla.yml - name of ellipsis bot (#65) 2024-08-27 19:20:46 -04:00
Pavlo Paliychuk
3f3fb60a55
feat: Add release workflow (#62) 2024-08-27 16:15:18 -04:00
Daniel Chalef
2d0705fc1b
Add get_nodes_by_query method to Graphiti class (#49)
* Add get_nodes_by_query method to Graphiti class

Add a method to the Graphiti class that wraps `get_relevant_nodes` and returns a list of nodes given a query.

* Add `get_nodes_by_query` method to the `Graphiti` class in `graphiti_core/graphiti.py`.
* Import `generate_embedding` from `graphiti_core/llm_client/utils.py`.
* Use `generate_embedding` to generate an embedding for the query.
* Call `get_relevant_nodes` with the generated embedding and return the relevant nodes.

Add an embedding function to `llm_client/utils.py`.

* Add `generate_embedding` function to `graphiti_core/llm_client/utils.py`.
* Accept an embedder and model_id as parameters.
* Generate an embedding for the given text and return it.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/getzep/graphiti?shareId=XXXX-XXXX-XXXX-XXXX).

* address comments left by @danielchalef on #49 (Add get_nodes_by_query method to Graphiti class);

* fix ellipsis name in cla config

* feat: Add get_nodes_by_query method to Graphiti class

* chore: Cleanup unused files, add hybrid node search, add tests

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: paulpaliychuk <pavlo.paliychuk.ca@gmail.com>
2024-08-26 20:00:28 -07:00
Daniel Chalef
06c3de87ee
Update cla.yml to add ellipsisdev[bot] to whitelist (#50) 2024-08-26 17:37:28 -07:00
Daniel Chalef
598e9fd0c5
Update cla.yml for dependabot[bot] whitelist (#47) 2024-08-26 16:04:41 -07:00