Spaces:
Paused
Paused
Fixed Display issues
Browse files12345678910111213141516:7860 {# Route WebSocket streams (iii-stream on 3112)handle /stream/* {reverse_proxy localhost:3112}# Route REST API endpoints (iii-http on 3111)handle /agentmemory/* {reverse_proxy localhost:3111}# Route Viewer dashboard (on 3113)handle {reverse_proxy localhost:3113}}12345678910111213141516171819202122:7860 {# Route WebSocket streams (iii-stream on 3112)handle /stream/* {reverse_proxy localhost:3112 {header_up Host localhost:3112}}# Route REST API endpoints (iii-http on 3111)handle /agentmemory/* {reverse_proxy localhost:3111 {header_up Host localhost:3111}}# Route Viewer dashboard (on 3113)handle {reverse_proxy localhost:3113 {header_up Host localhost:3113}}}
2 unmodified lines3456789101112131415161718192 unmodified lines# Create config foldermkdir -p ~/.agentmemory# Dynamically write env config from environment variablescat <<EOF > ~/.agentmemory/.env# =============================================================================# agentmemory configuration (Hugging Face Spaces)# =============================================================================GEMINI_API_KEY=${GEMINI_API_KEY}GEMINI_MODEL=gemini-2.5-flashEMBEDDING_PROVIDER=geminiCONSOLIDATION_ENABLED=trueGRAPH_EXTRACTION_ENABLED=trueAGENTMEMORY_REFLECT=trueEOF# Start agentmemory daemon in the background2 unmodified lines34567891011121314151617181920212223242526272829303132333435362 unmodified lines# Create config foldermkdir -p ~/.agentmemory# The daemon runs inside the Space and must talk to its own services on local# container ports. Use the public hf.space URL only from your local machine.export AGENTMEMORY_URL=http://localhost:3111export III_ENGINE_URL=ws://localhost:49134# Hugging Face proxies requests with the public *.hf.space host. agentmemory's# viewer rejects unknown Host headers unless they are explicitly allowed.if [ -n "${SPACE_HOST}" ]; thenexport VIEWER_ALLOWED_HOSTS="${VIEWER_ALLOWED_HOSTS:-${SPACE_HOST},${SPACE_HOST}:443,${SPACE_HOST}:7860}"export VIEWER_ALLOWED_ORIGINS="${VIEWER_ALLOWED_ORIGINS:-https://${SPACE_HOST},http://${SPACE_HOST},http://localhost:3111,http://localhost:3113,http://127.0.0.1:3111,http://127.0.0.1:3113}"fi# Dynamically write env config from environment variablescat <<EOF > ~/.agentmemory/.env# =============================================================================# agentmemory configuration (Hugging Face Spaces)# =============================================================================GEMINI_API_KEY=${GEMINI_API_KEY}AGENTMEMORY_SECRET=${AGENTMEMORY_SECRET}AGENTMEMORY_URL=${AGENTMEMORY_URL}III_ENGINE_URL=${III_ENGINE_URL}GEMINI_MODEL=gemini-2.5-flashEMBEDDING_PROVIDER=geminiCONSOLIDATION_ENABLED=trueGRAPH_EXTRACTION_ENABLED=trueAGENTMEMORY_REFLECT=trueVIEWER_ALLOWED_HOSTS=${VIEWER_ALLOWED_HOSTS}VIEWER_ALLOWED_ORIGINS=${VIEWER_ALLOWED_ORIGINS}EOF# Start agentmemory daemon in the background
Caddyfile+9-3
start.sh+17