{"slug": "the-batch-api-load-large-datasets-into-agent-memory", "title": "The Batch API: Load Large Datasets into Agent Memory", "summary": "Zep launched the Batch API for loading large datasets into agent memory, supporting batches up to 50,000 items with a progress dashboard and no impact on real-time ingestion. The API replaces earlier batch methods and is available to all Zep customers immediately.", "body_md": "# The Batch API: Load Large Datasets into Agent Memory\n\nZep's Batch API loads large datasets into agent memory faster, in batches up to 50,000 items, with a progress dashboard and no impact on real-time ingestion.\n\nToday we're shipping the **Batch API**, the new way to load large datasets into agent memory. It ingests data faster than sending the same operations one at a time, runs in batches of up to 50,000 items, tracks progress in a new dashboard, and stays separate from real-time ingestion. You create a batch, add your items across any graphs, users, and threads, then start processing. The Batch API replaces our earlier batch methods and is available to all Zep customers starting today.\n\n## What the Batch API is\n\nThe [Batch API](https://help.getzep.com/adding-batch-data?ref=blog.getzep.com) is the recommended way to load large datasets into your [Context Graphs](https://help.getzep.com/graph-overview?ref=blog.getzep.com): a backfill, a migration from another system, a document collection, or any other bulk import. Instead of calling `graph.add`\n\nor `thread.add_messages`\n\nonce per item, you group everything into one batch and hand it to Zep as a single job. A batch follows a three-step lifecycle: create an empty batch, add items to it, then start processing. Items can be graph episodes or thread messages, and one batch can target any number of graphs, users, and threads.\n\n## Why it matters\n\nThe Batch API ingests large datasets faster than the same operations sent one at a time, and a single batch holds up to 50,000 items, enough to submit a full migration as one job. Its processing runs separately from real-time ingestion, so a big backfill won't affect ongoing ingestion.\n\nYou also get visibility into how that work is going. The new batch dashboard shows every batch in your project: its status, a live progress bar, processed-item counts, and any per-item errors. When a batch completes, Zep can send a [webhook](https://help.getzep.com/webhooks?ref=blog.getzep.com#batch-api-payload).\n\n## How to use it\n\nCreate a batch, add your items across one or more calls (up to 500 per call, 50,000 per batch), then start processing. Zep returns immediately and ingests the batch asynchronously, grouping items by destination graph and processing them in the order you added them.\n\n```\n# Create a batch\nbatch = client.batch.create(metadata={\"description\": \"Customer support backfill\"})\n\n# Add items: graph episodes and thread messages, any destination\nclient.batch.add(batch_id=batch.batch_id, items=[\n    BatchAddItem(type=\"graph_episode\", user_id=\"alice\",\n                 data=\"Alice signed up for the Pro plan on 2024-06-15.\", data_type=\"text\"),\n    BatchAddItem(type=\"thread_message\", thread_id=\"alice_support_thread_42\",\n                 content=\"My dashboard isn't loading.\", role=\"user\", name=\"Alice\"),\n])\n\n# Start processing (Zep ingests the batch asynchronously)\nclient.batch.process(batch_id=batch.batch_id)\n```\n\nWhen you're loading historical data, set a `created_at`\n\ntimestamp on each item. Zep uses it to track when facts extracted from that data are valid or invalid.\n\n## Getting started\n\nTo get started, see the [Batch API docs](https://help.getzep.com/adding-batch-data?ref=blog.getzep.com). The Batch API is available to all Zep customers starting today. It replaces the older [ graph.add_batch and thread.add_messages_batch](https://help.getzep.com/adding-batch-data?ref=blog.getzep.com#deprecated-batch-methods) methods, which are now deprecated and will be removed in a future release.", "url": "https://wpnews.pro/news/the-batch-api-load-large-datasets-into-agent-memory", "canonical_source": "https://blog.getzep.com/the-batch-api-load-large-datasets/", "published_at": "2026-06-09 15:20:48+00:00", "updated_at": "2026-06-18 16:43:55.084151+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "ai-infrastructure"], "entities": ["Zep", "Batch API", "Context Graphs"], "alternates": {"html": "https://wpnews.pro/news/the-batch-api-load-large-datasets-into-agent-memory", "markdown": "https://wpnews.pro/news/the-batch-api-load-large-datasets-into-agent-memory.md", "text": "https://wpnews.pro/news/the-batch-api-load-large-datasets-into-agent-memory.txt", "jsonld": "https://wpnews.pro/news/the-batch-api-load-large-datasets-into-agent-memory.jsonld"}}