Skip to content

feat(clawd): Implement MoltBrain API integration#4

Open
koriyoshi2041 wants to merge 1 commit intonhevers:mainfrom
koriyoshi2041:feat/clawd-api-integration
Open

feat(clawd): Implement MoltBrain API integration#4
koriyoshi2041 wants to merge 1 commit intonhevers:mainfrom
koriyoshi2041:feat/clawd-api-integration

Conversation

@koriyoshi2041
Copy link

Summary

Complete the Clawdbot integration by connecting memory tools to MoltBrain's HTTP API.

Changes

  • 3 Memory Tools: recall_context, search_memories, save_memory
  • HTTP Client: Retry logic (3x exponential backoff), timeout handling (30s)
  • Logging: Structured logging with [moltbrain] prefix, debug mode support
  • Health Check: Non-blocking startup check for MoltBrain availability
  • Error Handling: Graceful degradation when service unavailable

Testing

✓ 114 tests passing
✓ 186 expect() calls
✓ 4 test files

Covers:

  • Happy path execution
  • Network/timeout errors
  • HTTP status codes (401, 403, 429, 5xx)
  • Edge cases (unicode, long strings, empty values)
  • Retry logic and exponential backoff

Notes

This replaces the TODO stub implementation. Tools now return real results when MoltBrain is running, or graceful errors when unavailable.


Generated with assistance from Claude

- Add memory tools: recall_context, search_memories, save_memory
- Implement session lifecycle hooks (onSessionStart, onMessage, onResponse, onSessionEnd)
- Add API client with retry logic, timeout handling, and error handling
- Add MemorySkill class with TypeBox schema validation
- Comprehensive test coverage (114 tests, 100% pass)

Co-authored-by: Claude <claude@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant