Skip to content

Conversation

@icecrasher321
Copy link
Collaborator

@icecrasher321 icecrasher321 commented Oct 15, 2025

Summary

Add relevant tools for user and thread management for Zep -- https://www.getzep.com/

Type of Change

  • New feature

Testing

Tested all tools manually.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Oct 15, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Oct 15, 2025 10:47pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a 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 undefined params._threadId instead of params.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.ts that accesses an undefined property (params._threadId instead of params.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
Loading

20 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@icecrasher321 icecrasher321 merged commit 56d04a9 into staging Oct 15, 2025
9 checks passed
@waleedlatif1 waleedlatif1 deleted the feat/zep branch October 30, 2025 06:22
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.

2 participants