Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

feat(memory): enhance documentation for supported memory modes

nirholas7c55ae71b5b0
diff --git a/chat/src/App.svelte b/chat/src/App.svelte
index 9f186514b..70b28029c 100644
--- a/chat/src/App.svelte
+++ b/chat/src/App.svelte
@@ -22,7 +22,7 @@
} from './providers.js';
import ModelSelector from './ModelSelector.svelte';
import CompanyLogo from './CompanyLogo.svelte';
- import { controller, remoteServer, config, params, toolSchema, syncServer, brandConfig, ttsEnabled, localAgentId, activeAgent, talkingHeadEnabled, talkingHeadAvatarUrl, route, mode, websiteCategory, loadCurrentUser, notify } from './stores.js';
+ import { controller, remoteServer, config, params, toolSchema, syncServer, brandConfig, ttsEnabled, localAgentId, activeAgent, talkingHeadEnabled, talkingHeadAvatarUrl, route, mode, websiteCategory, loadCurrentUser, notify, localProvidersEnabled } from './stores.js';
import { t } from './i18n.js';
import Notifications from './Notifications.svelte';
import AuthPage from './manus/pages/AuthPage.svelte';
@@ -1306,17 +1306,28 @@
initializePWAStyles();
- try {
- tree = await (
- await fetch(`${$remoteServer.address}/list_directory`, {
- method: 'GET',
- headers: {
- Authorization: `Basic ${$remoteServer.password}`,
- },
- })
- ).json();
- } catch (error) {
- console.error(error);
+ // Only probe the local tool server if the user has opted in or clearly
+ // configured it (non-empty password, or non-default address). Otherwise
+ // the probe to localhost:8081 fails noisily for users who haven't
+ // started the helper.
+ const remoteServerConfigured =
+ $remoteServer.password !== '' ||
+ $remoteServer.address !== 'http://localhost:8081';
+ if ($localProvidersEnabled || remoteServerConfigured) {
+ try {
+ tree = await (
+ await fetch(`${$remoteServer.address}/list_directory`, {
+ method: 'GET',
+ headers: {
+ Authorization: `Basic ${$remoteServer.password}`,
+ },
+ })
+ ).json();
+ } catch (error) {
+ console.debug(
+ `[tool server] not detected at ${$remoteServer.address} — start it if you want local tools.`
+ );
+ }
}
loading = true;
diff --git a/chat/src/SettingsModal.svelte b/chat/src/SettingsModal.svelte
index 75aca0826..84a0270e2 100644
--- a/chat/src/SettingsModal.svelte
+++ b/chat/src/SettingsModal.svelte
@@ -15,6 +15,7 @@
toolSchema,
talkingHeadAvatarUrl,
locale,
+ localProvidersEnabled,
} from './stores.js';
import Button from './Button.svelte';
import Modal from './Modal.svelte';
@@ -273,6 +274,21 @@
/></label
>
{:else if activeTab === 'remote-server'}
+ <label class="mb-4 flex items-start gap-2 text-[13px] text-slate-700">
+ <input
+ type="checkbox"
+ bind:checked={$localProvidersEnabled}
+ class="mt-0.5"
+ />
+ <span class="flex flex-col">
+ <span>Enable local model providers</span>
+ <span class="text-[11px] text-slate-500">
+ Probe Ollama (localhost:11434) and the local tool server (localhost:8081) on load.
+ Leave off if you don't run these locally — otherwise the browser logs connection errors.
+ </span>
+ </span>
+ </label>
+
<label class="flex flex-col text-[10px] uppercase tracking-wide">
<span class="mb-2 flex items-center">
<span class="ml-[3px]">Tool server address </span>
diff --git a/chat/src/providers.js b/chat/src/providers.js
index 74b637451..55ae90b86 100644
--- a/chat/src/providers.js
+++ b/chat/src/providers.js
@@ -103,6 +103,7 @@ export const providers = [
url: 'http://localhost:11434',
completionUrl: '/v1/chat/completions',
modelsUrl: '/api/tags',
+ isLocal: true,
responseMapperFn: (json) => {
return json.models.map((m) => ({
id: m.name,
@@ -251,6 +252,10 @@ export async function fetchModels({ onFinally }) {
return [];
}
+ if (provider.isLocal && !get(localProvidersEnabled)) {
+ return [];
+ }
+
return fetch(`${provider.url}${provider.modelsUrl}`, {
method: 'GET',
headers: headersForFetch(provider, null),
@@ -266,7 +271,13 @@ export async function fetchModels({ onFinally }) {
}));
})
.catch((err) => {
- console.log('Error fetching models from provider', provider.name, err);
+ if (provider.isLocal) {
+ console.debug(
+ `[${provider.name}] not detected at ${provider.url} — start the local service if you want it.`
+ );
+ } else {
+ console.debug('Error fetching models from provider', provider.name, err);
+ }
return [];
});
});
diff --git a/public/discover/discover.js b/public/discover/discover.js
index df137506e..a893ebe5f 100644
--- a/public/discover/discover.js
+++ b/public/discover/discover.js
@@ -54,8 +54,9 @@ function updateSearchClearVisibility() {
// Reveal "View my agents" chip + nav link when signed in.
fetch('/api/auth/me', { credentials: 'include' })
- .then((r) => {
- if (!r.ok) return;
+ .then((r) => (r.ok ? r.json() : null))
+ .then((data) => {
+ if (!data?.user) return;
if (els.myAgentsChip) els.myAgentsChip.hidden = false;
const navLink = document.getElementById('nav-my-agents');
if (navLink) navLink.hidden = false;
diff --git a/src/memory/index.js b/src/memory/index.js
index 2bcd8a93f..4d706884c 100644
--- a/src/memory/index.js
+++ b/src/memory/index.js
@@ -1,5 +1,16 @@
// Agent memory — file-based, human-readable, Claude-shaped.
// See specs/MEMORY_SPEC.md
+//
+// Supported modes (set via `<agent-3d memory="…">` or manifest `memory.mode`):
+//
+// none — ephemeral, no persistence
+// local — persisted to localStorage[agent:<ns>:memory]
+// remote — persisted via /api/agent-memory (per-agent, owner-only)
+// ipfs — read-only manifest-bundled IPFS files
+// encrypted-ipfs — same as ipfs but AES-GCM encrypted with a derived key
+//
+// Unknown modes fall back to `local` with a single console.warn so a stale
+// or typo'd config never breaks <agent-3d> boot.
import { encryptBlob, bytesToBase64, base64ToBytes } from './crypto.js';
@@ -45,6 +56,18 @@ export class Memory {
this._dirty = false;
}
+ /**
+ * Load a Memory instance for the given mode. See file header for the
+ * mode table. Unknown modes warn once and fall back to `local`.
+ *
+ * @param {Object} opts
+ * @param {'none'|'local'|'remote'|'ipfs'|'encrypted-ipfs'} [opts.mode]
+ * @param {string} opts.namespace - Stable id (usually agent UUID)
+ * @param {string} [opts.manifestURI] - Required for ipfs / encrypted-ipfs
+ * @param {typeof fetch} [opts.fetchFn] - Override fetch (tests / SSR)
+ * @param {() => Promise<CryptoKey>} [opts.deriveKey] - Required for encrypted-ipfs
+ * @returns {Promise<Memory>}
+ */
static async load({ mode = 'local', namespace, manifestURI, fetchFn, deriveKey }) {
if (mode === 'none') return new Memory({ mode: 'none', namespace });
if (mode === 'local') return Memory._loadLocal(namespace);
@@ -54,7 +77,8 @@ export class Memory {
throw new Error('encrypted-ipfs mode requires a deriveKey function');
return Memory._loadIPFS({ mode, namespace, manifestURI, fetchFn, deriveKey });
}
- throw new Error(`Unknown memory mode: ${mode}`);
+ console.warn(`[memory] unknown mode "${mode}"; falling back to "local"`);
+ return Memory._loadLocal(namespace);
}
static async _loadRemote({ namespace, fetchFn }) {