Zep v3 icon

Zep v3

Interact with Zep Cloud v3 API

Overview

The node interacts with the Zep Cloud v3 API to manage entity types and edge types within knowledge graphs. Specifically, for the "Entity Type" resource and the "Set Entity Types" operation, it allows users to define or update the sets of entity types and edge types used in a graph or user context.

This operation is useful when you want to customize or configure the schema of your knowledge graph by specifying which entity types (e.g., Person, Organization) and edge types (e.g., WORKS_FOR, KNOWS) are recognized and managed by the system.

Practical examples:

  • Defining a new set of entity types and relationships for a custom domain knowledge graph.
  • Updating existing entity and edge types to reflect changes in your data model.
  • Synchronizing entity type definitions across multiple graphs or user contexts.

Properties

Name Meaning
Entity Types Array of entity type objects. These define the categories or classes of entities in the graph. Example format: JSON array of entity type definitions.
Edge Types Array of edge type objects. These define the types of relationships between entities. Example format: JSON array of edge type definitions.

Output

The output is a JSON object representing the response from the Zep Cloud API after setting the entity and edge types. This typically includes confirmation of the updated entity and edge types or any relevant metadata returned by the API.

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential for authenticating requests to the Zep Cloud API.
  • The node makes HTTP requests to https://api.getzep.com/api/v2/entity-types endpoint using PUT method.
  • Proper configuration of the API authentication credential in n8n is necessary.

Troubleshooting

  • Common issues:

    • Providing invalid JSON format for the "Entity Types" or "Edge Types" properties will cause parsing errors.
    • Omitting both entityTypes and edgeTypes arrays or providing empty arrays may result in no changes or errors depending on API behavior.
    • Network or authentication failures can prevent successful API calls.
  • Error messages:

    • Errors related to malformed JSON input should be resolved by ensuring valid JSON syntax.
    • Authentication errors indicate missing or incorrect API credentials.
    • API errors might include validation errors if the entity or edge types do not conform to expected schemas.

Links and References


Additional Notes on Implementation (Static Analysis)

  • The node uses a PUT request to the /api/v2/entity-types endpoint.
  • It parses the "entityTypes" and "edgeTypes" parameters from JSON strings into objects before sending.
  • The request body includes keys entity_types and edge_types only if the corresponding inputs are non-empty.
  • The node handles multiple resources and operations but for the specified Resource "Entity Type" and Operation "Set Entity Types", it calls the function that performs this PUT request.
  • The node expects the user to provide valid JSON arrays for both entity and edge types as input.
{
  "entityTypes": [
    {
      "name": "Person",
      "description": "An individual human being"
    }
  ],
  "edgeTypes": [
    {
      "name": "KNOWS",
      "description": "Relationship indicating acquaintance"
    }
  ]
}

This example input would set one entity type "Person" and one edge type "KNOWS".

Discussion