Skip to content

Library

The Library keeps work your agents make that is worth having again: scripts and tools, design components, HTML pages, documents, diagrams, and snippets such as prompts. Agents search it before they write a script and save to it when they make something reusable, and pages they leave in temporary folders arrive on their own.

App
Library
CLI
hansard library
In your agent
search_library

Every item sits in one bucket:

  • Scripts & tools: shell, Python, JavaScript, and other scripts.
  • Components: interface pieces such as a React component with its CSS, and design tokens.
  • Artifacts: HTML pages, documents, diagrams, images, and data files.
  • Snippets: prompts, commands, and short text you paste again.

Found holds scripts and documents Hansard collected from scratch folders. Keep the ones worth reusing. The rest leave the library after 90 days without being kept or opened.

The watcher collects, every 30 minutes:

  • HTML pages, SVG diagrams, scripts, and Markdown that an agent wrote to a temporary folder or an artifacts/ folder, found through the files your archived conversations edited. Pages and diagrams are kept; scripts and documents wait under Found.
  • Pages published from Claude Code.
  • Artifacts from your claude.ai conversations, one item per artifact with a version for each edit.
  • ChatGPT canvas documents, rebuilt version by version from your archived conversations.

Hansard copies each file into the library and never changes, moves, or deletes the original. It skips node_modules, build and release folders, hidden folders, files over 16 MiB, files whose names look like credentials, and any file whose text the secret scanner flags. Run hansard library collect to collect now.

  1. Select Library in the dock, below Skills & plugins. Choose a bucket, or search the library from the field above the buckets.
  2. Select an item. A page shows in a sandboxed preview that cannot reach the app, a document shows formatted, and code shows with highlighting. Preview and Source switch between the two for a page, a diagram, or a document.
  3. Source names the agent that made the item, the conversation, the project, and the original file or published address. Versions lists each change; select one to preview it.
  4. Use Copy to copy the text, Open to open a page in its own tab, or Download. Select the pencil to edit the title, the description agents read, the kind and its bucket, and the tags.
  5. For an item under Found, select Keep and choose its bucket.

An item of several files lists them under Files, with its entry file first. Select a file to preview it. A page previews with the stylesheets, scripts, and pictures it names from the same item.

Hansard installs a library skill with the recall skills for each agent (named hansard-library where an agent already has a skill called library). It tells agents to search the library before writing a utility script, to save scripts and components they will reuse, and to save HTML pages and documents they make for you to the library instead of a temporary folder. The recall MCP server gives agents three tools:

  • search_library finds items by words in their title, description, tags, and text.
  • get_library_item reads an item and where it came from.
  • save_to_library saves a file, or a new version of an item, with a description that says when to use it. It refuses text that looks like a credential.
Terminal window
hansard library list --bucket scripts
hansard library search "resize images"
hansard library show <id> --raw > resize.sh
hansard library add ./resize.sh --title "Resize images"
hansard library import ~/design/components
hansard library list --found --sort task
hansard library keep <id> <id> --bucket components
hansard library edit <id> --title "Resize images" --tags images,cli
hansard library remove <id> --yes

list --found --sort task groups found items under the folder or conversation that made them, as Found does in the Library view. keep and remove take several ids at once, and keep --bucket files a found item in another bucket.

add with a folder keeps one item of its files, such as a component with its CSS and a demo page; --entry names the file to preview, which is otherwise index.html or README.md. import adds each file of a folder as its own item. Removing an item never touches the original file, and Hansard does not collect it again.

The library is stored in your Hansard archive. With Personal Sync, items you keep reach your other computers and show under Other devices, read-only there; edit or remove an item on the computer that kept it. Items under Found stay on the computer that collected them. Library items travel only after every computer in your Personal Sync profile runs a Hansard version that reads them. Hosted assistants connected to Hansard cannot read or save library items.