Skip to main content
Context is everything an agent knows before it starts working: curated reference material, reusable know-how, and what it learned on earlier runs. DataGen gives you three tools for it, and each answers a different question. In the product, knowledge bases live under Files in the sidebar: the panel next to the Files page is titled Files & context and lists every knowledge base under Context. Skills live under More → Skills.

Knowledge bases

A knowledge base (WorkspaceContext) turns raw uploads into a compact tree an agent can rely on. You pick source files, describe what you want in a chat with the AI Context Builder, review the files it writes, and publish.

The snapshot model

Each knowledge base has a slug, set once when you create it. The slug is the folder name under .context/ in workspace storage, so a knowledge base always publishes to .context/<slug>/. You can rename the knowledge base later; the slug never changes.
A knowledge base is a snapshot, not a live link to its sources. Publishing copies the builder’s file tree to .context/<slug>/ and records it as a new version. When a source file changes, the knowledge base changes only when someone (or a scheduled automation) runs the builder again and publishes.
  • Sources stay out of the published tree. The builder reads copies of your sources in its own .sources/ folder; only the tree it builds is published.
  • Agents read the live version. Every connected agent reads the published version on its next turn after a publish.
  • Every version is kept. You can roll back to any earlier version; rolling back publishes that version’s files as a new version, so nothing is lost.

When to use a knowledge base

  • Policies, product documentation, playbooks or reference tables an agent should consult.
  • A distilled summary of a large set of files, so the agent does not read hundreds of raw documents on every run.
  • One shared reference built from several agents’ outputs.

Skills

A skill is a reusable instruction set: a folder with a SKILL.md (name, description, instructions) and any supporting files. Skills are uploaded to the workspace’s skill registry, reviewed, and then installed where they are needed:
  • On an agent, a skill is copied into the agent’s own .claude/skills/ and ships with every run.
  • On a knowledge base or an app, a skill is a build-time tool for the AI builder only. It is never published and never reaches the agents or the app that use the result.
Use a skill when the knowledge is a procedure (“how to write our weekly report”, “how to score a lead”) rather than facts. See Skills.

Memory

Agent sandboxes are discarded when a run ends, so an agent has no memory of its own. In DataGen, an agent’s memory is a knowledge base it is allowed to write to. Connect a knowledge base to the agent with Read & write access, and the agent gets tools to list, read and update its files. Each write is a new version of that knowledge base, which you can inspect and roll back like any other. Use memory for things the agent discovers while working: a customer’s renamed contact, a runbook step that turned out to be wrong, a preference a user stated. See Memory.

Which one to use

Raw files and published data models are separate from Context. An agent can also read raw workspace files on demand through its workspace_data tools, and query published data models through the datagen-data CLI. See Use files and Use data.

Next

Build a knowledge base

Create a knowledge base, pick its sources and publish the first version.

Use a knowledge base

Connect it to agents and apps, and choose read or read and write access.