{"id":28375576,"url":"https://github.com/neuwcodebox/long-friend","last_synced_at":"2026-02-02T03:25:46.497Z","repository":{"id":292485623,"uuid":"978743225","full_name":"neuwcodebox/long-friend","owner":"neuwcodebox","description":"A Discord bot for gradual long-term memory retrieval testing using activation spreading in associative memory networks.","archived":false,"fork":false,"pushed_at":"2025-06-09T09:34:15.000Z","size":420,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-21T05:06:50.623Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neuwcodebox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-06T12:52:28.000Z","updated_at":"2025-06-09T09:34:19.000Z","dependencies_parsed_at":"2025-05-10T09:27:42.359Z","dependency_job_id":"4236662c-1c1e-4a77-84c0-e5cbd6dcce72","html_url":"https://github.com/neuwcodebox/long-friend","commit_stats":null,"previous_names":["neurowhai/long-friend","neuwcodebox/long-friend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/neuwcodebox/long-friend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neuwcodebox%2Flong-friend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neuwcodebox%2Flong-friend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neuwcodebox%2Flong-friend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neuwcodebox%2Flong-friend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neuwcodebox","download_url":"https://codeload.github.com/neuwcodebox/long-friend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neuwcodebox%2Flong-friend/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262008671,"owners_count":23244230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-29T23:06:09.243Z","updated_at":"2026-02-02T03:25:46.444Z","avatar_url":"https://github.com/neuwcodebox.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Long Friend\n\n장기 기억 검색을 위한 연관 메모리 네트워크에서 활성화 확산을 활용하는 Discord 봇입니다.\n\n![demo](./docs/demo.png)\n\n## 프로젝트 소개\n\nLong Friend는 연관 메모리 네트워크에서 활성화 확산을 사용한 점진적 장기 메모리 검색 테스트를 위한 Discord 봇입니다. 이 봇은 사용자와의 대화를 통해 장기 기억을 형성하고, 이를 활용하여 자연스러운 대화를 이어나갈 수 있습니다.\n\n## 주요 기능\n\n### 메모리 관리 시스템\n\n- **메모리 추출**: 대화에서 중요한 정보를 추출하여 메모리로 저장\n- **메모리 요약**: 대화가 길어질 경우 요약하여 효율적으로 관리\n- **내부 사고 과정**: 에이전트가 응답하기 전에 내부적으로 사고하는 과정을 시뮬레이션\n\n### 연관 메모리 네트워크\n\n- **활성화 확산 메커니즘**: 현재 대화 맥락과 관련된 메모리를 활성화하고, 이를 연관된 다른 메모리로 확산\n- **임베딩 기반 유사도**: 메모리 간 유사도를 계산하여 연관성 파악\n- **노드와 엣지 구조**: 메모리를 노드로, 메모리 간 연관성을 엣지로 표현하는 네트워크 구조\n\n### 도구 시스템\n\n- **날씨 정보**: 특정 도시의 현재 날씨와 예보를 제공\n- **검색 기능**: 웹 검색을 통한 정보 획득\n- **이미지 생성**: 프롬프트를 기반으로 이미지 생성\n\n### Discord 통합\n\n- **채팅 버퍼**: Discord 채팅을 관리하고 처리하는 시스템\n- **자동 응답**: 멘션이나 일정 시간 후 자동으로 대화에 참여\n- **파일 공유**: 이미지 등의 파일을 생성하고 공유하는 기능\n\n## 기술 스택\n\n- **언어**: TypeScript\n- **데이터베이스**: PostgreSQL (Kysely ORM 사용)\n- **AI 모델**: OpenAI API 활용\n- **클라이언트**: Discord.js\n- **기타 라이브러리**: zod(스키마 검증), dotenv(환경 변수), pino(로깅) 등\n\n## 아키텍처\n\n### 핵심 모듈\n\n1. **Agent**: 대화 처리 및 메모리 관리의 중심 모듈\n2. **Memory**: 다양한 유형의 메모리(채팅, 내부 사고, 요약 등) 관리\n3. **Network**: 메모리 노드 간 연결과 활성화 확산 처리\n4. **Tool**: 외부 API와 연동하여 추가 기능 제공\n5. **ChatBuffer**: Discord 메시지 처리 및 관리\n\n### 데이터 흐름\n\n1. Discord에서 메시지 수신\n2. 메시지를 ChatBuffer에 저장\n3. Agent가 메시지 처리 및 내부 사고 과정 시뮬레이션\n4. 필요시 도구 사용 (날씨, 검색, 이미지 생성 등)\n5. 메모리 네트워크에서 관련 메모리 활성화\n6. 응답 생성 및 Discord로 전송\n\n## 특징\n\n- **장기 기억**: 이전 대화 내용을 기억하고 적절한 시점에 활용\n- **자연스러운 대화**: 내부 사고 과정을 통해 보다 자연스러운 응답 생성\n- **확장 가능한 도구**: 필요에 따라 새로운 도구를 추가할 수 있는 구조\n- **컨텍스트 인식**: 대화 맥락을 이해하고 적절한 메모리를 활성화\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneuwcodebox%2Flong-friend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneuwcodebox%2Flong-friend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneuwcodebox%2Flong-friend/lists"}