# Zep — Pipedream Connect

> The Foundational Memory Layer for AI. Equip your agents with the knowledge to complete tasks, from the mundane to monumental.

- API slug: `zep` (use in MCP headers and tool keys)
- Auth: API key (Pipedream-managed)
- Categories: Artificial Intelligence (AI)
- Website: https://www.getzep.com/
- This page (HTML): https://pipedream.com/apps/zep
- Tools: 9 actions · 3 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: zep`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "zep",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Add Memory to Session:
const result = await mcp.callTool({
  name: "zep-add-memory",
  arguments: {
    sessionId: "Session ID",
    messages: ["Messages"],
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## API proxy

For a Zep endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://api.getzep.com/api/v2/users-ordered

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkuZ2V0emVwLmNvbS9hcGkvdjIvdXNlcnMtb3JkZXJlZA?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "zep-add-memory",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    zep: { authProvisionId: "apn_xxxxxxx" },
    sessionId: "Session ID",
    messages: ["Messages"],
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (9)

### `zep-add-memory` — Add Memory to Session (Write)

Adds memory to an existing session in Zep. See the documentation

Full schema: https://pipedream.com/apps/zep/actions/add-memory.md

### `zep-add-user` — Add User (Write)

Adds a user in Zep. See the documentation

Full schema: https://pipedream.com/apps/zep/actions/add-user.md

### `zep-create-session` — Create Session (Write)

Creates a new session in Zep. See the documentation

Full schema: https://pipedream.com/apps/zep/actions/create-session.md

### `zep-get-thread-messages` — Get Thread Messages (Read-only)

Returns messages for the thread with the specified ID. See the documentation

Full schema: https://pipedream.com/apps/zep/actions/get-thread-messages.md

### `zep-get-threads` — Get Threads (Read-only)

Returns a paginated list of threads. See the documentation

Full schema: https://pipedream.com/apps/zep/actions/get-threads.md

### `zep-list-session-id-options` — List Session ID Options (Read-only)

Retrieves available options for the Session ID field.

Full schema: https://pipedream.com/apps/zep/actions/list-session-id-options.md

### `zep-list-thread-id-options` — List Thread ID Options (Read-only)

Retrieves available options for the Thread ID field.

Full schema: https://pipedream.com/apps/zep/actions/list-thread-id-options.md

### `zep-list-user-id-options` — List User ID Options (Read-only)

Retrieves available options for the User ID field.

Full schema: https://pipedream.com/apps/zep/actions/list-user-id-options.md

### `zep-update-session` — Update Session (Write)

Updates an existing session in Zep. See the documentation

Full schema: https://pipedream.com/apps/zep/actions/update-session.md

## Triggers (3)

### `zep-new-message` — New Message in Session (Polling)

Emit new event when a message is added to a session. See the documentation

Full schema: https://pipedream.com/apps/zep/triggers/new-message.md

### `zep-new-session` — New Session Created (Polling)

Emit new event when a new session is created in Zep. See the documentation

Full schema: https://pipedream.com/apps/zep/triggers/new-session.md

### `zep-session-updated` — New Session Updated (Polling)

Emit new event when an existing session is updated. See the documentation

Full schema: https://pipedream.com/apps/zep/triggers/session-updated.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
