bytedance/deer-flow · error · AgentsApiDisabledError
agents_api.enabled
agents_api.enabled
Error message
err.detail
What it means
Wrapped MemoryManagerError raised by Mem0Manager._read_or_fallback when a memory read raises Mem0APIError and the configured read_policy is not fail_open. The underlying cause (network failure, timeout, 4xx/5xx from the mem0 service) is chained via 'from e' and its text is embedded in the message.
Source
Thrown at frontend/src/core/agents/api.ts:61
return data.agents;
}
export async function getAgent(name: string): Promise<Agent> {
const res = await fetch(`${getBackendBaseURL()}/api/agents/${name}`);
if (!res.ok) throw new Error(`Agent '${name}' not found`);
return res.json() as Promise<Agent>;
}
export async function createAgent(request: CreateAgentRequest): Promise<Agent> {
const res = await fetch(`${getBackendBaseURL()}/api/agents`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(request),
});
if (!res.ok) {
const err = (await res.json().catch(() => ({}))) as { detail?: string };
if (isAgentsApiDisabledDetail(err.detail)) {
throw new AgentsApiDisabledError(err.detail!);
}
throw new Error(err.detail ?? `Failed to create agent: ${res.statusText}`);
}
return res.json() as Promise<Agent>;
}
export async function updateAgent(
name: string,
request: UpdateAgentRequest,
): Promise<Agent> {
const res = await fetch(`${getBackendBaseURL()}/api/agents/${name}`, {
method: "PUT",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(request),
});
if (!res.ok) {
const err = (await res.json().catch(() => ({}))) as { detail?: string };
throw new Error(err.detail ?? `Failed to update agent: ${res.statusText}`);View on GitHub (pinned to 1dd6ba1acb)
Solutions
- Inspect the chained Mem0APIError text and fix the underlying cause (reachability, API key, service health).
- If the agent should keep answering without memory during outages, set read_policy: fail_open so reads degrade to a logged fallback.
- Increase timeout_seconds if the chained error indicates a timeout.
Example fix
# before backend_config: read_policy: raise # after backend_config: read_policy: fail_open # log warning, continue without memory
Defensive patterns
Strategy: fallback
Try / catch
from deerflow.agents.memory.backends.mem0.mem0_manager import MemoryManagerError
try:
memories = manager.search(thread_id, query)
except MemoryManagerError as e:
if 'mem0 read failed' in str(e):
logger.warning('memory unavailable, proceeding without it: %s', e)
memories = []
else:
raise Prevention
- Choose read_policy: fail_open unless memory is strictly required for correctness; it converts this error into a logged fallback.
- Monitor mem0 reachability with a health probe so outages are visible before user-visible degradation.
- Set timeout_seconds to a realistic value relative to your mem0 latency.
When it happens
Trigger: Any memory read path (searching memories for the current thread) while the mem0 service is unreachable, returns an error status, or times out, combined with read_policy: raise. With read_policy: fail_open the same failure only logs a warning and returns the fallback value instead.
Common situations: mem0 cloud incident or expired API key surfacing as 401; local mem0 container restarting mid-conversation; timeout_seconds too small for slow searches; operator chose read_policy: raise to make memory mandatory and then the network blips.
Related errors
- Failed to create agent: ${res.statusText}
- honcho memory recall failed: {exc}
- mem0 request failed: {e}
- mem0 failure_policy.read must be one of {sorted(_READ_POLICI
- mem0 failure_policy.write must be one of {sorted(_WRITE_POLI
AI-assisted analysis of bytedance/deer-flow@1dd6ba1acb (2026-08-14).
Data as JSON: /api/errors/a45888342182f2f3.
Report an issue: GitHub.