REST API 레퍼런스

모든 엔드포인트에 Bearer 토큰이 필요합니다. 대시보드에서 토큰을 받으세요.

# 기본 URL

https://api.agent-memo.ai

# 인증 헤더

Authorization: Bearer YOUR_API_KEY

메모리

GET/api/memories

선택적 필터로 메모리 목록 조회

Query: ?topic=&type=&importance=&limit=&offset=

POST/api/memories

새 메모리 생성

{ "content": "...", "type": "project", "topic": "auth", "importance": 2, "tags": ["decision"] }
GET/api/memories/:id

ID로 단일 메모리 조회

PUT/api/memories/:id

기존 메모리 수정

{ "content": "updated content", "importance": 3 }
DELETE/api/memories/:id

메모리 삭제

POST/api/memories/search

메모리 전체 시맨틱 검색

{ "query": "database choice", "type": ["project"], "limit": 5 }
GET/api/memories/topics

메모리 개수별 모든 주제 목록 조회

POST/api/memories/check-duplicate

저장 전 시맨틱 중복 확인

{ "content": "...", "threshold": 0.92 }

지식 그래프

POST/api/kg/add

엔티티 관계(팩트) 추가

{ "subject": "auth-service", "predicate": "uses", "object": "JWT", "confidence": 0.95 }
POST/api/kg/query

엔티티 관계 조회

{ "entity": "auth-service", "direction": "outgoing" }
POST/api/kg/invalidate

팩트 무효화 (더 이상 유효하지 않음으로 표시)

{ "factId": "..." }
POST/api/kg/timeline

엔티티의 팩트 타임라인 보기

{ "entity": "auth-service" }
GET/api/kg/stats

지식 그래프 통계

응답 형식

모든 응답은 JSON입니다. 성공 응답은 데이터를 직접 반환합니다. 오류 응답은 error 필드를 포함하는 JSON 객체를 반환합니다.

성공 (200)

{
  "id": "abc-123",
  "content": "Use PostgreSQL",
  "type": "project",
  "topic": "database",
  "importance": 3,
  "created_at": "2026-04-08T..."
}

오류 (4xx/5xx)

{
  "error": "Memory not found"
}

속도 제한

베타 기간 동안에는 속도 제한이 적용되지 않습니다. 일반적인 사용량은 분당 100회 요청 미만입니다. 속도 제한은 유료 플랜 도입 시 적용될 예정입니다.