Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
TypeScript aiai-agentsai-memoryanthropicartificial-intelligencechromadbclaudeclaude-agent-sdkclaude-agentsclaude-codeclaude-code-pluginclaude-skillsembeddingslong-term-memorymem0memory-engineopenmemoryragsqlitesupermemory
import{E as e,N as t,O as n,S as r,a as i,b as a,j as o,k as s,r as c}from"./served-from-8DzM0VAM.js";import{t as l}from"./monitor-DWQlfYB9.js";import{$ as u,Q as d,Z as f}from"./parse-sse-frame-DXl4zDFf.js";import{Ot as ee,b as te,c as p,kt as ne,t as m,u as re,v as ie,x as h}from"./req-DRjqKS_G.js";import{An as g,Bn as _,D as v,E as y,Gn as ae,Hn as oe,Ln as se,Q as b,Rn as x,Un as ce,Vn as le,Wn as ue,_ as S,cn as C,g as w,gn as T,ir as de,kn as E,nr as D,or as O,qn as fe,sn as pe,un as me,y as k,yn as he,zn as ge}from"./index-Dknlc6p6.js";var A={name:`code-xml`,size:24,node:[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]],aliases:[`code-2`]};A.node;var j=n(A),M={name:`credit-card`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`,key:`ynyp8z`}],[`line`,{x1:`2`,x2:`22`,y1:`10`,y2:`10`,key:`1b3vmo`}],[`path`,{d:`M6 14h2`,key:`mk7k0u`}]]};M.node;var N=n(M),P={name:`languages`,size:24,node:[[`path`,{d:`m5 8 6 6`,key:`1wu5hv`}],[`path`,{d:`m4 14 6-6 2-3`,key:`1k1g8d`}],[`path`,{d:`M2 5h12`,key:`or177f`}],[`path`,{d:`M7 2h1`,key:`1t2jsx`}],[`path`,{d:`m22 22-5-10-5 10`,key:`don7ne`}],[`path`,{d:`M14 18h6`,key:`1m8k6r`}]]};P.node;var F=n(P),I={name:`life-buoy`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m4.93 4.93 4.24 4.24`,key:`1ymg45`}],[`path`,{d:`m14.83 9.17 4.24-4.24`,key:`1cb5xl`}],[`path`,{d:`m14.83 14.83 4.24 4.24`,key:`q42g0n`}],[`path`,{d:`m9.17 14.83-4.24 4.24`,key:`bqpfvv`}],[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}]]};I.node;var _e=n(I),L={name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]};L.node;var R=n(L),z={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};z.node;var ve=n(z),B={name:`sun-moon`,size:24,node:[[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M14.837 16.385a6 6 0 1 1-7.223-7.222c.624-.147.97.66.715 1.248a4 4 0 0 0 5.26 5.259c.589-.255 1.396.09 1.248.715`,key:`xlf6rm`}],[`path`,{d:`M16 12a4 4 0 0 0-4-4`,key:`6vsxu`}],[`path`,{d:`m19 5-1.256 1.256`,key:`1yg6a6`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}]]};B.node;var ye=n(B),V={name:`sun`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]};V.node;var H=n(V),U=t(o(),1),W=s(),G={system:{words:e=>e(`System`),icon:l},light:{words:e=>e(`Light mode`),icon:H},dark:{words:e=>e(`Dark mode`),icon:R}},K={full:e=>e(`Full`),compact:e=>e(`Compact`),off:e=>e(`Off`)},q=Object.keys(K),be=`https://docs.claude-mem.ai`,J=`flex min-h-16 w-full items-center gap-4 rounded-md border-0 px-1 py-3 text-left hover-enabled:bg-muted`;function Y({icon:t,title:n,meta:r,value:o,open:s,onToggle:c,children:l}){let u=(0,U.useId)();return(0,W.jsxs)(`div`,{"data-workspace-row":``,className:`border-b border-border last:border-b-0`,children:[(0,W.jsxs)(i,{variant:`bare`,"aria-expanded":s,"aria-controls":s?u:void 0,onClick:c,className:J,children:[(0,W.jsx)(w,{icon:t}),(0,W.jsx)(S,{title:n,meta:r}),o&&(0,W.jsx)(`span`,{className:`shrink-0 text-sm font-normal text-muted-foreground`,children:o}),(0,W.jsx)(e,{"aria-hidden":`true`,className:a(`size-4.5 text-muted-foreground transition-transform motion-reduce:transition-none`,s&&`rotate-90`)})]}),s&&(0,W.jsx)(`div`,{id:u,className:`pb-4 pl-14`,children:l})]})}function X({icon:t,title:n,meta:r,href:o,onPress:s,external:c=!1}){return(0,W.jsx)(i,{asChild:!0,variant:`bare`,className:a(J,`rounded-none border-b border-border last:border-b-0`),children:(0,W.jsxs)(`a`,{href:o,onClick:s?C(s):void 0,...c?{target:`_blank`,rel:`noreferrer`}:{},children:[(0,W.jsx)(w,{icon:t}),(0,W.jsx)(S,{title:n,meta:r}),c?(0,W.jsx)(O,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}):(0,W.jsx)(e,{"aria-hidden":`true`,className:`size-4.5 text-muted-foreground`})]})})}function Z({href:e,children:t}){return(0,W.jsx)(i,{asChild:!0,variant:`link`,size:`sm`,className:`h-auto justify-start px-0`,children:(0,W.jsxs)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,children:[t,(0,W.jsx)(O,{"aria-hidden":`true`})]})})}function Q(){let{t:e,locale:t,setLocale:n}=r(),{team:i}=re(),a=p(e=>e.work.load.state===`loaded`?e.work.load.model.people.length:null),o=p(e=>e.work.connection?.label??null),s=p(e=>e.work.sourceKind===`sample`),S=p(e=>ie(e.view)),{appearance:C,update:w}=se(),O=p(e=>e.view.showSpec),A=p(e=>e.view.focusArtwork),{setTheme:M,setShowSpec:P,setWorkspace:I,setFocusArtwork:L,goToPage:R}=p.getState(),z=me(`machine`),[B,V]=(0,U.useState)(null),H=e=>()=>V(t=>t===e?null:e),J=c(window.location.hostname),Q=e=>{if(e){if(!ne(e))throw Error(`Unknown theme choice ${e}`);M(e)}},xe=e=>{w({preset:e});let t=le[e];t&&M(t)},Se=e=>{if(!e)return;let t=f.find(t=>t===e);if(!t)throw Error(`Unknown language ${e}`);n(t)},Ce=e=>{let t=q.find(t=>t===e);t&&L(t)},$=i?a===null?null:u(e(a===1?`{count} person on this board`:`{count} people on this board`),{count:a}):e(`See everyone’s requests on one board, with who asked and where work collides.`),we=s?e(`Sample data · not your work`):o&&e(o);return(0,W.jsxs)(`div`,{className:`space-y-8 md:space-y-9`,children:[(0,W.jsxs)(v,{children:[(0,W.jsxs)(y,{title:e(`Appearance`),children:[(0,W.jsx)(Y,{icon:ye,title:e(`Theme`),value:G[S].words(e),open:B===`theme`,onToggle:H(`theme`),children:(0,W.jsxs)(`div`,{className:`space-y-4`,children:[(0,W.jsx)(E,{type:`single`,variant:`outline`,size:`sm`,spacing:1,value:S,onValueChange:Q,"aria-label":e(`Theme`),children:ee.map(t=>{let{words:n,icon:r}=G[t];return(0,W.jsxs)(g,{value:t,"data-theme-choice":t,className:`gap-1.5 px-3`,children:[(0,W.jsx)(r,{"aria-hidden":`true`}),n(e)]},t)})}),(0,W.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,W.jsxs)(`label`,{className:`grid gap-1 text-sm font-medium`,children:[e(x.palette),(0,W.jsx)(`select`,{className:`min-h-10 rounded-md border border-control-edge bg-card px-2 text-sm font-normal`,value:C.preset,onChange:e=>xe(e.target.value),children:ue.map(t=>(0,W.jsx)(`option`,{value:t,children:e(ae[t])},t))})]}),(0,W.jsxs)(`label`,{className:`grid gap-1 text-sm font-medium`,children:[e(x.font),(0,W.jsx)(`select`,{className:`min-h-10 rounded-md border border-control-edge bg-card px-2 text-sm font-normal`,value:C.font,onChange:e=>w({font:e.target.value}),children:ge.map(t=>(0,W.jsx)(`option`,{value:t,children:e(_[t])},t))})]}),(0,W.jsxs)(`label`,{className:`grid gap-1 text-sm font-medium`,children:[e(x.reading),(0,W.jsx)(`select`,{className:`min-h-10 rounded-md border border-control-edge bg-card px-2 text-sm font-normal`,value:C.reading,onChange:e=>w({reading:e.target.value}),children:oe.map(t=>(0,W.jsx)(`option`,{value:t,children:e(ce[t])},t))})]})]})]})}),(0,W.jsx)(Y,{icon:F,title:e(`Language`),value:d[t],open:B===`language`,onToggle:H(`language`),children:(0,W.jsx)(E,{type:`single`,variant:`outline`,size:`sm`,spacing:1,value:t,onValueChange:Se,"aria-label":e(`Language`),children:f.map(e=>(0,W.jsx)(g,{value:e,lang:e,className:`px-3`,children:d[e]},e))})}),(0,W.jsx)(Y,{icon:de,title:e(`Focus area artwork`),value:K[A](e),open:B===`artwork`,onToggle:H(`artwork`),children:(0,W.jsx)(E,{type:`single`,variant:`outline`,size:`sm`,spacing:1,value:A,onValueChange:Ce,"aria-label":e(`Focus area artwork`),children:q.map(t=>(0,W.jsx)(g,{value:t,className:`px-3`,children:K[t](e)},t))})})]}),(0,W.jsxs)(y,{title:e(J?`Cloud viewer`:`This computer`),children:[(0,W.jsx)(X,{icon:l,title:pe(`machine`,e),meta:we,href:z,onPress:()=>R(`machine`)}),(0,W.jsx)(X,{icon:D,title:e(`Memory viewer`),meta:e(`Timeline and sessions`),href:te.address}),(0,W.jsx)(X,{icon:ve,title:e(`Memory settings`),href:h})]})]}),(0,W.jsxs)(`section`,{children:[(0,W.jsx)(`h2`,{className:`mb-3 text-section-title-phone md:mb-4 md:text-section-title`,children:e(`Tools and support`)}),(0,W.jsxs)(`div`,{className:`border-t border-border`,children:[(0,W.jsx)(m,{ids:[`R9.1`,`R9.4`],children:(0,W.jsx)(Y,{icon:fe,title:e(`Team view`),meta:e(`Team board and plan`),open:B===`team`,onToggle:H(`team`),children:(0,W.jsxs)(`div`,{className:`space-y-3`,children:[(0,W.jsxs)(b,{className:`flex items-start gap-3 font-normal`,children:[(0,W.jsx)(k,{checked:i,onCheckedChange:e=>I({team:e})}),(0,W.jsxs)(`span`,{className:`space-y-0.5`,children:[(0,W.jsx)(`span`,{className:`block font-medium`,children:e(`Team view`)}),$&&(0,W.jsx)(`span`,{className:`block text-sm text-muted-foreground`,children:$})]})]}),!i&&(0,W.jsx)(Z,{href:`https://cmem.ai/teambrain/start`,children:e(`Start team plan`)})]})})}),(0,W.jsx)(Y,{icon:_e,title:e(`Help and feedback`),meta:e(`Documentation, feedback and GitHub`),open:B===`help`,onToggle:H(`help`),children:(0,W.jsxs)(`div`,{className:`flex flex-col items-start gap-1`,children:[(0,W.jsx)(Z,{href:be,children:e(`Documentation`)}),(0,W.jsx)(Z,{href:he,children:e(`Send feedback`)}),(0,W.jsx)(Z,{href:T,children:e(`claude-mem on GitHub`)})]})}),(0,W.jsx)(Y,{icon:j,title:e(`Developer options`),meta:e(`Spec IDs on the page`),open:B===`developer`,onToggle:H(`developer`),children:(0,W.jsxs)(b,{className:`flex items-center gap-3 font-normal`,children:[(0,W.jsx)(k,{checked:O,onCheckedChange:P}),e(`Show spec IDs`)]})}),J&&(0,W.jsx)(m,{ids:[`R18.1`],children:(0,W.jsx)(X,{icon:N,title:e(`Account & billing`),href:`https://cmem.ai/account`,external:!0})})]})]})]})}export{Q as Workspace};