[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"navigation":3,"url-settings":80,"blog-\u002Fblog\u002Fbuild-your-own-copilot-with-local-context":589,"blog-author-\u002Fblog\u002Fbuild-your-own-copilot-with-local-context":1129},{"id":4,"extension":5,"footer":6,"header":66,"meta":77,"stem":78,"__hash__":79},"navigation\u002Fdata\u002Fshared\u002Fnavigation.yml","yml",{"brand":7,"columns":10,"legal":56},{"name":8,"tagline":9},"Pieces","The memory layer for modern work.",[11,26,41],{"title":12,"links":13},"Product",[14,17,21,24],{"label":15,"href":16},"Pieces Desktop","\u002Fdownloads",{"label":18,"href":19,"external":20},"Pieces MCP","url:docs.mcp.overview",true,{"label":22,"href":23,"external":20},"Pieces APIs","url:docs.api",{"label":25,"href":16},"Downloads",{"title":27,"links":28},"Resources",[29,32,35,38],{"label":30,"href":31,"external":20},"Documentation","url:docs.home",{"label":33,"href":34},"Blog","\u002Fblog",{"label":36,"href":37},"Changelog","\u002Fchangelog",{"label":39,"href":40,"external":20},"GitHub","url:github.org",{"title":42,"links":43},"Company",[44,47,50,53],{"label":45,"href":46},"About","\u002Fabout",{"label":48,"href":49},"Enterprise","\u002Fenterprise",{"label":51,"href":52,"external":20},"Discord","url:social.discord",{"label":54,"href":55,"external":20},"X \u002F Twitter","url:social.x",[57,60,63],{"label":58,"href":59,"external":20},"Privacy Policy","url:legal.privacyPolicy",{"label":61,"href":62,"external":20},"Refund Policy","url:legal.refundPolicy",{"label":64,"href":65,"external":20},"Terms of Service","url:legal.terms",{"links":67,"signIn":68,"contact":71,"cta":74},[],{"label":69,"href":70},"Sign in","url:portal.home",{"label":72,"href":73},"Contact sales","url:site.contact",{"label":75,"href":76},"Download","url:routes.downloads",{},"data\u002Fshared\u002Fnavigation","Ia8tCWWqcGvuaIro8jwZ3HH-MwI66yqJpWshASJdYQ0",{"id":81,"extension":5,"links":82,"meta":586,"stem":587,"__hash__":588},"urlSettings\u002Fdata\u002Fshared\u002Furls.yml",[83,87,91,95,99,103,107,111,115,119,123,127,131,135,139,143,147,151,155,159,163,167,171,175,179,183,187,191,195,199,203,207,211,215,219,223,227,231,235,238,242,246,249,253,257,261,265,269,273,277,281,285,289,293,297,301,305,309,313,317,321,325,329,333,337,341,345,349,353,357,361,365,369,373,377,381,385,389,393,396,400,404,408,412,416,420,423,426,429,432,436,440,444,448,452,456,460,464,468,472,476,480,484,488,492,495,499,503,507,511,515,519,523,527,531,534,538,542,546,550,553,557,561,565,568,571,575,579,582],{"key":84,"label":85,"href":86},"downloads.desktop","Desktop download page","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fdownload",{"key":88,"label":89,"href":90},"downloads.macOS.dmgArm64","macOS DMG Apple Silicon","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fdmg-arm64\u002Fdownload",{"key":92,"label":93,"href":94},"downloads.macOS.dmgIntel","macOS DMG Intel","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fdmg\u002Fdownload",{"key":96,"label":97,"href":98},"downloads.macOS.pkg","macOS PKG","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fmacos_packaging\u002Fpkg\u002Fdownload",{"key":100,"label":101,"href":102},"downloads.windows.appinstaller","Windows App Installer","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fappinstaller\u002Fpieces_for_x.appinstaller",{"key":104,"label":105,"href":106},"downloads.windows.exe","Windows EXE","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_for_x\u002Fwindows-exe\u002Fdownload",{"key":108,"label":109,"href":110},"downloads.windows.suiteManager","Windows Suite Manager","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fpieces_suite_windows\u002Fappinstaller\u002Fdownload",{"key":112,"label":113,"href":114},"downloads.linux.flatpakRepo","Linux Flatpak repository","https:\u002F\u002Fbuilds.pieces.app\u002Fpieces-flatpak-repo\u002Fpieces-flatpak.flatpakrepo",{"key":116,"label":117,"href":118},"downloads.linux.snapDesktop","Linux Snap Desktop","https:\u002F\u002Fsnapcraft.io\u002Fpieces-for-developers",{"key":120,"label":121,"href":122},"downloads.linux.snapPiecesOS","Linux Snap PiecesOS","https:\u002F\u002Fsnapcraft.io\u002Fpieces-os",{"key":124,"label":125,"href":126},"downloads.piecesOS.macOS.dmgArm64","PiecesOS macOS DMG Apple Silicon","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fdmg-arm64\u002Fdownload",{"key":128,"label":129,"href":130},"downloads.piecesOS.macOS.dmgIntel","PiecesOS macOS DMG Intel","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fdmg\u002Fdownload",{"key":132,"label":133,"href":134},"downloads.piecesOS.windows.appinstaller","PiecesOS Windows App Installer","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fappinstaller\u002Fos_server.appinstaller",{"key":136,"label":137,"href":138},"downloads.piecesOS.windows.exe","PiecesOS Windows EXE","https:\u002F\u002Fbuilds.pieces.app\u002Fstages\u002Fproduction\u002Fos_server\u002Fwindows-exe\u002Fdownload",{"key":140,"label":141,"href":142},"downloads.guides.macOS","macOS installation guide","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Fmacos-installation-guide",{"key":144,"label":145,"href":146},"downloads.guides.windows","Windows installation guide","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Fwindows-installation-guide",{"key":148,"label":149,"href":150},"downloads.guides.linux","Linux installation guide","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Flinux-installation-guide",{"key":152,"label":153,"href":154},"downloads.guides.piecesOS","PiecesOS manual installation","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fpieces-os\u002Fmanual-installation",{"key":156,"label":157,"href":158},"extensions.chrome","Chrome extension","https:\u002F\u002Fchrome.google.com\u002Fwebstore\u002Fdetail\u002Fpieces-save-code-snippets\u002Figbgibhbfonhmjlechmeefimncpekepm",{"key":160,"label":161,"href":162},"extensions.firefox","Firefox add-on","https:\u002F\u002Faddons.mozilla.org\u002Fen-US\u002Ffirefox\u002Faddon\u002Fpieces-save-code-from-the-web\u002F",{"key":164,"label":165,"href":166},"extensions.edge","Edge add-on","https:\u002F\u002Fmicrosoftedge.microsoft.com\u002Faddons\u002Fdetail\u002Fpieces-save-code-snippet\u002Fhglfimcdgonaeeobjckfdabcldfidmim",{"key":168,"label":169,"href":170},"extensions.vscode","VS Code extension","https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=MeshIntelligentTechnologiesInc.pieces-vscode",{"key":172,"label":173,"href":174},"extensions.visualStudio","Visual Studio extension","https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=MeshIntelligentTechnologiesInc.PiecesVisualStudio",{"key":176,"label":177,"href":178},"extensions.jetbrains","JetBrains plugin","https:\u002F\u002Fplugins.jetbrains.com\u002Fplugin\u002F17328-pieces--save-search-share--reuse-code-snippets",{"key":180,"label":181,"href":182},"extensions.obsidian","Obsidian plugin","https:\u002F\u002Fobsidian.md\u002Fplugins?id=pieces-for-developers",{"key":184,"label":185,"href":186},"extensions.sublime","Sublime package","https:\u002F\u002Fpackagecontrol.io\u002Fpackages\u002FPieces",{"key":188,"label":189,"href":190},"extensions.neovim","Neovim plugin","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fplugin_neo_vim",{"key":192,"label":193,"href":194},"extensions.jupyterlab","JupyterLab plugin","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fjupyterlab-pieces",{"key":196,"label":197,"href":198},"extensions.cli","Pieces CLI","https:\u002F\u002Fpypi.org\u002Fproject\u002Fpieces-cli\u002F",{"key":200,"label":201,"href":202},"docs.home","Documentation home","https:\u002F\u002Fdocs.pieces.app",{"key":204,"label":205,"href":206},"docs.getStarted","Get started docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces",{"key":208,"label":209,"href":210},"docs.api","API docs","https:\u002F\u002Fdocs.pieces.app\u002Fapi",{"key":212,"label":213,"href":214},"docs.desktop.overview","Desktop overview","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop",{"key":216,"label":217,"href":218},"docs.desktop.onboarding","Desktop onboarding","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fonboarding",{"key":220,"label":221,"href":222},"docs.desktop.timeline","Desktop timeline docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Ftimeline",{"key":224,"label":225,"href":226},"docs.desktop.summaries","Desktop summaries docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fsingle-click-summaries",{"key":228,"label":229,"href":230},"docs.desktop.search","Desktop conversational search docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fconversational-search",{"key":232,"label":233,"href":234},"docs.desktop.drive","Desktop drive docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fdesktop\u002Fdrive",{"key":236,"label":237,"href":86},"docs.desktop.download","Desktop download docs",{"key":239,"label":240,"href":241},"docs.piecesOS.overview","PiecesOS overview docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies",{"key":243,"label":244,"href":245},"docs.piecesOS.details","PiecesOS details docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fpieces-os",{"key":247,"label":248,"href":154},"docs.piecesOS.install","PiecesOS install docs",{"key":250,"label":251,"href":252},"docs.piecesOS.quickMenu","PiecesOS quick menu docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fpieces-os\u002Fquick-menu",{"key":254,"label":255,"href":256},"docs.piecesOS.storage","On-device storage docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fon-device-storage",{"key":258,"label":259,"href":260},"docs.piecesOS.troubleshooting","PiecesOS troubleshooting docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fcore-dependencies\u002Fpieces-os\u002Ftroubleshooting",{"key":262,"label":263,"href":264},"docs.mcp.overview","MCP overview docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp",{"key":266,"label":267,"href":268},"docs.mcp.cursor","MCP Cursor docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fcursor",{"key":270,"label":271,"href":272},"docs.mcp.vscode","MCP VS Code docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fvs-code",{"key":274,"label":275,"href":276},"docs.mcp.claudeDesktop","MCP Claude Desktop docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fclaude-desktop",{"key":278,"label":279,"href":280},"docs.mcp.claudeCode","MCP Claude Code docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fclaude-code",{"key":282,"label":283,"href":284},"docs.mcp.claudeCowork","MCP Claude Cowork docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fclaude-cowork",{"key":286,"label":287,"href":288},"docs.mcp.githubCopilot","MCP GitHub Copilot docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fgithub-copilot",{"key":290,"label":291,"href":292},"docs.mcp.goose","MCP Goose docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fgoose",{"key":294,"label":295,"href":296},"docs.mcp.windsurf","MCP Windsurf docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fwindsurf",{"key":298,"label":299,"href":300},"docs.mcp.zed","MCP Zed docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fzed",{"key":302,"label":303,"href":304},"docs.mcp.jetbrains","MCP JetBrains docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fjetbrains-ides",{"key":306,"label":307,"href":308},"docs.mcp.continueDev","MCP Continue docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fcontinue-dev",{"key":310,"label":311,"href":312},"docs.mcp.cline","MCP Cline docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fcline",{"key":314,"label":315,"href":316},"docs.mcp.raycast","MCP Raycast docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fraycast",{"key":318,"label":319,"href":320},"docs.mcp.rovoDevCli","MCP Rovo Dev CLI docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Frovo-dev-cli",{"key":322,"label":323,"href":324},"docs.mcp.openaiCodexCli","MCP OpenAI Codex CLI docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fopenai-codex-cli",{"key":326,"label":327,"href":328},"docs.mcp.googleGeminiCli","MCP Google Gemini CLI docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fgoogle-gemini-cli",{"key":330,"label":331,"href":332},"docs.mcp.amazonQ","MCP Amazon Q docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Famazon-q-developer",{"key":334,"label":335,"href":336},"docs.mcp.chatgptDev","MCP ChatGPT Developer Mode docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fchatgpt-developer-mode",{"key":338,"label":339,"href":340},"docs.mcp.openclaw","MCP OpenClaw docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fopenclaw",{"key":342,"label":343,"href":344},"docs.mcp.mcpRemote","MCP Remote docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fmcp-remote",{"key":346,"label":347,"href":348},"docs.mcp.ngrok","MCP ngrok docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmcp\u002Fngrok-setup",{"key":350,"label":351,"href":352},"docs.troubleshooting.macOS","macOS troubleshooting docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Ftroubleshooting\u002Fmacos",{"key":354,"label":355,"href":356},"docs.troubleshooting.windows","Windows troubleshooting docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Ftroubleshooting\u002Fwindows",{"key":358,"label":359,"href":360},"docs.troubleshooting.linux","Linux troubleshooting docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fmeet-pieces\u002Ftroubleshooting\u002Flinux",{"key":362,"label":363,"href":364},"docs.privacy","Privacy and security docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fprivacy-security-your-data",{"key":366,"label":367,"href":368},"docs.support","Support docs","https:\u002F\u002Fdocs.pieces.app\u002Fproducts\u002Fsupport",{"key":370,"label":371,"href":372},"portal.home","Pieces portal","https:\u002F\u002Fportal.pieces.app",{"key":374,"label":375,"href":376},"site.home","Website home","https:\u002F\u002Fpieces.app",{"key":378,"label":379,"href":380},"site.about","About page","https:\u002F\u002Fpieces.app\u002Fabout",{"key":382,"label":383,"href":384},"site.features","Features page","https:\u002F\u002Fpieces.app\u002Ffeatures",{"key":386,"label":387,"href":388},"site.plugins","Plugins page","https:\u002F\u002Fpieces.app\u002Fplugins",{"key":390,"label":391,"href":392},"site.contact","Contact page","https:\u002F\u002Fpieces.app\u002Fcontact",{"key":394,"label":36,"href":395},"site.changelog","https:\u002F\u002Fpieces.app\u002Fchangelog",{"key":397,"label":398,"href":399},"site.news","News","https:\u002F\u002Fpieces.app\u002Fnews",{"key":401,"label":402,"href":403},"site.events","Community events","https:\u002F\u002Fpieces.app\u002Fcommunity\u002Fevents",{"key":405,"label":406,"href":407},"site.userStories","User stories","https:\u002F\u002Fpieces.app\u002Fuser-stories",{"key":409,"label":410,"href":411},"site.academy","Academy","https:\u002F\u002Fpieces.app\u002Flearn\u002Facademy",{"key":413,"label":414,"href":415},"site.support","Website support","https:\u002F\u002Fpieces.app\u002Fsupport",{"key":417,"label":418,"href":419},"site.standup","Standup","https:\u002F\u002Fpieces.app\u002Fstandup",{"key":421,"label":33,"href":422},"site.blog","https:\u002F\u002Fcode.pieces.app\u002Fblog",{"key":424,"label":51,"href":425},"social.discord","https:\u002F\u002Fdiscord.gg\u002Fgetpieces",{"key":427,"label":54,"href":428},"social.x","https:\u002F\u002Fx.com\u002Fgetpieces",{"key":430,"label":431,"href":428},"social.twitter","Twitter",{"key":433,"label":434,"href":435},"social.instagram","Instagram","https:\u002F\u002Fwww.instagram.com\u002Fgetpieces\u002F",{"key":437,"label":438,"href":439},"social.tiktok","TikTok","https:\u002F\u002Fwww.tiktok.com\u002F@getpieces",{"key":441,"label":442,"href":443},"social.linkedin","LinkedIn","https:\u002F\u002Fwww.linkedin.com\u002Fcompany\u002Fgetpieces\u002F",{"key":445,"label":446,"href":447},"social.youtube","YouTube","https:\u002F\u002Fyoutube.com\u002F@getpieces",{"key":449,"label":450,"href":451},"github.org","GitHub organization","https:\u002F\u002Fgithub.com\u002Fpieces-app",{"key":453,"label":454,"href":455},"github.support","GitHub support","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fsupport",{"key":457,"label":458,"href":459},"github.issues","GitHub issues","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fsupport\u002Fissues",{"key":461,"label":462,"href":463},"github.discussions","GitHub discussions","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fsupport\u002Fdiscussions",{"key":465,"label":466,"href":467},"github.documentation","GitHub documentation","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fdocumentation",{"key":469,"label":470,"href":471},"github.opensource","GitHub open source","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fopensource",{"key":473,"label":474,"href":475},"github.sdks.python","Python SDK","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-os-client-sdk-for-python",{"key":477,"label":478,"href":479},"github.sdks.typescript","TypeScript SDK","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-os-client-sdk-for-typescript",{"key":481,"label":482,"href":483},"github.sdks.dart","Dart SDK","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-os-client-sdk-for-dart",{"key":485,"label":486,"href":487},"github.sdks.kotlin","Kotlin SDK","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-os-client-sdk-for-kotlin",{"key":489,"label":490,"href":491},"github.plugins.obsidian","Obsidian plugin repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fobsidian-pieces",{"key":493,"label":494,"href":194},"github.plugins.jupyterlab","JupyterLab plugin repository",{"key":496,"label":497,"href":498},"github.plugins.sublime","Sublime plugin repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fplugin_sublime",{"key":500,"label":501,"href":502},"github.plugins.neovim","Neovim plugin repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fplugin_neovim",{"key":504,"label":505,"href":506},"github.cliAgent","CLI agent repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fcli-agent",{"key":508,"label":509,"href":510},"github.mcpDart","MCP Dart repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fmcp_dart",{"key":512,"label":513,"href":514},"github.awesomePieces","Awesome Pieces repository","https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fawesome-pieces",{"key":516,"label":517,"href":518},"legal.privacyPolicy","Privacy policy","https:\u002F\u002Fpieces.app\u002Flegal\u002Fprivacy-policy",{"key":520,"label":521,"href":522},"legal.refundPolicy","Refund policy","https:\u002F\u002Fpieces.app\u002Flegal\u002Frefund-policy",{"key":524,"label":525,"href":526},"legal.terms","Terms","https:\u002F\u002Fpieces.app\u002Flegal\u002Fterms",{"key":528,"label":529,"href":530},"legal.security","Legal security","https:\u002F\u002Fpieces.app\u002Flegal\u002Fsecurity",{"key":532,"label":533,"href":447},"videos.youtubeChannel","YouTube channel",{"key":535,"label":536,"href":537},"videos.gettingStartedDesktop","Getting started desktop video","https:\u002F\u002Fyoutu.be\u002FdUr1lRM_TYk",{"key":539,"label":540,"href":541},"videos.snippetDiscovery","Snippet discovery video","https:\u002F\u002Fyoutu.be\u002FG6vb1USw-30",{"key":543,"label":544,"href":545},"sales.bookACall","Book a sales call","https:\u002F\u002Fcalendar.app.google\u002FWVUDtUfNy5Vst3sH7",{"key":547,"label":548,"href":549},"sales.enterprise","Enterprise form","https:\u002F\u002Fgetpieces.typeform.com\u002Fto\u002FaVQFTvpE",{"key":551,"label":552,"href":463},"sales.feedback","Feedback discussions",{"key":554,"label":555,"href":556},"sales.earlyAccess","Early access form","https:\u002F\u002Fgetpieces.typeform.com\u002Fearlyaccess",{"key":558,"label":559,"href":560},"sales.supportEmail","Support email","mailto:support@pieces.app",{"key":562,"label":563,"href":564},"routes.home","Home route","\u002F",{"key":566,"label":567,"href":46},"routes.about","About route",{"key":569,"label":570,"href":16},"routes.downloads","Downloads route",{"key":572,"label":573,"href":574},"routes.pricing","Pricing route","\u002Fpricing",{"key":576,"label":577,"href":578},"routes.security","Security route","\u002Fsecurity",{"key":580,"label":581,"href":49},"routes.enterprise","Enterprise route",{"key":583,"label":584,"href":585},"routes.thankYou","Thank you \u002F download route","\u002Fthank-you",{},"data\u002Fshared\u002Furls","P27xKEauu8D-8sfyr0wR4giF0teFSaCuAQ8kgcICQdI",{"id":590,"title":591,"author":592,"authorPhoto":593,"authorPhotoAlt":594,"authorSlug":595,"body":596,"buttonText":1116,"buttonUrl":1116,"category":1117,"date":1118,"description":1119,"draft":1120,"editorsPick":1120,"extension":1121,"featured":1120,"image":1122,"imageAlt":1123,"meta":1124,"navigation":20,"ogImage":1116,"ogImageAlt":1116,"path":1125,"seo":1126,"stem":1127,"tags":1116,"__hash__":1128},"blog\u002Fblog\u002Fbuild-your-own-copilot-with-local-context.md","Build Your Own Copilot: Adding Local Context in to Your Conversation","The Pieces Team","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Fannouncing-the-pieces-visual-studio-extension\u002Fauthor.png","Pieces logo.","the-pieces-team",{"type":597,"value":598,"toc":1099},"minimark",[599,611,628,633,642,651,655,658,661,678,687,691,699,709,716,731,736,751,758,764,770,777,783,789,808,814,820,824,837,841,861,867,873,883,887,898,905,911,917,927,933,939,950,955,973,979,985,995,1001,1007,1027,1033,1039,1043,1046,1054,1058,1061,1069,1073,1096],[600,601,602,603,610],"p",{},"Pieces OS Client is a flexible database with a long list of APIs that can be used to build your own copilot that has the ability to understand local context and use it in combination with on-device ",[604,605,609],"a",{"href":606,"rel":607},"https:\u002F\u002Fpieces.app\u002Fblog\u002Flocal-large-language-models-lllms-and-copilot-integrations",[608],"nofollow","Local LLMs"," to answer questions and assist developers in their coding activities. In previous articles, we have covered how you can create your own Pieces Copilot and utilize all of the features available in the Typescript SDK available on NPM in order to add this functionality to your own applications and projects.",[600,612,613,614,618,619,623,624,627],{},"We also have provided SDKs in ",[604,615,617],{"href":475,"rel":616},[608],"Python"," and ",[604,620,622],{"href":487,"rel":621},[608],"Kotlin",", and are working hard to bring you a ",[604,625,482],{"href":483,"rel":626},[608]," to provide support across a multitude of languages and environments. Each of these articles contains examples on how you can create a Pieces Copilot that fits your needs.",[629,630,632],"h2",{"id":631},"code-along","Code Along",[600,634,635,636,641],{},"Following the ",[604,637,640],{"href":638,"rel":639},"https:\u002F\u002Fpieces.app\u002Fblog\u002Fhow-to-build-a-copilot-using-local-llms-with-pieces-client",[608],"previous article"," and the addition of the local Llama2 (GPU\u002FCPU) Models, we want to show the power of using these models on the tasks for which we previously used GPT4 (or 3.5). We also want to demonstrate what we can accomplish by adding context to get specific results back from our copilot—even in an offline environment.",[600,643,644,645,650],{},"Each article in this series corresponds ",[604,646,649],{"href":647,"rel":648},"https:\u002F\u002Fgithub.com\u002Fpieces-app\u002Fpieces-copilot-vanilla-typescript-example",[608],"to this repository",", which contains a starter project for building your own copilot application in a Vanilla JavaScript environment. Use the repo to follow along with this article or to use as a starting point for your own project.",[629,652,654],{"id":653},"prerequisites","Prerequisites",[600,656,657],{},"In order to understand this article, it’s best to first read the other two articles on building your own copilot to understand aspects of the LLLMs and sending conversation messages.",[600,659,660],{},"If you have missed the other two preceding articles you can catch up here:",[662,663,664,672],"ul",{},[665,666,667],"li",{},[604,668,671],{"href":669,"rel":670},"https:\u002F\u002Fpieces.app\u002Fblog\u002Fbuild-your-own-copilot-in-less-than-10-minutes-with-pieces-os-client",[608],"Part 1: Build Your Own Copilot - Create a Copilot in less than 10 minutes",[665,673,674],{},[604,675,677],{"href":638,"rel":676},[608],"Part 2: Downloading Local LLMs and Switching Between Models With Ease",[600,679,680,681,686],{},"For following along in your own project, be sure to have ",[604,682,685],{"href":683,"rel":684},"https:\u002F\u002Fdocs.pieces.app\u002Finstallation-getting-started\u002Fwhat-am-i-installing",[608],"Pieces OS downloaded"," and the appropriate SDK for your language or environment.",[629,688,690],{"id":689},"getting-started-with-context","Getting Started With Context",[600,692,693,694,698],{},"In our previous work we have created a few simple HTML elements in order to put other displayed information such as the copilot message that you are going to attach as a ",[695,696,697],"code",{},"query"," when you send a conversation message. Here we need to create a button to add the files to our context, a label (needed for targeting the text area), and a container that will display the selected files for context. You will see these again later as we populate them:",[700,701,706],"pre",{"className":702,"code":704,"language":705},[703],"language-text","\u003Cbutton id=\"add-files-as-context\">Add file(s) to context\u003C\u002Fbutton>\n\u003Ctextarea id=\"context-input\">\u003C\u002Ftextarea>\n\u003Clabel for=\"context-input\">\u003C\u002Flabel>\n\u003Cdiv id=\"context-files-added-container\">\u003C\u002Fdiv>\n","text",[695,707,704],{"__ignoreMap":708},"",[600,710,711],{},[604,712,715],{"href":713,"rel":714},"https:\u002F\u002Fjwaf.pieces.cloud\u002F?p=edbb448ab3",[608],"Save this Snippet",[600,717,718,719,722,723,726,727,730],{},"We shouldn't need to revisit this file at all, but can move over to ",[695,720,721],{},"index.ts"," and start learning how to create our ",[695,724,725],{},"RelevanceRequest",". First, we’ll fetch our files that are selected as context and their associated file paths, then we’ll send them over to our ",[695,728,729],{},"CopilotStreamController.ts"," to craft the request for our conversation message with the copilot.",[732,733,735],"h3",{"id":734},"capturing-relevant-files-as-context","Capturing Relevant Files as Context",[600,737,738,739,742,743,746,747,750],{},"When the ",[695,740,741],{},"add-files-as-context"," button is pressed, we can use a Pieces OS Client API to open a File Picker native to your operating system. You can do that using a really simple API call using ",[695,744,745],{},"OSApi"," and you’ll notice the empty ",[695,748,749],{},"filePickerInput: {}"," object that is passed in; this is something you only have to do with the SDK.",[600,752,753,754,757],{},"This returns a specific type of data, and when it completes (or the files are selected), it will return the files as an array of strings which will be used in the next step when using ",[695,755,756],{},".then()",":",[700,759,762],{"className":760,"code":761,"language":705},[703],"\u002F\u002F opening and returning a file(s) back when it closes.\nnew OSApi().pickFiles({filePickerInput: {}})\n",[695,763,761],{"__ignoreMap":708},[600,765,766],{},[604,767,715],{"href":768,"rel":769},"https:\u002F\u002Fjwaf.pieces.cloud\u002F?p=e6c74a9835",[608],[600,771,772,773,776],{},"We can attach this action to our button up above once we use ",[695,774,775],{},"document.getElementByID(\"add-files-as-context\")"," and ensure the button is present on the DOM:",[700,778,781],{"className":779,"code":780,"language":705},[703],"const addFilesAsContext = document.getElementById(\"add-files-as-context\");\n\nif (!addFilesAsContext) throw new Error('expected id add-files-as-context');\n\n\u002F\u002F Add the onclick function to our add context button, \n\u002F\u002F which will open up the file picker and then return \n\u002F\u002F back an array of files, which we can iterate over.\naddFilesAsContext.onclick = () => {\n    new Pieces.OSApi().pickFiles({ filePickerInput: {} })\n        .then((files) => {\n            files.forEach((file) => {\n                \u002F\u002F Your logic for handling each file goes here\n            });\n        });\n};\n",[695,782,780],{"__ignoreMap":708},[600,784,785],{},[604,786,715],{"href":787,"rel":788},"https:\u002F\u002Fjwaf.pieces.cloud\u002F?p=71de4984cc",[608],[600,790,791,792,795,796,799,800,803,804,807],{},"Then on each file path that is returned, each ",[695,793,794],{},"file"," (list of strings that is returned from the file picker, each being a string that is the file path of the selected file) that is selected in the ",[695,797,798],{},"FilePicker"," is returned back individually on the ",[695,801,802],{},"Array",". We go through each one and can create a new child inside of our list of selected files that is displayed on the UI, along with updating our ",[695,805,806],{},"selectedContextFiles"," global variable that is read elsewhere:",[700,809,812],{"className":810,"code":811,"language":705},[703],"\u002F\u002F Retrieve the element to add files as context and validate its existence.\nconst addFilesAsContext = document.getElementById(\"add-files-as-context\");\n\nif (!addFilesAsContext) {\n    throw new Error('Element with ID \"add-files-as-context\" not found.');\n}\n\n\u002F\u002F Set an onclick handler to open the file picker and process selected files.\naddFilesAsContext.onclick = async () => {\n    try {\n        \u002F\u002F Use OSApi to open a file picker and handle the selection.\n        const files: string[] = await new OSApi().pickFiles({ filePickerInput: {} });\n\n        files.forEach((file: string) => {\n            \u002F\u002F Find the container for file entries and validate its existence.\n            const contextContainer = document.getElementById('context-files-added-container');\n            if (!contextContainer) {\n                throw new Error('Element with ID \"context-files-added-container\" not found.');\n            }\n\n            \u002F\u002F Create a new paragraph for each file and append it to the container.\n            const newFileEntry = document.createElement(\"p\");\n            newFileEntry.innerText = file;\n            contextContainer.appendChild(newFileEntry);\n\n            \u002F\u002F Update the global list of selected files in CopilotStreamController.\n            CopilotStreamController.selectedContextFiles.push(file);\n        });\n    } catch (error) {\n        console.error('Error occurred:', error);\n    }\n};\n",[695,813,811],{"__ignoreMap":708},[600,815,816],{},[604,817,715],{"href":818,"rel":819},"https:\u002F\u002Fjwaf.pieces.cloud\u002F?p=a8e04990f8",[608],[629,821,823],{"id":822},"creating-relevance-and-adding-user-context","Creating Relevance and Adding User Context",[600,825,826,827,829,830,832,833,836],{},"Now that our global value has been updated for ",[695,828,806],{}," we can head over to ",[695,831,729],{}," to use those values and formulate our relevance request. The ",[695,834,835],{},"Pieces.RelevanceRequest"," object is the first step in a process to gather, seed, then attach relevance to your conversation message that you send.",[732,838,840],{"id":839},"creating-the-relevancerequest","Creating the Relevance.Request",[600,842,843,844,846,847,850,851,854,855,858,859,757],{},"When we created the ",[695,845,798],{}," functionality earlier by using the ",[695,848,849],{},"OSApi.pickFiles()"," endpoint, we captured each of the ",[695,852,853],{},"FilePaths"," (as strings) associated with files requested to be added as context by the user and stored them on the ",[695,856,857],{},"CopilotStreamController.selectedContextFiles"," variable that we can now pass in with our ",[695,860,697],{},[700,862,865],{"className":863,"code":864,"language":705},[703],"const relevanceInput: Pieces.RelevanceRequest = {\n    qGPTRelevanceInput: {\n        query,\n        paths: CopilotStreamController.selectedContextFiles,\n    }\n};\n\n\u002F\u002F For our proceeding steps, we can also add in this error handling\nif (!(relevanceInput.qGPTRelevanceInput.query ?? '')) {\n    throw new Error('Your Query is empty or it was not provided');\n}\n",[695,866,864],{"__ignoreMap":708},[600,868,869],{},[604,870,715],{"href":871,"rel":872},"https:\u002F\u002Fjwaf.pieces.cloud\u002F?p=61834b9b79",[608],[600,874,875,876,878,879,882],{},"Remember that ",[695,877,697],{}," is just the string value that comes from our ",[695,880,881],{},"userInput"," text area from the earlier articles.",[732,884,886],{"id":885},"connecting-your-application","Connecting Your Application",[600,888,889,890,893,894,897],{},"In order to seed the ",[695,891,892],{},"qGPT.RelevanceInput.seed"," that is needed to use the ",[695,895,896],{},"qGPTApi().relevance"," endpoint, you will need to connect your application to Pieces OS and effectively authenticate as a registered application.",[600,899,900,901,904],{},"Below where the ",[695,902,903],{},"relevanceInput"," is double-checked and error handled in our previous step, we can add these two lines:",[700,906,909],{"className":907,"code":908,"language":705},[703],"const application = await getApplication();\nif (!application) throw new Error('you must have a registered application to use this, is Pieces os running?')\n",[695,910,908],{"__ignoreMap":708},[600,912,913],{},[604,914,715],{"href":915,"rel":916},"https:\u002F\u002Fjwaf.pieces.cloud\u002F?p=f11648a234",[608],[600,918,919,920,922,923,926],{},"Now over in the ",[695,921,721],{}," file—or in your corresponding ",[695,924,925],{},"entrypoint.ts"," file—there needs to be a new function defined for creating and getting our application value after communicating with Pieces OS. There are some notes on the different values here, but this is a copy and paste example of getting a generic application value for an OpenSource project:",[700,928,931],{"className":929,"code":930,"language":705},[703],"let application: Application;\n\nexport async function getApplication() {\n    if (application) return application;\n\n    \u002F\u002F PlatformEnum corresponds to the current operating system that this is being run on.\n    \u002F\u002F A great example of using a one line conditional to select the proper platform enum.\n    const platform: PlatformEnum = \n        window.navigator.userAgent.toLowerCase().includes('linux') ? PlatformEnum.Linux :\n        window.navigator.userAgent.toLowerCase().includes('win') ? PlatformEnum.Windows :\n        PlatformEnum.Macos;\n\n    \u002F\u002F Creating the Application Here, and setting up the three primary parameters.\n    \u002F\u002F name: which uses the ApplicationNameEnum. There are some other useful values like .Unknown\n    \u002F\u002F version: Just can pass in a string and does not affect anything but can be used.\n    \u002F\u002F platform is passed in to the platform parameter\n    let context: Context = await new ConnectorApi().connect({\n        seededConnectorConnection: {\n            application: {\n                name: ApplicationNameEnum.OpenSource,\n                version: '0.0.0',\n                platform,\n            }\n        }\n    });\n\n    \u002F\u002F Set our application equal to our context.application, that is returned from the connect endpoint\n    application = context.application;\n}\n",[695,932,930],{"__ignoreMap":708},[600,934,935],{},[604,936,715],{"href":937,"rel":938},"https:\u002F\u002Fjwaf.pieces.cloud\u002F?p=c4bc48a731",[608],[600,940,941,942,945,946,949],{},"The ",[695,943,944],{},"application"," has been created and now we can get the application parameter added into our ",[695,947,948],{},"relevanceInput.qGPTRelevanceInput.seeds"," to get back our relevance.",[600,951,952,953],{},"Building the ",[695,954,948],{},[600,956,957,958,961,962,965,966,969,970,972],{},"When a relevance call is made via the API, it needs a pre-seeded object that contains the application, the parameter ",[695,959,960],{},"type"," that represents the type of seed that is going to be used, and the ",[695,963,964],{},"userContextInput"," that is inside of our ",[695,967,968],{},"contextInput",". If there is no ",[695,971,964],{},", then we want to be sure that we don't run this, as it would add additional processing with no supplied relevance. Here is the object in full:",[700,974,977],{"className":975,"code":976,"language":705},[703],"\u002F\u002F Ensure that userContextInput is here\nif (userContextInput) {\n    \u002F\u002F Define the seeds here on the relevance input\n    input.relevanceInput.qGPTRelevanceInput.seeds = {\n        iterable: [{\n            \u002F\u002F The type of relevance input that is being used\n            type: SeedTypeEnum.Asset,\n            asset: {\n                \u002F\u002F The application we created and registered\n                application,\n                format: {\n                    fragment: {\n                        string: {\n                            \u002F\u002F The user input that was supplied passed in as a raw string value\n                            raw: userContextInput\n                        }\n                    }\n                }\n            }\n        }]\n    };\n}\n",[695,978,976],{"__ignoreMap":708},[600,980,981],{},[604,982,715],{"href":983,"rel":984},"https:\u002F\u002Fjwaf.pieces.cloud\u002F?p=5179418569",[608],[600,986,987,988,991,992,994],{},"Beneath that, we can then call the ",[695,989,990],{},"qGPTApi.relevance()"," endpoint to get our relevance back once we pass in the ",[695,993,903],{}," variable and store its output:",[700,996,999],{"className":997,"code":998,"language":705},[703],"const relevanceOutput = await new QGPTApi().relevance(relevanceInput);\n",[695,1000,998],{"__ignoreMap":708},[600,1002,1003],{},[604,1004,715],{"href":1005,"rel":1006},"https:\u002F\u002Fjwaf.pieces.cloud\u002F?p=022a4d8e11",[608],[600,1008,1009,1010,1013,1014,1017,1018,1021,1022,1026],{},"Finally, we pass in the ",[695,1011,1012],{},"relevanceOutput"," into the relevant parameter on the ",[695,1015,1016],{},"Pieces.QGPTStreamInput"," object. You may recognize it from when we initially created our ",[695,1019,1020],{},"question"," during ",[604,1023,1025],{"href":669,"rel":1024},[608],"the first article of this series",". Once all of the framing is configured throughout the rest of the project, the final call to ask the question becomes quite simple:",[700,1028,1031],{"className":1029,"code":1030,"language":705},[703],"const input: Pieces.QGPTStreamInput = {\n    question: {\n        \u002F\u002F pass in your query here as normal.\n        query,\n        \u002F\u002F replace this empty iterable with the new relevance.\n        \u002F\u002F relevant: {iterable: []},\n        relevant: relevanceOutput.relevant,\n        model: CopilotStreamController.selectedModelId\n    }\n};\n",[695,1032,1030],{"__ignoreMap":708},[600,1034,1035],{},[604,1036,715],{"href":1037,"rel":1038},"https:\u002F\u002Fjwaf.pieces.cloud\u002F?p=7292428e5e",[608],[629,1040,1042],{"id":1041},"seeing-relevancecontext-in-action","Seeing Relevance\u002FContext in Action",[600,1044,1045],{},"With all parts added, the context functionality will give you the ability to ask questions based on the information that is provided to the copilot. If you are following along and have the repo cloned on your machine and are up and running with the copilot project, you can run your application and test this out on your machine.",[600,1047,1048,1049,1053],{},"Returning to the browser with your copilot, you can attach any file and ask a specific question about information in that file to feel the effects and see the difference between requests. Try adding a JSON object as a file to your context and ask the copilot questions to see the results, or try it out with the ",[604,1050,1052],{"href":647,"rel":1051},[608],"copilot example project",".",[629,1055,1057],{"id":1056},"ready-to-build-your-own-copilot","Ready to Build Your Own Copilot?",[600,1059,1060],{},"Now you have a complete guide to building your own copilot, downloading and using local LLMs, and adding context to your copilot conversation messages. With these tools, you can build your own copilot application or add the functionality of Pieces OS Client into your own applications.",[600,1062,1063,1064,1068],{},"If you would like to get more involved with this project, you can check out our ",[604,1065,1067],{"href":471,"rel":1066},[608],"OpenSource Repo"," or this project on Github to download the complete code.",[732,1070,1072],{"id":1071},"resources","Resources:",[662,1074,1075,1082,1089],{},[665,1076,1077,1081],{},[604,1078,1080],{"href":683,"rel":1079},[608],"Try the Desktop App"," to see the Power of Pieces OS",[665,1083,1084,1088],{},[604,1085,1087],{"href":647,"rel":1086},[608],"Vanilla Copilot Example",": full, usable example of the copilot",[665,1090,1091,1095],{},[604,1092,1094],{"href":471,"rel":1093},[608],"Open Source Resources",": other open source projects and resources currently underway",[600,1097,1098],{},"More articles coming soon around how to use the SDKs and other projects we are working on!",{"title":708,"searchDepth":1100,"depth":1100,"links":1101},2,[1102,1103,1104,1108,1112,1113],{"id":631,"depth":1100,"text":632},{"id":653,"depth":1100,"text":654},{"id":689,"depth":1100,"text":690,"children":1105},[1106],{"id":734,"depth":1107,"text":735},3,{"id":822,"depth":1100,"text":823,"children":1109},[1110,1111],{"id":839,"depth":1107,"text":840},{"id":885,"depth":1107,"text":886},{"id":1041,"depth":1100,"text":1042},{"id":1056,"depth":1100,"text":1057,"children":1114},[1115],{"id":1071,"depth":1107,"text":1072},null,"AI & LLM","2024-01-30T00:00:00.000Z","Build your own copilot with the Pieces Client, based on how the Pieces Copilot uses context to understand your questions.",false,"md","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fblog\u002Fbuild-your-own-copilot-with-local-context\u002Fhero.jpeg","Open Source by Pieces.",{},"\u002Fblog\u002Fbuild-your-own-copilot-with-local-context",{"title":591,"description":1119},"blog\u002Fbuild-your-own-copilot-with-local-context","V95etX7r8j6mmqleM6UZm-yH0lHA_QB7KeFSxpc8kWw",{"id":1130,"title":592,"body":1131,"description":708,"draft":1120,"extension":1121,"meta":1135,"navigation":20,"path":1136,"photo":1137,"photoAlt":1116,"seo":1138,"stem":1139,"__hash__":1140},"authors\u002Fauthors\u002Fthe-pieces-team.md",{"type":597,"value":1132,"toc":1133},[],{"title":708,"searchDepth":1100,"depth":1100,"links":1134},[],{},"\u002Fauthors\u002Fthe-pieces-team","https:\u002F\u002Fstorage.googleapis.com\u002Fpieces-marketing-website\u002Fimages\u002Fauthors\u002Fthe-pieces-team.png",{"title":592,"description":708},"authors\u002Fthe-pieces-team","_2O_QA8d8RjXlBp0ck4PWDG6iA74zW1kN0R0gkn2Lls"]