cognee - AI 에이전트를 위한 메모리, 단 5줄의 코드로 구현
Demo . Learn more · Join Discord · Join r/AIMemory
확장 가능하고 모듈화된 ECL(추출, 인지화, 로드) 파이프라인을 사용하여 에이전트를 위한 동적 메모리를 구축하고 RAG를 대체하세요.
🌐 Available Languages : Deutsch | Español | français | 日本語 | 한국어 | Português | Русский | 中文
Google Colab notebook, Deepnote notebook 또는 스타터 리포지토리로 빠르게 시작하세요.
여러분의 기여는 이 프로젝트를 진정한 오픈 소스로 만드는 핵심입니다. 모든 기여는 대단히 감사하게 생각합니다. 자세한 내용은 CONTRIBUTING.md
를 참조하세요.
pip, poetry, uv 또는 기타 파이썬 패키지 관리자를 사용하여 Cognee를 설치할 수 있습니다. Cognee는 Python 3.8부터 3.12까지 지원합니다.
pip install cognee
pip, poetry, uv를 사용하여 로컬 Cognee 리포지토리를 설치할 수 있습니다. 로컬 pip 설치 시 pip 버전이 21.3 이상인지 확인하세요.
uv sync --all-extras
import os
os.environ["LLM_API_KEY"] = "YOUR OPENAI_API_KEY"
템플릿을 사용하여 .env 파일을 생성하여 변수를 설정할 수도 있습니다. 다른 LLM 제공자를 사용하려면 문서에서 자세한 정보를 확인하세요.
이 스크립트는 기본 파이프라인을 실행합니다:
import cognee
import asyncio
async def main():
# Add text to cognee
await cognee.add("Natural language processing (NLP) is an interdisciplinary subfield of computer science and information retrieval.")
# Generate the knowledge graph
await cognee.cognify()
# Query the knowledge graph
results = await cognee.search("Tell me about NLP")
# Display the results
for result in results:
print(result)
if __name__ == '__main__':
asyncio.run(main())
예제 출력:
Natural Language Processing (NLP) is a cross-disciplinary and interdisciplinary field that involves computer science and information retrieval. It focuses on the interaction between computers and human language, enabling machines to understand and process natural language.
Cognee UI를 사용하여 파일을 인지화하고 쿼리할 수도 있습니다.
로컬에서 Cognee UI를 여기에서 시도해 보세요.
우리는 오픈 소스가 커뮤니티에게 즐겁고 존중받는 경험이 되도록 최선을 다하고 있습니다. 자세한 내용은 CODE_OF_CONDUCT
를 참조하세요.