Manage folders and upload files into your xysq vault from Python.
The organise namespace gives you programmatic access to the folder tree and file uploads that the Organise dashboard exposes. Folders, renames, moves, deletes, and direct file uploads all run through the same backend the dashboard uses — anything you push through the SDK shows up in app.xysq.ai instantly, and is indexed into memory once extraction finishes.
from xysq import Xysqwith Xysq() as client: folder = client.organise.create_folder("Notes") file = client.organise.upload_file("./meeting.md", folder_id=folder.id) client.organise.wait_for_file(file.asset_id) # File content is now searchable via client.memory.surface(...)
Uploaded files become part of your memory once extraction completes. Use client.memory.surface() or client.memory.synthesize() to query their contents — no separate Organise-specific search is needed.
List every folder in the vault. Returns a flat array — use each folder’s parent_id to reconstruct the tree.
folders = client.organise.list_folders()for f in folders: indent = " " * (0 if f.parent_id is None else 1) print(f"{indent}{f.name} ({f.id})")
Returns:list[Folder] — each with id, name, parent_id, path, is_system, chat_id, owner_kind, owner_id
The system /Chats/ folder appears in this list with is_system=True. You can’t create folders inside it or upload files directly into it — those slots are managed by Chat.
Delete a folder and every subfolder + file inside it. Irreversible.
removed_count = client.organise.delete_folder(folder.id)print(f"Removed {removed_count} files")# Also purge what xysq extracted from those filesclient.organise.delete_folder(folder.id, forget_memories=True)
Parameters
Parameter
Type
Default
Description
folder_id
str
required
Folder UUID
forget_memories
bool
False
Also remove extracted facts from the recall bank
Returns:int — number of files removed by the cascade.
Confirm with the user before calling this on anything non-empty. There is no trash.
final = client.organise.wait_for_file(file.asset_id, timeout=60.0)if final.extraction_status == "ready": # Contents are now searchable via client.memory.surface(...) memories = client.memory.surface("release notes")
Parameters
Parameter
Type
Default
Description
asset_id
str
required
File to poll
timeout
float
60.0
Maximum seconds to wait
interval
float
1.0
Poll interval in seconds
Use wait_for_file() in pipelines or tests where you need the file’s content searchable before continuing.
Wrap the client in team(team_id) to operate on a team’s Organise vault instead of your personal one. Permissions follow your team role — ro members can list and download, rw and above can upload, rename, move, and delete.
with Xysq() as client: team = client.team("team-uuid") folders = team.organise.list_folders() team.organise.upload_file("./report.pdf", folder_id=folders[0].id)
from xysq import Xysqwith Xysq() as client: # Set up a folder folder = client.organise.create_folder("ADRs") # Upload several markdown decision records for path in ["./adr-01.md", "./adr-02.md", "./adr-03.md"]: file = client.organise.upload_file(path, folder_id=folder.id) client.organise.wait_for_file(file.asset_id, timeout=60.0) print(f"Indexed: {file.filename}") # Now query them through memory — Organise content joins the same recall layer result = client.memory.synthesize( "What did we decide about health check endpoints?" ) print(result.answer)