-
Notifications
You must be signed in to change notification settings - Fork 3.3k
feat(zep): add tools from Zep #1646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Summary
This PR adds comprehensive Zep integration for long-term memory management in AI agents. The implementation includes 9 tools covering thread management (create, get, delete), message operations (add, retrieve), user management (add, get, retrieve threads), and context retrieval with AI-powered summaries.
Key Changes:
- Added 9 Zep tool implementations with proper API v2 integration
- Created unified block configuration with operation-based routing
- Comprehensive documentation with input/output specifications
- Proper type definitions and error handling
- Integration with existing registry and block systems
Issues Found:
- Critical syntax error in
add_messages.ts:66- accessing undefinedparams._threadIdinstead ofparams.threadId, which will cause runtime failures when adding messages
Confidence Score: 2/5
- This PR has a critical syntax error that will cause runtime failures
- Score reflects one critical syntax error in
add_messages.tsthat accesses an undefined property (params._threadIdinstead ofparams.threadId). This will cause the add messages functionality to fail at runtime. The rest of the implementation is well-structured with proper validation, error handling, and documentation. Once the syntax error is fixed, this would be a high-confidence merge. - Pay close attention to
apps/sim/tools/zep/add_messages.ts- fix the syntax error on line 66 before merging
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| apps/sim/tools/zep/add_messages.ts | 2/5 | Syntax error on line 66 accessing undefined property params._threadId |
| apps/sim/blocks/blocks/zep.ts | 5/5 | Comprehensive block configuration with proper validation and operation routing |
| apps/sim/tools/zep/types.ts | 5/5 | Well-structured type definitions covering all response variations |
| apps/sim/tools/registry.ts | 5/5 | All 9 Zep tools properly registered |
| apps/docs/content/docs/en/tools/zep.mdx | 5/5 | Complete documentation for all 9 Zep tools with input/output specifications |
Sequence Diagram
sequenceDiagram
participant User
participant SimBlock as Zep Block
participant Tool as Zep Tool
participant ZepAPI as Zep API
User->>SimBlock: Select operation & provide params
SimBlock->>SimBlock: Validate inputs
SimBlock->>Tool: Route to specific tool
alt Create Thread
Tool->>ZepAPI: POST /api/v2/threads
ZepAPI-->>Tool: Thread created (threadId, uuid)
Tool-->>SimBlock: Return thread details
else Add Messages
Tool->>ZepAPI: POST /api/v2/threads/{threadId}/messages
ZepAPI-->>Tool: Context + message UUIDs
Tool-->>SimBlock: Return context & messageIds
else Get Context
Tool->>ZepAPI: GET /api/v2/threads/{threadId}/context
ZepAPI-->>Tool: Context, facts, entities, summary
Tool-->>SimBlock: Return enriched context
else Get Messages
Tool->>ZepAPI: GET /api/v2/threads/{threadId}/messages
ZepAPI-->>Tool: Messages array with pagination
Tool-->>SimBlock: Return messages
else Add User
Tool->>ZepAPI: POST /api/v2/users
ZepAPI-->>Tool: User profile created
Tool-->>SimBlock: Return user details
else Get User
Tool->>ZepAPI: GET /api/v2/users/{userId}
ZepAPI-->>Tool: User profile
Tool-->>SimBlock: Return user profile
end
SimBlock-->>User: Display results
20 files reviewed, 1 comment
Summary
Add relevant tools for user and thread management for Zep -- https://www.getzep.com/
Type of Change
Testing
Tested all tools manually.
Checklist