Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions agent_core/core/impl/event_stream/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def _log_to_files(self, kind: str, message: str) -> None:
Append an event to EVENT.md and optionally EVENT_UNPROCESSED.md.

This method is thread-safe and handles file I/O errors gracefully.
Events are written in the format: [YYYY/MM/DD HH:MM:SS] [kind]: message
Events are written in the format: [YYYY-MM-DD HH:MM:SS] [kind]: message

Args:
kind: Event category (e.g., "action", "trigger")
Expand All @@ -243,9 +243,9 @@ def _log_to_files(self, kind: str, message: str) -> None:
if not self._agent_file_system_path:
return

# Format: [YYYY/MM/DD HH:MM:SS] [kind]: message — LOCAL time, matching
# the loguru log files.
timestamp = datetime.now().astimezone().strftime("%Y/%m/%d %H:%M:%S")
# Format: [YYYY-MM-DD HH:MM:SS] [kind]: message — LOCAL time, in the
# canonical stamp format shared with MEMORY.md items.
timestamp = datetime.now().astimezone().strftime("%Y-%m-%d %H:%M:%S")
event_line = f"[{timestamp}] [{kind}]: {message}\n"

with self._file_lock:
Expand Down
5 changes: 4 additions & 1 deletion agent_core/core/impl/memory/bm25_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
BM25Okapi = None
_HAS_BM25 = False

from agent_core.core.impl.memory.tuning import BM25_SEARCH_TOP_K
from agent_core.utils.logger import logger


Expand Down Expand Up @@ -76,7 +77,9 @@ def rebuild(self, chunks: Dict[str, str]) -> None:
logger.warning(f"[BM25Index] Failed to build index: {e}")
self._bm25 = None

def search(self, query: str, top_k: int = 20) -> List[Tuple[str, float]]:
def search(
self, query: str, top_k: int = BM25_SEARCH_TOP_K
) -> List[Tuple[str, float]]:
"""Return ``[(chunk_id, score)]`` sorted high-to-low. Empty when index unavailable."""
if not query or not query.strip():
return []
Expand Down
152 changes: 0 additions & 152 deletions agent_core/core/impl/memory/entity_extractor.py

This file was deleted.

Loading